Professional Documents
Culture Documents
Implementation Model
Physical Model
Data Models
Conceptual Data Model:
a high-level model of the data, describing what is
stored.
The conceptual data model is often presented in the
logically organized.
This is often presented as a description of the interface
network models.
Data Models
Physical:
very low-level compared to the conceptual and
Figure 1.2:
Data Independence
Data independence is an important concept in database design.
There are two kinds of data independence that we need to
consider
Logical Data Independence:
the conceptual schema can be altered without having to
primary entity).
Translate the diagram into English.
composite,
Key attribute
multi-valued, and
derived.
Figure 1.7
keys
Figure 1.8
Strong vs weak Entities
Entities that have at least one identified key can be called
strong entitie.
Figure 1.9
Domain of attributes
The "domain of values" is the set of values that a given
attribute may take on.
The domain consists of all the possible legal values that are
permitted on an attribute.
A data type is a broader term used to describe attributes, but
"data type" includes the idea of what operations are
allowable.
Since database people are usually more concerned about
storage and retrieval, database "data types" usually just
focus on the "domain of values."
Mapping the Entity Diagram to a
Relational Database
The process of converting an ER diagram into a database is
called mapping.
Basically, a relational database is a database of two-
dimensional tables called "relations."
The tables are composed of rows and columns.
The rows are often called tuples and the columns, attributes.
In relational databases, all attributes (table columns) must
be atomic and keys must not be null.
In addition, in relational databases, the actual physical
location of the data on a disk is not usually necessary to
know.
Mapping the Entity Diagram to a
Relational Database
For strong entities: develop a new table (relation) for each
strong entity and make the indicated key of the strong
entity the primary key of the table.
If more than one candidate key is indicated on the er
diagram, choose one for the primary key.
Map atomic attributes from an entity — for entities with
atomic attributes: map entities to a table by forming
columns for the atomic attributes
An ER Diagram with One Entity and Five
Attributes
.
Figure 2.1:
The Cardinality Ratio of a Relationship
Cardinality is a rough measure of the number of entities
(one or more) that will be related to another entity (or
entities).
For example, there are four ways in which the entities
AUTOMOBILE and STUDENT can be "numerically
involved" in a relationship:
one-to-one (1:1),
many-to-one (M:1),
many-to-many (M:N).
Relationships types
One-to-One (1:1)
In this type of relationship, one entity is associated with
One-to-Many (1:M)
The sense of a one-to-many SA