Databases Flashcards
What is a query ?
A query is a command you send to a database to get it to do something, whether that’s to get information out of the database or to add/update/delete something in the database. It can also aggregate information from a database into some sort of overview.
What is a schema ?
If a database is a table in Microsoft Excel, then a schema is the columns. It’s a rigid structure used to model data.
If I had a JSON object of user that looked like { “name”: “Brian”, “city”: “Seattle”, “state”: “WA” } then the schema would be name, city, and state. It’s the shape of the data.
Should schemas be decided in advance ?
Some databases like PostgreSQL have strict schemas where you have to know the shape of your data upfront. Others like MongoDB let you invent it on the fly.
What are some of the DB types you are aware of ?
ACID full form ?
?atomicity, consistency, isolation, durability