LESSON 1
Logical Database Design
Logical Database Design
- a process of transforming the
conceptual data model (E-R model) into
a logical data model that emphasizes
the relational data model
- logical view of the relational database is
facilitated by the creation of data
relationships based on the logical
design as a table
E.F. Codd
- first introduced relational data model
- followed by IBM
Relational Data Model
- based on mathematical theory and
therefore has a solid theoretical
foundation
Data Structure
- data are organized in form of tables with
rows and columns
Data Manipulation
- powerful operations are used to
manipulate data stored in the relations
Data Integrity
- data validation ensured that the data will
be used is valid and determines the
quality of the generated information
Relational Data Structure
Relation
- named a two-dimensional table of data
- each relation consists of a set of named
columns and an arbitrary number of
unnamed rows
each row of a relation contains data
values for a single entity
structure of a relationship can be
expressed by a shorthand notation in
this format:
TABLE_NAME (columnname_1,
columnname_2...., columnname_n)
Relational Keys
Primary Key
- consists of 1 or more columns whose
data contained within are used to
uniquely identify each row in the table
- designated by underlining the column(s)
- equivalent to the identifier in the ERD
- selection is critical as it must be ensured
that the selected key is unique
- designated to uniquely identifies each
record in the table
can either be a normal column that is
guaranteed to be unique such as
EmpNo
can be generated by the DBMS (unique
identifier or GUID in Microsoft SQL
Server)
Foreign Key
- a set of one or more columns in a table
that refers to the primary key in another
table
- designated by underlining the column
name with a dashed line ---
- used to create relationships and provide
a link between tables
Composite Key
- a primary key that consists of more than
one column
- can be used to uniquely identify each
row in the table