MongoDB

MongoDB Introduction NoSQL databases are non-relational databases that are used to store and retrieve data. MongoDB is a popular NoSQL database that is used to store data in the form of documents. Feature SQL (Relational Databases) NoSQL (Non-Relational Databases) Schema Fixed schema Dynamic schema for unstructured data Scalability Vertical scalability (scale-up by adding more powerful CPU, RAM, SSD) Horizontal scalability (scale-out by adding more servers) Complexity Tables with rows and columns, complex queries with JOINs Document, key-value, wide-column, or graph formats, simpler queries Transactions ACID properties (Atomicity, Consistency, Isolation, Durability) for reliable transactions BASE properties (Basically Available, Soft state, Eventual consistency) less strict than ACID Development Model Mature, with established standards More flexible and evolving rapidly Use Cases Well-suited for complex queries and transactions, e.g., banking systems Well-suited for hierarchical data storage, big data solutions, and real-time web applications Data Integrity High, due to ACID compliance Variable, depending on the specific NoSQL system and its configuration Query Language Structured Query Language (SQL) is standardized No standard; queries are based on the specific NoSQL database system (e.g., MongoDB uses BSON) Relationship Handling Efficient handling of relationships between entities Relationships can be handled, but often less efficiently than SQL databases; denormalization is commonly practiced Installation There are two ways of working with a mongoDB database, one is to run it locally on your machine and the other is to use a cloud service like MongoDB Atlas. For this tutorial, we will be using MongoDB with mongosh and compass installed. ...

June 27, 2024 · 4 min · 709 words · Aum Pauskar

Database management and SQL

Sql documentation Installation The installation and usage of MySQL can be done in many ways; one is to install WAMP/XAMPP server and using SQL through it another is to use an online sql emulator, the best way is to use a MySQL server. Getting started with MySQL All the operations in SQL can be classified into 3 types DDL: Data definition language includes operation like create, alter, drop DML: Data manipulation language includes operation like select, insert, update, delete DCL: Data control language includes operations like commit, rollback, grant, revoke ...

November 16, 2023 · 10 min · 1996 words · Aum Pauskar