Databases

What is a 'database'?

A database is a organized collection of data stored in a way that allows easy access, management, and retrieval of information. It serves as a repository for storing and organizing various types of data for efficient manipulation and use in applications or systems

SQL

The good old (relational) databases

Relational databases organize and store data in tables with relationships defined between them for efficient querying and management

SQL (Structured Query Language)

SQL is a standardized programming language designed to interact with relational databases, performing tasks like data retrieval, modification, and administration through structured queries

NoSQL

The N(ot only)SQl

Non-relational databases, also known as NoSQL databases, are systems designed for storage and retrieval of data models that are not based on the traditional tables of rows used in relational databases but on collections of documents

NoSQl queries

NoSQLqueries are commands used to retrieve, manipulate, and interact with data stored in NoSQL databases, employing a flexible document-based model for data representation and retrieval

Similarities

Both SQL and NoSQL:

- aim to store and manage data efficiently for applications

- provide mechanisms to query and retrieve data based on specific criteria

- support indexing to enhance data retrieval performance

- can scale horizontally to accommodate increasing data volumes and user loads

- often provide support for transactions to ensure atomicity, consistency, isolation, and durability (ACID properties) for certain operations

Differences

SQL vs NoSQL:

- SQL databases follow a rigid schema for data organization, while NoSQL databases offer a more flexible approach

- SQL databases use SQL (Structured Query Language) for queries, whereas NoSQL databases use various query methods

- SQL databases mostly emphasizes relationships between tables, whereas NoSQL databases focus on non-relational models

- SQL databases excel at complex queries, while NoSQL databases excel at handling large scale of semi-structured data

- SQL databases are more for data consistency, while NoSQL databases are morefor flexibility and rapid scalability