Professional Documents
Culture Documents
Mis - Lect 5
Mis - Lect 5
Information Systems
Lecture - 5
There are 7 types of keys in databases. We will only look at the
following three types.
Primary Key
A primary is a column or set of columns in a table that uniquely
identifies rows in that table
Keys Super Key
A super key is a set of one of more columns (attributes) to uniquely
identify rows in a table.
Foreign Key
Foreign key is the primary key that links the other table with it
There are three types of relationships between tables of a
database.
One-to-One
Relationships
One-to-Many
Many-to-Many
Visual
A JOIN clause is used to combine rows from two or more tables,
based on a related column between them.
INNER JOIN: Returns records that have matching values in both
tables
LEFT JOIN: Returns all records from the left table, and the
Joins matched records from the right table
RIGHT JOIN: Returns all records from the right table, and the
matched records from the left table
FULL JOIN: Returns all records when there is a match in either left
or right table
Joins Visual