Explain the difference between SQL and NoSQL databases
SQL
* relational databases
* use structured tables
* use a standardized query language for data manipulation
NoSQL
* more flexible data models
* handling unstructured or semi-structured data
What are some advantages and disadvantages of SQL
What are some advantages and disadvantages of NoSQL
What scenarios would you recommend using SQL over NoSQL
Describe the ACID properties in database transactions
What trade-offs might be involved in maintaining ACID properties?
Explain the concept of indexing in databases
Indexing accelerates data retrieval by creating efficient access paths
What are the different types of database indexes?
Some common indexes are B-tree and hash indexes
How does indexing enhance query performance?
Indexing makes columns faster to query by creating pointers to where data is stored within a database
What factors should be considered when choosing columns to index?
Discuss the importance of database normalization
What are the different normal forms?
How does normalization contribute to efficient data storage and maintenance?
Are there scenarios where denormalization might be preferable?
What does CAP stand for?
Consistency, Availability, and Partition Tolerance
How does the CAP theorem describe the trade-offs between consistency, availability, and partition tolerance in distributed systems?
CAP theorum states that in a distributed system, it’s impossible to achieve all three of Consistency, Availability, and Partition Tolerance simultaneously
Can you provide an example of a database that emphasizes each aspect of the CAP theorum?
MongoDB
* a NoSQL database
* emphasizes consistency and partition tolerance
* ensures data consistency and availability under network partitioning
CassandraDB
* emphasizes availability and partition tolerance
* may occasionally sacrifice strong consistency
What is partition tolerance?
The ability to continue to work despite any number of communication breakdowns between nodes