CS50's Introduction to Databases with SQL
I’m taking CS50’s Introduction to Databases with SQL on edX as a refresher, and a way to cement my fundamental knowledge of databases. I’ve used SQL a bunch, but never really formally sat down to learn things, so this should be good for me.
- A DBMS is a way to interact with a database
- SQL is a language used to interact with data in a database
- Relational databases usually have several tables with related data, and keys are used to relate data
- Entity relationship diagrams are used to visualise the schema of data in a database
- A database schema defines the tables and columns in a database
- Table constraints impose restrictions on values in tables
- SQLite imports from CSV as text data by default
- SQL triggers are statements that run in response to other statements
- A view is a virtual table defined by a query
- Scanning each row in a database can be slow, you might want to use an index
- Clean up unused space in a database using vacuum or optimise
- Transactions are single units of work in a database, and they can help guard against Race conditions if transactions are made to be sequential using Transactional locking
I should probably work through this course from Greg Wilson too: The Querynomicon: An Introduction to SQL for the Cautious and Weary