4. Database Design and the E-R Model Flashcards
What’s the point of the design process?
- Need to meet the aims of the enterprise
- Specification of user requirements
- Interaction with domain experts required
What are the 3 main phases of the design process?
- Conceptual design phase (ER diagram)
- Logical design phase (map ER to Relational / OO / …)
- Physical design phase (file organisation, indexing, …)
How can a database be modelled relative to entities?
A database can be modelled as a collection of entities, with relationships among entities
What is an entity?
An object that exists and is distinguishable from other objects
e.g specific person
What is an attribute?
Entities have descriptive properties called attributes
e.g people have names and addresses
What is an entity set?
A set of entities of the same type that share the same set of attributes
e.g set of all persons
What are the 5 attribute types?
• 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
What is a relationship?
An association that exists between entities, and like entities, relationships are uniquely identifiable
e.g a specific person works at a specific company
What is a relationship set?
A set of relationships between one or more entity sets
e.g set of all pairs of persons working for companies
What is a binary relationship set?
Involves two entity sets, most relationship sets in a database system are binary
What is a N-ary relationship set?
An example of this is students work on research projects under the guidance of an instructor
What are multiplicity constraints?
Number of times an entity can or must take part in a particular type of relationship
What is participation?
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
What is cardinality?
The maximum number of times an entity can take part in a relationship set
What are the 4 types of mappings for cardinality constraints?
- One to one
- One to many
- Many to one
- Many to many