Data Models and Query Languages Flashcards
Why are data models the most important part of building a software?
Data models determine how the software is written and also affects how we think about the problem at hand to be solved.
What is the motivation behind NoSQL
- To achieve a greater level of scalability than relational db currently offers
- Widespread adoption of open source software over commercial one
- To be able to write highly specialized queries that may be a pain in relational dbs
- To be able to be more expressive with schemas and not being tied to the restrictiveness of relational dbs
What is impedance mismatch
Impedance mismatch refers to the disconnect between the data model used to build applications (objects) and the data model used in dbs to store data (table, rows, colums)
Random thought
Anything that is understandable to a user is most likely to change. Hence it is best to store such information in a referential manner to avoid duplication
What are the arguments in favor of document databases (as per data model)?
- Schema flexibility
- Data model is really close to application model
- Data locality (through embedded data)
What are the arguments in favor of relational databases (as per data model)?
- Great support for joins
2. Better representation of many-to-many and many-to-one relationships
Random
Document db is good for analytics
Declarative code can easily be parallelized at the implementation level as it only describes a pattern rather than the exact steps that needs to be taken
Are document dbs schemaless?
Not really, they do not enforce schema while performing write operations, however, the engine that reads data from the db assumes a format(schema) for the data being read.
Hence document dbs are more SCHEMA-ON-READ as opposed to relational’s SCHEMA-ON-WRITE
Are document dbs schemaless?
Not really, they do not enforce schema while performing write operations, however, the engine that reads data from the db assumes a format(schema) for the data being read.
Hence document dbs are more SCHEMA-ON-READ as opposed to relational’s SCHEMA-ON-WRITE. (think dynamic typing vs static typing)
Mapreduce style querying is used for?
Mapreduce style querying is used to process large amounts of data across multiple machine. It’s query language is sweet in the middle between imperative and declarative