1.3.2 Databases Flashcards
What is a Database?
An organised collection of information stored by a computer
What is an Entity?
A category of object, person, or thing, about which data needs to be recorded
What is a Record?
Data about a specific entity (rows of a database)
What is a Field?
A category of information about an entity (columns of a database)
What is a Primary Key?
An attribute that uniquely identifies a particular record.
e.g.
Customer (CustomerID, title, firstname, surname, email)
Product (ProductID, title, price)
Subscription (SubID, startDate, endDate)
What is a composite primary key?
When two or more attributes are used to uniquely define
a record
e.g.
Grade(firstName, lastName, class, teacher, grade)
Why are primary keys indexed? (2 points)
So that they can be searched for faster
If another attribute is also indexed, that is
called a Secondary Key
What is Normalisation?
A process for organising data in a database to reduce
redundancy and improve data integrity.
What is 1st Normal form? (3 points)
Data is atomic
No repeated fields
Data has a primary key
What is 2nd Normal form? (2 points)
Data is in 1NF
Has no partial dependencies
What is 3rd Normal form? (2 points)
Data is in 2NF
Has no non-key dependencies
What is a Flat File Database?
A database containing only one table
e.g.
Grades(gradeID, student, class, grade, subject teacher)
What is a Relational Database?
A database containing more than one table
e.g.
Grade (gradeID, student, class, grade)
Class (class, subject, teacher)
What is a foreign key?
A field that references the primary key of another table
What is transaction processing? (2 points)
Transactions need to be
accurate.
* Multiple users need to
interact with a database at
the same time.