DP 900 - Relational Databases

Relational Databases - 21 Cards
Click here to toggle all cards
Relational Databases
Relational databases are modeled using tables and relationships.
Table
A table contains columns and rows. All rows in a table have the same set of columns.
Primary Key
A primary key is a column or combination of columns that uniquely identify each row in a table.
Foreign Key
A foreign key provides a link between data in two tables.
SQL
SQL is the language used to perform operations on relational databases.
Data Definition Language (DDL)
DDL is used to create and modify the structure of database objects.
Data Query Language (DQL)
DQL is used to perform queries on the data.
Data Manipulation Language (DML)
DML is used to insert, update, or delete data.
Data Control Language (DCL)
DCL is used to manage permissions and other controls.
Transaction Control Language (TCL)
TCL is used to control transactions within a database.
Index
An index allows for efficient data retrieval from a database.
View
A view is a virtual table mapped to a query.
Normalization - Goals
The goals of database normalization are high data integrity and minimum data redundancy.
First Normal Form (1NF)
1NF requires that each column have a single, atomic value.
Second Normal Form (2NF)
2NF eliminates redundant data by creating separate tables for related data.
Third Normal Form (3NF)
3NF moves columns not directly dependent on the primary key to another table.
Transaction
A transaction is a sequence of operations that need to be atomic.
Atomicity
Each transaction is atomic (either succeeds completely, or fails completely)
Consistency
Database must be consistent before and after the transaction
Isolation
Multiple Transactions occur independently in parallel
Durability
Once a transaction is committed, it remains committed even if there are system failures (a power outage, for example)