Databases
Last updated
Last updated
MySQL
PostgreSQL
MariaDB
Oracle DB
SQL Server (Microsoft)
SQLite
Amazon RDS
SQL (Structured Query Language) is a programming language used to communicate with data stored in a relational database management system. SQL syntax is similar to the English language, which makes it relatively easy to write, read, and interpret.
to design a performant and future-proof database
eliminate redundant data
maintain accuracy and integrity
provide quick access
steps:
identify the purpose of the database
how do clients want to access the data?
gather structure of data included, and list types
break down information into smallest useful pieces
avoid including the same data point in more than one table
organize data into tables
each row in the table is a record
assign the appropriate data type to each column
char - specific length of text
varchar - texxt of variable lengths
text - large amount of texts
int - positive or negative whole number
float, double - stores floating point numbers
blob - binary data
auto-number (automatically generates unique number in each row, can be used as a key)
determine keys + relationships
primary key - a unique id for an entry, one of a kind, used for identifying and querying a specific record
primary keys cannot be null nor empty
composite key - primary key that is multiple fields
normalize databases
Types of Database Relationships
data definition language
database management system
database performance level
storage space
cardinality - quantify of elements that interact between two related tables
one to one relationship - there's only one instance of A for every instance of B