Relational Data Explained
Normalization Explained
Minimizes data duplication and enforces data integrity.
- In practice
- Separate each entity into its own table.
- Separate each attribute into its own column.
- Uniquely identify each entity instance using a primary key.
- Use foreign key columns to link related entities.
SQL Explained
Structured Query Language is the language used to interact with a relational database.
SQL statement types
Data Definition Language (SQL statements)
Manage tables, stored procedures, views and more.
- Create:
- Create a new object in the database, such as a table or a view.
- Alter:
- Modify the structure of an object. Add a new column for example.
- Drop:
- Remove an object from the database.
- Rename:
- Rename an existing object.
Data Control Language (SQL statements)
Control access to database objects
- Grant:
- Grant permission to perform specific actions
- Deny:
- Deny permission to perform specific actions
- Revoke:
- Remove a previously granted permission
Data Manipulation Language (SQL statements)
Working with the rows stored in tables
- Select:
- Read rows from a table
- Insert:
- Insert new rows into a table
- Update:
- Modify data in existing rows
- Delete:
- Delete existing rows
Database Objects List
Views (Database Objects)
A virtual table, that is the result of a Select query.
A way to present specific data from one or more tables as a single, unified object.
- You can select from this.
Stored Procedures (Database Objects)
Collection of SQL statements that can be run on demand. Encapsulate logic within the database.
Indexes (Database Objects)
Data structure to make locating values in a table faster.