Académique Documents
Professionnel Documents
Culture Documents
DBMS independent
Logical Design
DMBS specific
Physical Design
1. Requirement Collection and Analysis
Purpose: to document the data requirements of the users
– functional requirements are the operations that will be applied to the
database, including queries and update
the specification will then be used as the basis for the design of the
database
typical activities:
– identification of application areas and user groups
– analysis of existing documentation of application areas, e.g. policy
documents, forms, reports, organisation charts
– analysis of current operating environments and the planned use of the
information, e.g. information flow, types of transactions, frequency of
transaction types
– responses to user questionnaires are analysed
... in summary:
non-technical users)
but detailed in terms of the “objects” of the domain the database
will represent
Why?
– need to be sure to include in the conceptual schema all information
required by transactions
– relative importance and frequency of use of transactions will influence
physical database design
... the software needs to be designed as well as the data!
3. Choosing a DBMS
Purpose: establish which is the best framework for implementing the
produced schema:
– type of DBMS (relational, network, deductive, ObjectOriented, ...)
– user and programmer interfaces
– types of query languages
choice made on the basis of technical factors
– the DBMS has to support the required tasks
of economic factors
– software acquisition/maintenance, hardware acquisition,
creation/conversion, training of staff
Entities are the “objects” the database has to store information about
need to distinguish between
– entities the database contains information about currently
– world of possible entities the database might contain information
about
the conceptual schema has to capture the changing nature of data
– need to make decisions based on the world of possible entities, e.g.
the entity class or type
– the entity class is an abstract description of some set of objects
– data to be actually stored form instances of such abstract description
Attributes
all instances of an entity class share some common properties named
attributes of the entity class
– e.g. attributes of the “employee” class might include name, age,
address, salary etc.
single-valued vs multi-valued
– most attributes can have only one single value for a particular istance (e.g. a person can
only have one date of birth)
– some attributes can have one or more values for the same instance (e.g. a car model’s
colours, a person’s names)
primitive vs derived
– some attributes can be derived from other attributes of the same entity, e.g. age
(derived) from birth date (primitive)
– or can be derived from properties of other entities (e.g. number of lecturers of a
department)
Key Attributes
an important feature of an entity type is the key or uniqueness constraint
on attributes
an entity type might have an attribute whose values are distinct for each
individual entry
such attribute is called key attribute and its value can be used to identify
each entity uniquely
sometimes, several attributes together can form a key, meaning that the
combination of them must be distinct for each individual entity
some entity types have more than one key attribute, for example both
National Insurance Number and Staff Number are valid keys for the entity
type “lecturer”
Relationships
a relationship type defines an association among entity types
only exist if it participates in the specified relationship (e.g. every lecturer must work
in a specified department)
partial participation constraint specifies there may exist an entity which does not
the relationship type that relates the weak entity to its owner is the weak
entity’s identifying relationship
– in the example above, the is in relationship
weak entity types might have a partial key, to distinguish one weak entity
from other weak entities related to the same owner
– for example “the desk 1 (or 2, 3 etc.) which is in RB8”
ER Diagrams
entity types are represented as boxes
relationship types are represented as diamonds connected with each
participating entity types
attributes are shown as ovals connected to the relevant entity or relation
type (key attributes are underlined)
LECTURER
WORKS_IN
DEPARTMENT
component attributes are connected to the composite attribute
MiddleNames
FirstName Surname
Name
Birth Date
Age
LECTURER
the cardinality of the relationship is written by the line
DEPARTMENT
1
COURSE
WORKS FOR
N
N
N TEACHES N
LECTURER
supervisee STUDENT
supervisor N
SUPERVISES N
weak entities are indicated by double boxed rectangles
identifying relationship types are indicated by double boxed diamonds
LECTURE THEATRE
1
IS IN
N
DESK Number
Example: Books
Nationality
AuthorID
Publication Year
Year of Birth
N BOOK
WRITES
Surname
N
Name
N
PRIZE WINS
Example: University
1
COURSE Code
WORKS FOR YearOfBirth
N
N
N Age StudentID
Name N TEACHES
LECTURER STUDENT
supervisor supervisee
N N
Surname SUPERVISES Name
Nationality
LecturerID
Nationality Surname
Age at Matriculation
Matriculation Year
Example: Championship
Continent Name
TEAM
Name
Example: Championship - 2
Continent Name
TEAM
MATCH
Name
Date
Time