Introduction to Database | SQL vs NoSQL | Why and when to choose which database

preview_player
Показать описание
Database
Collection of data that is organized and stored in a way that allows for efficient retrieval, management, and manipulation of that data.

Types of Databases
Relational Databases (RDBMS)
- Data organized into structured tables with rows and columns.
- Uses SQL (Structured Query Language) for data manipulation.
- Examples include MySQL, PostgreSQL, Oracle, and SQL Server.

NoSQL Databases
- Designed for unstructured or semi-structured data.
- Flexible schema design and scalability
- Example MongoDB (document store), Redis (key-value stores), Cassandra (column-family store), and Neo4j (graph database), etc.

Document Databases
- Store and retrieve data in JSON, XML, or BSON format.

Key-Value Stores
- Data stored as key-value pairs.
- Fast retrieval, ideal for caching and session management.

Column-oriented databases
- Organizes data into column families rather than tables.
- Efficient for read-heavy workloads and time-series data.
- Example: Apache Cassandra.

Graph Databases
- Designed for data with complex relationships.
- Uses graph structures to represent and query data.

Network Database
- The network database model allows records from more than one table to be associated with a single owner record of another table.
Example: Ingres Database

Realtime Database
- Data is synced across all clients in realtime and remains available when your app goes offline.
Example: Firebase Realtime Database

- SQL, NoSQL and differences

- Relationships: Databases allow you to establish relationships between different tables
Helps in modeling complex data structures and ensuring data consistency
- DBMS: Database Management System.Manages and controls access to the database.

- SQL: Structured Query Language. - Used to communicate with relational databases.
- Indexes: Used to optimize the retrieval of data from tables.
- Normalization: Use to organize data in a database to reduce redundancy and improve data integrity.

- Transactions, Security, Security

- SQL vs NoSQL
Why SQL?
- Acquired a steady user base since the 1970s.
- Optimized for working with structured data.
- Provide a stronger guarantee of data normalization.
- Use a well-known querying language, SQL.
- Relational database is more flexible and easier to manage.

Why NoSQL?
- Flexible schema
- MongoDB provides schema validation, you can lock down your schema as much or as little as you'd like.
- MongoDB provides the ability to join documents through operations that match a variety of needs, such as $lookup, as well as through references.
- MongoDB supports transactions, which guarantees the atomicity of reads and writes to multiple documents.

Why NoSQL – Think about this…
- Using MongoDB (a distributed database) satisfies the needs of both a traditional, structured data set and a dataset that requires a flexible schema to allow for changing application procedures.

SQL (Structured Query Language)
- A special language that helps us talk to a database and ask it questions.
Imagine a library as our database, and we want to use SQL to find books in the library.

SELECT title
FROM library_catalog
WHERE author = 'Sayed Azhat Sabri';

DDL (Data Definition Language)
- DDL commands are used to define and manage the structure of a database, including creating, altering, and deleting database objects like tables, indexes, and constraints.

DML (Data Manipulation Language)
DML commands are used to manipulate data stored within a database

#database
#sql
#nosql
#sqlvsnosql
#mognodb
#cache
#whymongodb
#whysql
#whynosql
#learninhindi
#bestteacher
#kahanseseekhein
#programmingseekhnekaasaantareeka
#programmingforall
#codeeasily
#asanisekaiseseekhein
#easyway
#easiestway
#bestway
#withexample
#realway
#realimplementation
#modernway
#CodeByHeart
#code by heart
#sayed azhar sabri
#sayedazharsabri
#azharsir
#AzharSir
#hindi
#urdu
Рекомендации по теме
Комментарии
Автор

Attended this workshop – I appreciate the clear and concise introduction to databases and the comparison between SQL & NoSQL. Looking forward to more informative content like this! 👍🏻

niveditakaur
Автор

Bahut lambi hai video i hope 15 to 20 minutes me nipta dete 😂

skgamer.
visit shbcf.ru