DEV Community

John Rush
John Rush

Posted on

SQL, NoSql, and 5 DB types you'll never need

Funny Programmer Meme

Hey there, fellow codebreakers!

Grab your favorite snack, put on your wizard hat, and let me guide you through this journey with a touch of humor, sarcasm, memes – and yes, even some solid information!

1. Relational

"The relational database management system is one of the most successful ideas in history." – Me, just now

SELECT * FROM users WHERE age > 18;
Enter fullscreen mode Exit fullscreen mode

Relational databases have dominated the scene for decades with SQL ruling them all. They use tables to store data, making it easy to establish relationships between different entities. Oracle dominates enterprise while MySQL backs platforms like YouTube and Facebook.

But hey! It's not perfect... let's see what else is out there!

2. Key-Value

Key Value Store meme

db.set("key", "value");
Enter fullscreen mode Exit fullscreen mode

Next up, key-value stores! Think Redis or Amazon DynamoDB here. These bad boys provide blazing-fast access to values based on their keys - like looking up someone in your phonebook using their name (remember those?). Great for caching and super-scalable!


    "_id": "123",
    "name": "Bob",
    "job": {
        "title": "CEO",
        "company": {
            "_id": '456',
            'name': 'MarsX'
Enter fullscreen mode Exit fullscreen mode

Document-based databases like MongoDB store semi-structured JSON-like data. They're super flexible, so you can add or remove fields on the fly without losing sleep over schema changes (unlike in relational databases). Perfect for apps with ever-evolving requirements!

4.Wide Column

from cassandra.cluster import Cluster

cluster = Cluster()
session = cluster.connect('mykeyspace')
result = session.execute("SELECT * FROM users")
Enter fullscreen mode Exit fullscreen mode

Wide column stores like Apache Cassandra and HBase are designed to store massive amounts of data across multiple nodes. Think billions of rows and millions of columns! Great for time series data, IoT, and analytics - Big Data nerds rejoice!


Graph Database Gif

MATCH (u:User)-[:FRIENDS]->(f) WHERE"Alice" RETURN f;
Enter fullscreen mode Exit fullscreen mode

Relationship status: It's complicated. Graph databases like Neo4j shine when it comes to handling complex relationships between entities. A perfect match for social networks, recommendation engines, and anything that involves traversing through a web of interconnectedness.

6.Search Engine{
    index: 'books',
    body: {
        query: {
            match_phrase_prefix: {
                title: "The Hitchhiker's"
Enter fullscreen mode Exit fullscreen mode

Search engine databases such as Elasticsearch go beyond your average database by offering advanced text search capabilities. Find what you need even if you misspell "Hitchhiker's Guide to the Galaxy." Say goodbye to Ctrl-F forever!


Last but not least... multi-model databases! Why choose one paradigm when you can have them all? Databases like ArangoDB let you work with key-value pairs, documents, AND graphs. It's the Swiss Army Knife of databases - and who doesn't want that in their toolbox?

And there you have it!

Now go forth and conquer your data challenges with newfound wisdom, wit, sarcasm, and maybe even a few laughs. Happy coding!

Databases Gif

Follow me or say hello on twitter: johnrushx

Top comments (3)

rickdelpo1 profile image
Rick Delpo

Nice and concise and sarcastic? Definately Informative!!

I dumped SQL for NoSQL plain JSON Document db only for small dashboard projects. Here is an example of a Plain Javascript Stacked Bar Chart Sales Dashboard with a pure JSON Backend (data stored in AWS S3) and also no JS Libraries

rickdelpo1 profile image
Rick Delpo

I wrote a Dev article on deciding whether to SQL or to NoSQL
you can find it here

johnrushx profile image
John Rush

Personally I've used NoSql in most project, since it's schemaless and much better for quick iterations.