Fundamentals of Databases Flashcards
What is a entity?
A category of object, person, event or thing of interest about which data needs to be recorded.
What is a attribute?
An identifier of what data is stored in the entity.
What is a primary key?
A attribute that uniquely identifies a particular record.
What is a composite primary key?
When two or more attributes are used to uniquely identify a record.
What are the possible relationships between databases?
one-to-one
one-to-many
many-to-many
What is a foreign key?
When the primary key of one table is in another table.
What is a flat-file database?
Where only one table holds all the data.
What is a relational database?
Where data is stored on multiple tables.
What conditions have to be met for a data to be 1st normalised form ?
No repeating attributes
All attributes are atomic.
What conditions have to be met for a data to be 2nd normalised form?
In 1NF
No partial dependencies on composite key.
What conditions have to be met for a data to be 3rd normalised form?
In 2NF
No non-key dependencies
What is the SQL statement to return certain items?
SELECT fields
FROM tables
WHERE conditions
What is the SQL statement to organise data returned?
ORDER BY (ASC/ DESC)
What does the SQL statement LIKE do?
WHERE … LIKE …
Selects data that starts/ ends with a certain character. (St*)
What does the SQL statement BETWEEN do?
WHERE … BETWEEN … AND …
Returns data values between the values given.