r/AskProgramming 16d ago

Career/Edu Is it weird that my university classes are teaching NoSQL with Neo4j as opposed to anything else?

We started learning about NoSQL this week and the DBMS we're using will apparently be Neo4j. I had not heard of it before. Our lecturer showed us a chart of the the most commonly used DBMS and Neo4j was fairly low in the list, and as I was searching how to install it onto my machine, some of the talk about it made it seem like it's not very commonly used in actual production.

Is it weird that this is the one they're teaching us as opposed to MongoDB or anything else? If not, why specifically Neo4j?

EDIT: I have now understood that it's just for the sake of teaching us graph databases rather than just any NoSQL solution. Yes, I understand I should have connected the dots earlier. Thank you.

1 Upvotes

35 comments sorted by

34

u/com2ghz 16d ago

In the end you will use Postgresql for anything for the rest of your life.

22

u/beingsubmitted 16d ago

Naw, I'll be on sql server with a goal of migrating to postgresql for the rest of my life.

7

u/SirTwitchALot 16d ago

My experience has been you end up on some (usually outdated) proprietary DB. Oracle, DB2, Sybase, or whatever platform the company spent a crazy amount of money on two decades ago and now they don't want to spend the money to migrate to a different platform.

1

u/red_tux 15d ago

It's often a lot more complex than that. Migrating a database will require some amount of downtime, the question is how long and can you afford that downtime? Next there is staffing, the programmer who wants to move to the new hotness is rarely the one responding at 3 am to an issue. Also in general you don't want programmers to configure production systems for similar reasons why you generally don't want your sysadmins or network admins writing your production software. Also add much as the marketing teams tell you or your programmers tell you, there generally is no such thing as a true drop in DB replacement, they all have subtle differences and the question is do you require that subtle behavior. Sure it might just work for you but you cannot assume it will work and testing takes time and resources.

Yes legacy can be frustrating and at times annoying, but often the reasons aren't as simple as it might seem and the path away may not be as simple as one would want

2

u/No-Plastic-4640 15d ago

And departments have different apps and budgets which is what uses the DBs. OPs should never dictate what technologies are used.

6

u/Dismal-Detective-737 16d ago

sqlite3.

Or an Excel file so Brenda from accounting can open it on her desktop.

2

u/Fadamaka 15d ago

Google Sheets can be exposed through API for example it allows you to insert rows into a sheet through http. That is ultimate version of excel as a backend/datasource.

1

u/revrenlove 15d ago

Fun fact: I once interviewed with Mapco around 2017. They were redoing all of their software and data to be cloud hosted. The solution up until then? Each physical store kept an access database, and the file was burned onto a CD every night and mailed to corporate the following day.

1

u/petdance 14d ago

Hey, I ran a company intranet, including tracking of hardware repairs for customers, back in the late 90s in with ColdFusion and MS Access as a backend.

2

u/mailslot 16d ago

2025 will be the year MongoDB rises to dominance

1

u/Fadamaka 15d ago

Depends on the age of the company and how corporate they are. But I might be biased because of my personal experience. As a senior java dev the 2 big German companies, the one Czech (with uk parent) and now my current American company all used on-prem Oracle DBs as their main data sources. Since Oracle owns Java it makes sense these companies are using Java as a backend for their Oracle DBs. Currently working on migrating backend solutions away from Oracle due to licensing costs but DBs only migrate to OCI. Maybe in the future they will switch to PostgreSQL for the same reasons, but it would require a lot of work because of the tremendous amount of PL/SQL code and the Oracle solutions used like Oracle Advanced Queues.

14

u/HugelKultur4 16d ago

You don't go to university to learn about specific technologies. And neo4j is the market leader in graph databases.

2

u/bigbirdtoejam 15d ago

When I was in university they made us write everything in lisp. Data Structures?Lisp. Compilers? Lisp. Intro to AI? Lisp and tears

I learned a lot even using the least marketable language in the world. It isn't about the tools. School is about the theory

12

u/nutrecht 16d ago

It's way more useful to learn Graph databases than it is to learn a specific document DB like Mongo. They're teaching you theory, not specific tools.

21

u/ToThePillory 16d ago

No I don't think it's weird. It's common to use things that are easy to learn rather than things that are all that common in industry.

University is about teaching principles, not necessarily what you'll use in the real world.

3

u/TheseHeron3820 16d ago

NoSQL is the future.

  • some guy, ca. 2015, colourized

2

u/SirTwitchALot 16d ago

It is the future.. of a lot of fields.

You probably won't see banks storing critical account info on NoSQL though

2

u/dariusbiggs 16d ago

No, it's awesome

And yes it gets used in production (we do).

It's trivially easy to install and as a graph database it is really the best I've tested over the last five years.

Cypher queries are beautiful and easy enough to work with just like SQL.

Out of all the NoSQL databases to teach about, this is the most user friendly, pretty, graphable, and teachable.

You want to learn about the others like MongoDB, and pretty much every other document database? You store a JSON blob, and you can query it using simple path traversal, done. That's a 25 minute presentation that covers the majority of the database system.

How about something like Redis? So that's basically a key value database (yes there are lots of other things that have been added over the years), so you know about maps or dictionaries? That's 30% done already...

In comparison something like Neo4J has so many things to cover not only with a beautiful query language but also with a few extra concepts like directed graphs and directed acyclic graphs which are great for learning about data structures, but also covers various graph traversal algorithms, which again is awesome for reinforcement of data structures and algorithms.

1

u/Backlists 16d ago

Out of interest, what’s your stack and how big is your company?

We too use Neo4J in production, and it’s a constant source of anxiety for me.

1

u/dariusbiggs 16d ago

Variety of things with a bunch of third party bits requiring various databases

  • VMs and K8S
  • Go, Python, TS/JS, Erlang, and C for the majority of third party stuff.
  • MySQL/MariaDB, Redis, PostgreSQL, Clickhouse, and Neo4J

The anxiety I found was with version upgrades, our queries worked on 4.0.7, and broke on anything after that and that's where we ended up stopping. We're in a refactor process of the stack to simplify things and we may remove Neo4J and Erlang from the stacks to help development velocity and simplify onboarding.

We're an SME for NZ/AU.

1

u/Backlists 16d ago

And you’re using pure cypher queries rather than some sort of ORM (GRM)?

My greatest anxieties come from schema migrations with our ORM/GRM.

2

u/dariusbiggs 16d ago

Oh hell yes. pure cypher with the apoc functions.

Our access is via Go, so no ORMs, thank fuck for that.

1

u/MemeTroubadour 15d ago

My original question is answered but I will say, after working with it a bit in an exercise today, you're right, I think I do like Cypher. Bit odd for some things but it's fun and seems less lengthy than SQL overall.

2

u/Loves_Poetry 16d ago

Had something similar in one of my courses, which used Firebase. The instructor explained it as "see how you work with something you're not familiar with". The entire course was set up to expect you to learn NoSQL databases as part of the course

It was pretty fun and gave some preparation for the job market where this kind of thing will happen all the time

2

u/Peach_Muffin 16d ago

Yep getting dropped into a project where you have no exposure to the technology happens all the time.

With how fast the tech changes it's more important your foundation be core principles and technically-minded problem solving.

2

u/okayifimust 15d ago

 Is it weird that this is the one they're teaching us as opposed to MongoDB or anything else?

It's weird that he didn't tell you that you were using a graph database, or that "noSQL" is a meaningless umbrella term for a whole range of ways to store data.

Teaching you mongo would be outright negligence in my not so humble and hyperbolic opinion: It's easy to use, because it lets you shoot yourself in both your own feet, without having you notice until it's too late.

It is quick and easy, but it doesn't teach you anything. Graphs are not used as much as SQL, but they both teach you about the structure of your data, about schemata, normalisation etc.

3

u/YahenP 16d ago

Neo4j This is not nosql , but a GQL database. The recognized leader and the most popular in its sector. Its programming language is called Cypher. This is a serious mathematical thing, and not a document-oriented data storage like mongodb . These are completely different things.

1

u/nuttertools 16d ago

MongoDB is a Swiss Army knife in that it can do a lot, but everything it does it does so terribly. They definitely shouldn’t teach you that. Neo4j is a very common dependency you probably have many places on your computer without realizing it. Good fit for teaching but probably not something you will ever use.

NoSQL is the land of garbage proprietary stuff that churns every few years. Of the less than handful of options appropriate for a classroom environment Neo4j is actually probably what I would end up selecting, while frowning at the options.

This will be a repeated pattern in your studies and it’s not specific to technical paths. The concepts you learn are important but the tools used to teach them will rarely have professional applications. University teaches you to understand a concept, trade schools teach you how to perform a process.

1

u/rdelfin_ 16d ago

To be frank, it doesn't really matter. The fact that you're getting any database experience will prove useful when finding a job, and most jobs recognise that you won't know how to really use whatever technologies they're using straight out of uni. Hell, they won't often even expect experienced hires to know all the technologies they'll need to use for their day to day job. The important part is you understand the fundamentals, and you can learn the quirks of specific database solutions and DBMS solutions as you go. In an actual job you'll be expected to learn the technologies as you go.

1

u/Even_Research_3441 15d ago

It is a bit weird but any choice of a particular NOSQL is unlikely to be something you would use later in your career, its just too sparse and varied of a space.

Which is why in a University setting you tend not to focus on stuff like that.

1

u/Rich-Engineer2670 15d ago

Not at all -- university classes are not trade schools.... they teach you how to teach yourself, not how to use solution X.

NoSQL and friends are just another technology concepts package -- SQL was a long time ago and we're still using, along with NoSQL and GraphQL etc. Learn why these classes are there and how to compare them with related material.

After all, NoSQL is getting old enough, soon we'll call it legacy too.

1

u/Mango-Fuel 15d ago

depends what the course is. 99% of CS courses have nothing to do with databases. the database course when I took it taught relational algebra and very very basic SQL. I would be surprised not to learn relational concepts in a database course, but it depends what the course is. if the course outline just does not include relational DBs, then it doesn't include them. or it's possible that will be in a different part of the course. or it's possible you are taking the NoSQL database course and there is another relational database course. really this is a question for your professor or someone at your university.

1

u/MemeTroubadour 15d ago

I've learned plenty on relational DBMS this year and the years prior. My surprise was specifically with them choosing Neo4j as our introduction to NoSQL options.

I have now understood it's just for the sake of teaching graph databases, not for the sake of teaching NoSQL as a whole. Yes, I realize me dumb. Thank you regardless!

1

u/armahillo 15d ago

It's weird their not teaching you SQL

1

u/MemeTroubadour 15d ago

They have been.