Data Models and Query Languages Flashcards

1
Q

Why are data models the most important part of building a software?

A

Data models determine how the software is written and also affects how we think about the problem at hand to be solved.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the motivation behind NoSQL

A
  1. To achieve a greater level of scalability than relational db currently offers
  2. Widespread adoption of open source software over commercial one
  3. To be able to write highly specialized queries that may be a pain in relational dbs
  4. To be able to be more expressive with schemas and not being tied to the restrictiveness of relational dbs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is impedance mismatch

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Random thought

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the arguments in favor of document databases (as per data model)?

A
  1. Schema flexibility
  2. Data model is really close to application model
  3. Data locality (through embedded data)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the arguments in favor of relational databases (as per data model)?

A
  1. Great support for joins

2. Better representation of many-to-many and many-to-one relationships

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Random

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Are document dbs schemaless?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Are document dbs schemaless?

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Mapreduce style querying is used for?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly