4. Database Design and the E-R Model Flashcards

1
Q

What’s the point of the design process?

A
  • Need to meet the aims of the enterprise
  • Specification of user requirements
  • Interaction with domain experts required
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 3 main phases of the design process?

A
  • Conceptual design phase (ER diagram)
  • Logical design phase (map ER to Relational / OO / …)
  • Physical design phase (file organisation, indexing, …)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How can a database be modelled relative to entities?

A

A database can be modelled as a collection of entities, with relationships among entities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an entity?

A

An object that exists and is distinguishable from other objects
e.g specific person

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is an attribute?

A

Entities have descriptive properties called attributes

e.g people have names and addresses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an entity set?

A

A set of entities of the same type that share the same set of attributes
e.g set of all persons

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the 5 attribute types?

A

• Simple, which compromise of a single component part
e.g salary
• Composite, which compromise multiple component parts
e.g address is made up of house name, street etc
• Single-valued, can only have one value per entity
e.g date of birth
• Multi-valued, may have more than one value per entity
e.g phone number for home, work etc
• Derived, attributes are computed from other attributes
e.d age is calculated from date of birth and current date

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a relationship?

A

An association that exists between entities, and like entities, relationships are uniquely identifiable
e.g a specific person works at a specific company

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a relationship set?

A

A set of relationships between one or more entity sets

e.g set of all pairs of persons working for companies

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a binary relationship set?

A

Involves two entity sets, most relationship sets in a database system are binary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a N-ary relationship set?

A

An example of this is students work on research projects under the guidance of an instructor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are multiplicity constraints?

A

Number of times an entity can or must take part in a particular type of relationship

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is participation?

A

The minimum number of times an entity must take part in a relationship set
• Total participation means an entity must take part in the relationship set
• Partial participation means an entity may or may not take part in the relationship set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is cardinality?

A

The maximum number of times an entity can take part in a relationship set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the 4 types of mappings for cardinality constraints?

A
  • One to one
  • One to many
  • Many to one
  • Many to many
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a candidate key?

A
A candidate key of an entity set is a minimal set of attributes that uniquely identifies each entity
e.g Consider module with attributes code, title, and credits. Candidate keys are code and title
17
Q

What is a primary key?

A
A primary key of an entity set is the candidate key that is chosen to uniquely identify each entity
e.g Primary key for module is code
18
Q

What is a weak entity set?

A

An entity set with no candidate keys, so it depends on the existence of an identifying entity set(s)
• Weak entity set must have total participation in relationship with identifying entity set(s)
• Must be one-to-many relationship from each identifying set to the weak entity set

19
Q

What is a discriminator?

A

The discriminator (or partial key) of a weak entity set is the set of attributes that distinguishes among all the entities of a weak entity set.

20
Q

How would you form the primary key of a weak entity set?

A

The primary key of a weak entity set is formed by the primary key(s) of the identifying entity set(s), plus the weak entity set’s discriminator.