A unique identifier for each row in a table
primary key
Two-dimensional structure with rows and columns.
Table
What is a relational database?
A type of database that 'relates' tables to each other.
Specifies how data is sorted in a result set.
Order by
Data vs information
Information - data processed with context.
A field in one table that links to the primary key in another table
Foreign key
Data about data
Metadata
What is D in ACID?
Durability: Once a transaction is committed, it stays committed.
Select everything from the Personnel table.
SELECT * FROM Personnel
Structure or plan of the database which defines the tables and relationships that exist in the database
Schema
Relationships
How tables are connected (one-to-one, one-to-many, many-to-many).
SQL - expand abbreviation
Structured Query Language
The two main actors that participate in any database transaction
Client and server
What are wild card characters in SQL?
* % _
Function returns the average value of a numeric column.
AVG()
First Normal Form (1NF)
Eliminate repeating groups and ensure atomic values
Third Normal Form (3NF)
Meet 2NF and remove transitive dependencies.
What is A in ACID?
Atomicity. All or nothing. If any part of the transaction fails, the entire transaction is rolled back.
A function returns the total sum of a numeric column.
SUM()
Select all customers that start with the letter "a":
SELECT * FROM Customers
WHERE Name LIKE 'a%';
Second Normal Form (2NF)
Meet 1NF and remove partial dependencies
The database remains in a consistent state before and after the transaction.
Consistency
What is I in ACID?
Isolation. Transactions don't interfere with each other.
How do you add comments to SQL?
Use the syntax /* */ or --
Add Name Bob to the Customers table
INSERT INTO Customers (Name, ) VALUES ('Bob');