SQL and NoSQL Databases Flashcards
What is Open-source?
- type of computer software in which the copyright holder grants users the right to study, change, and distribute the software for any purpose
What is relational databases?
- designed for all purposes
- ACID (Atomicity, Consistency, Isolation, Durability)
- Mathematical background
- Vertically scalable (but not horizontally = over multiple computers)
What does SQL mean?
- Standard query language
What characterizes NoSQL databases?
- Rather called “not only SQL” than NoSQL
- Non-relational
- Cluster friendly, Horizontal scaling
- Schema-less = No burden of up-front schema design
- 21 century web
- Open source
- Minimum overhead
- Solution to impedance mismatch
- Examples: Redis, MongoDB, Cassandra etc.
What are the pros and cons of SQL databases?
What are the pros and cons of NoSQL databases?
What are the 4 different aggregate data model families?
- Key-value data models
- Column-family
- Document-based
- Graph
What are Key-value Data models about?
- use of hash table
- you access data/values by strings called keys
- data has no required format
What are Column-Family Data models about?
- the column is the smallest instance of data
- A tuple containing a name, a value and a timestamp
- Facebook went from reading 50gb data in 350ms to 15ms by rewriting using Cassandra instead of MySQL
What are Graph Data Models about?
- Scale vertically
- No clustering
- Transactions
- Acid
- This is Neo4J
*
What are Document-based Data Models about?
- Usually JSON like interchange model
- Query model: javascript-like or custom
- Indexes are done via B-trees
- Unlike simple key-value stores, both keys AND values are fully searchable in document databases
What are the two ways of finding relations in a database within MySQL Workbench?
- Check the script for “KEY”s / Foreign keys
- Go ask MySQL Workbench to generate the table for a particular table and you can see the contents.
In MySQL workbench, how would you find # the addresses and name of the customers who live in Paris?
select customerName, addressLine1 from customers where city=’Paris’;
In MySQL workbench, how would you find # the addresses and name of the customers who live in Paris OR Frankfurt?
select customerName, addressLine1 from customers where (city=’Paris’ OR city=’Frankfurt’);
what is the mod-operator?
Mod means “remainder”