Deck 1 - Higher Computing - Database Design And Development Flashcards
1
Q
Why do we need end user / functional requirements?
A
- To clarify the design of the database.
- To identify the features to be implemented on the database
- To evaluate whether the system is fit for purpose after development is complete
2
Q
What are end user requirements?
A
- What the users want the database to do
3
Q
What are functional requirements?
A
- What the database must be able to do
4
Q
What is an entity?
A
- A table that will be used to store data
5
Q
What is an entity occurrence?
A
- A specific example of an entity
- For example, John Smith, Mary McLeod and Omar Shaheed are all entity occurrences found in the Student entity; English, Computing and Chemistry are all entity occurrences within the Subject entity
6
Q
What is an attribute?
A
- Attributes are the fields in each entity occurrence
- For example, an employee would have attributes such as:
- ID number
- Name
- Role
- Salary
etc.
7
Q
Name the terminology used in an Entity-Relationship Diagram.
A
- Entity
- Attribute
- Primary key
- Foreign key
- Compound key
- Relationship
- Cardinality
8
Q
What is a primary key?
A
- A primary key is a field that uniquely identifies a record in a table
9
Q
What is a foreign key?
A
- A foreign key can be described as a primary key from one table being found in another
10
Q
What is a compound key?
A
- A compound key is a key made up of two or more primary keys. (e.g. studentID + teacherID)
11
Q
What is a relationship?
A
- A relationship is a natural association between one or more entities
- For example, Students learn Subjects and Teachers educate Students
12
Q
What is cardinality?
A
- Cardinality refers to the participants in a relationship
- These include:
- one to one
- one to many
- many to many
13
Q
Describe a one-to-one relationship?
A
- In a one-to-one relationship, each entity occurrence in an entity is associated with one, and only one, entity occurrence within a
related entity - For example, a School is managed by one, and only one,
Headteacher, with a Headteacher managing one, and only one,
School
14
Q
Describe a one-to-many relationship.
A
- In a one-to-many relationship, each entity occurrence
in an entity can be associated with one or more entity
occurrences in a related entity - For example, a School employs many Teachers and
each of those Teachers is employed by one School
15
Q
Describe a many-to-many relationship.
A
- In a many-to-many relationship, several entity occurrences in an entity can be associated with multiple entity occurrences in a
related entity - For example, many Students study several different Subjects and each of those Subjects is studied by many Students
- Direct many-to-many relationships between two entities cannot
be implemented by a relational database system. To overcome this many to many relationships are resolved to one to many
relationships