Define data model
An abstract model of which things to store and what information about them should be recorded
Define attribute
A characteristic of an entity
Name the three possible degrees of relationship between tables in a database
One-to-one; One-to-many; Many-to-many
Define entity
A thing about which data is to be stored
What name is given to an attribute which can uniquely identify each attribute in a table?
Entity identifier / Primary key
Why are databases normalised?
So that they can be at their most efficient without compromising data integrity
What name is given to a primary key formed from multiple different attributes?
Composite primary key
What name is given to the new table created when forming a many-to-many relationship?
Link table
What is the definition of the third normal form
All non-key attributes depend on the key, the whole key and nothing but the key
Which declarative language is used to query databases?
SQL
What does SQL stand for?
Structured Query Language
What is the purpose of SQL?
To query, update, and manage relational databases
What is a foreign key?
An attribute in one table that refers to the primary key of another table
Define referential integrity
Ensuring that a foreign key value always refers to an existing, valid primary key in another table
What is the difference between DDL and DML in SQL?
DDL (Data Definition Language) defines structures (CREATE, ALTER), while DML (Data Manipulation Language) modifies data (INSERT, UPDATE, DELETE)
What does SELECT do in SQL?
Retrieves data from a table
What does WHERE do in SQL?
Filters records based on a condition
What does ORDER BY do in SQL?
Sorts query results in ascending or descending order
What does GROUP BY do in SQL?
Groups rows that have the same values in specified columns into summary rows
Name the four types of JOIN in SQL
INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN
What does UNION do in SQL?
Combines the results of two SELECT statements into one result set
What does CREATE TABLE do?
Defines a new table and its columns in the database
What does DROP TABLE do?
Deletes a table and all of its data from the database
What does ALTER TABLE do?
Modifies an existing table (e.g., add/remove columns)