databases - organized collection of data that's accessible, manipulable, and analyzable.
- data types include authentication credentials (usernames/passwords)
- also includes content like posts, comments, likes
2 Primary Database Types
- relational databases (SQL)
- structured data format
- user data example:
first_name, last_name, email, username password
- organized entry for each new user
- row/column storage
- connects multiple tables (
user order_history)
- non-relational databases (NoSQL)
- stores data in non-tabular format

{
_id: ObjectId("4556712cd2b2397ce1b47661"),
name: { first: "Thomas", last: "Anderson" },
date_of_birth: new Date('Sep 2, 1964'),
occupation: [ "The One"],
steps_taken : NumberLong(4738947387743977493)
}
Two types of keys:

- Primary Keys: ensure unique data in a column.
- Provides unique ID for each record
- Column chosen as primary key;
id typically used for uniqueness
- Only 1 primary key column allowed per table
- Foreign Keys: Column in one table that references another table
author_id in Books table → links to id in author table
- Enable relationships between tables in relational databases
- Multiple foreign key columns allowed in a table
Databases are managed via Database Management Systems (DBMS)
- interfaces between users and databases
- enables data retrieval, updates and management
- examples: MySQL, MongoDB, Oracle, Maria DB
SQL (Structured Query Language) queries, defines and manipulates relational database data
Database Statements