Data Flashcards
(81 cards)
What is the data structure used in SQL?
Tables with rows and columns
What type of data structure is used in NoSQL?
Document-based, key-value, column-family, or graph-based
What type of schema does SQL use?
Fixed schema (predefined structure)
What type of schema does NoSQL have?
Flexible schema (dynamic and adaptable)
What is the scalability method for SQL databases?
Vertically scalable (upgrading hardware)
What is the scalability method for NoSQL databases?
Horizontally scalable (adding more servers)
What does ACID stand for in SQL?
Atomicity, Consistency, Isolation, Durability
What does BASE stand for in NoSQL?
Basically Available, Soft state, Eventually consistent
What is the query language used in SQL?
SQL (Structured Query Language)
What type of query language is used in NoSQL?
Varies (e.g., MongoDB uses its own query language)
Which type of database is efficient for complex queries and transactions?
SQL
Which type of database is better for large-scale data and fast read/write operations?
NoSQL
What are the best use cases for SQL databases?
Transactional systems (banking, ERP, etc.)
What are ideal use cases for NoSQL databases?
Big data, real-time web apps, and data lakes
Name an example of an SQL database.
MySQL, PostgreSQL, Oracle, MS SQL Server
Name an example of a NoSQL database.
MongoDB, Cassandra, CouchDB, Neo4j
What is SQL?
SQL stands for ‘Structured Query Language’ and is used in managing data in relational database management systems (RDBMS) since the 1970s.
SQL databases focus on reducing data duplication.
What type of database is SQL?
Relational database
SQL databases store data in rows and tables that are linked in various ways.
What are the key characteristics of SQL databases?
- Predefined schemas
- Relational structure
- Fast data storage and recovery
- Ability to handle complex SQL queries
SQL databases can link one record to another or many records to many others.
What is a NoSQL database?
NoSQL is a non-relational database that allows different structures than a SQL database and offers more flexibility.
The term ‘NoSQL’ was coined in the early 2000s and does not mean that SQL commands are not used.
What does NoSQL stand for?
Not only SQL
The term emphasizes that NoSQL databases can support some SQL commands.
What are the key differences between SQL and NoSQL databases?
- Relational (SQL) vs. non-relational (NoSQL)
- Predefined schemas (SQL) vs. dynamic schemas (NoSQL)
- Scaling methods
- Data types included
- Fit for multi-row transactions (SQL) vs. unstructured data (NoSQL)
These differences make each type of database suitable for different use cases.
Fill in the blank: SQL databases are better suited for _______.
multi-row transactions