Professional Documents
Culture Documents
Itnmt Reviewer Midterm
Itnmt Reviewer Midterm
CONCEPTUAL(LOGICAL) LEVEL
SESSION 3
It is also called logical level. The whole design of
the database such as relationship among data, A data model is a collection of concepts for
schema of data etc. are described in this level. describing data in a database, including:
This level is also known as physical level. This Relationships among objects
level describes how the data is actually stored
in the storage devices. This level is also Constraints on objects & relationships
responsible for allocating space to the data. This
Operations on objects & relationships
is the lowest level of the architecture.
Data modeling helps in the visual
Physical level these records can be described as
representation of data.
blocks of storage (bytes, gigabytes, terabytes
etc.) in memory. These details are often hidden Data modeling is typically done in three phases
from the programmers. Conceptual design
Foreign keys are specified. The attribute is used to describe the property
of an entity. Ellipse is used to represent an
Normalization occurs at this level.
attribute
ER MODEL
Entity-Relationship Model or E-R Model was MULTIVALUED ATTRIBUTE
developed by Peter Chen in 1976.
An attribute can have more than one value.
E-R Model can be expressed as the collection of These attributes are known as a multivalued
entities, also called as real word objects and attribute.
relations between those entities. No two
entities should be identical. The double oval is used to represent
multivalued attribute.
The database structure is portrayed as a
diagram called an entity-relationship diagram.
DERIVED ATTRIBUTE
RELATIONSHIP
An entity may be any object, class, person or Diamond or rhombus is used to represent the
place. In the ER diagram, an entity can be. relationship.
represented as rectangles
When only one instance of an entity is CODD’S 12 RULES
associated with the relationship, then it is
known as one to one relationship E.F Codd was a Computer Scientist who
invented the Relational model for Database
When only one instance of the entity on the management. Based on relational model, the
left, and more than one instance of an entity on Relational database was created.
the right associates with the relationship then
this is known as a one-to-many relationship. Codd proposed 13 rules popularly known as
Codd's 12 rules to test DBMS's concept against
When more than one instance of the entity on his relational model.
the left, and only one instance of an entity on
the right associates with the relationship then it Codd's rule actually define what quality a
is known as a many-to-one relationship. DBMS requires in order to become a Relational
Database Management System(RDBMS).
When more than one instance of the entity on
the left, and more than one instance of an RELATIONAL MODEL CONCEPTS
entity on the right associates with the
1. Table / Relation
relationship then it is known as a many-to-
many relationship. 2. Tuple / Record
plays an important role in relational database; it Alternate Key – Out of all candidate keys, only
is used for identifying unique rows from table. It one gets selected as primary key, remaining
also establishes relationship among tables. keys are known as alternate or secondary keys.
Key constraints
CANDIDATE KEY
An attribute that can uniquely identify a tuple in
is a minimal super key with no a relation is called the key of the table.
redundant attributes. It is a super key
Key constraints force that:
with no redundant attributes
In a relation with a key attribute, no two
EM_ID, EM_PhilHealthNum
tuples can have identical values for key
attributes.
FOREIGN KEY
is a procedural query language used to Suppose there are two tuples R and S.
query the database tables to access The set intersection operation contains
data in different ways. all tuples that are in both R & S.
It is denoted by intersection ∩.
works on the whole table at once, so Notation: R ∩ S
we do not have to use loops etc. to
EXAMPLE: ∏ AR_company (AIRLINES) ∩ ∏
iterate over all the rows(tuples) of data
AR_company (TRANSACTION)
one by one.