Docsity

NIKE IGNITE, Summaries of Innovation

Partial preview of the text

Download NIKE IGNITE and more Summaries Innovation in PDF only on Docsity!

Translation of ER

Translation of ER

diagram into

diagram into

Relational Schema

Relational Schema

Dr. Sunnie S. Chung

CIS430/

Learning Objectives

Learning Objectives



Define each of the following database terms



Relation



Primary key



Foreign key



Referential integrity



Field



Data type



Null value



Discuss the role of designing databases in theanalysis and design of an information system



Learn how to transform an entity-relationship (ER)Diagram into an equivalent set of well-structuredrelations

Relational Database Model

Relational Database Model

Data represented as a set of related tables orrelations

Relation

  • A named, two-dimensional table of data. Each

relation consists of a set of named columns andan arbitrary number of unnamed rows

  • Properties
    • Entries in cells are simple• Entries in columns are from the same set of values• Each row is unique• The sequence of columns can be interchanged without

changing the meaning or use of the relation

  • The rows may be interchanged or stored in any

sequence

Transforming E Transforming E

R Diagrams into R Diagrams into

Relations Relations

It is useful to transform the conceptual datamodel into a set of normalized relations

Steps

Represent entities

Represent relationships

Normalize the relations

Merge the relations

Refining the ER Design for the

Refining the ER Design for the

COMPANY Database

COMPANY Database

Change attributes that representrelationships into relationship types

Determine cardinality ratio andparticipation constraint of eachrelationship type

Design Choices for ER

Design Choices for ER

Conceptual Design

Conceptual Design

Model concept first as an attribute



Refined into a relationship if attribute is areference to another entity type

Attribute that exists in several entitytypes may be elevated to an independententity type



Can also be applied in the inverse

Alternative Notations

Alternative Notations

for ER Diagrams

for ER Diagrams

Specify structural constraints onRelationships



Replaces

Cardinality ratio (1:1, 1:N, M:N)

and

single/double line notation for

Participation

constraints



Associate a pair of integer numbers

(min, max)

with each participation of an entity type

E

in a

relationship type

R

,

where 0 ≤ min ≤ max and

max ≥ 1

Transforming E Transforming E

R Diagrams into R Diagrams into

Relations Relations

The

primary key

must satisfy the following

two conditions

a.

The value of the key must

uniquely identify

every row in the relation

b.

The key should be

nonredundant

Transforming E Transforming E

R Diagrams into R Diagrams into

Relations Relations

Represent Relationships

Binary

1:N

Relationships

Add the

Primary key attribute

(or attributes) of

the entity on the one side of the relationship as a Foreign key

in the relation on the other (N) side

The one side

migrates

to the many side