You are on page 1of 16

I18303 -RELATIONAL

DATABASE MANAGEMENT
SYSTEM
UNIT – 2
PHYSICAL DATABASE
DESIGN & LOGICAL DESIGN
Components of a DBMS

Relational Database

Entity

Attribute

Types of Attributes
Physical database design
Relational Database
• The relational database was invented in 1970 by E. F. Codd.
• data in a relational database is organized into tables.
• Each table is called as a relation.
• Each column is called as an attribute.
• Each row is called as a record or tuple.
• Each table has a unique primary key, which identifies the information
in a table uniquely.
• The relationship between tables can then be set via the use of foreign
keys -- a field in a table that links to the primary key of another table.
Tuples
Entity
• A thing in the real world with an independent existence

Physical entity
ENTITY

Conceptual entity
Entity
Physical entity
An object with a physical existence
Example:
 A person, car, home, employee, student

Conceptual entity
An object with a conceptual existence
Example:
 A company, a job, an university course
Attributes
• Properties that describe an entity
• In RDBMS, attributes corresponds to fields
• Each entity will have a value for each of its attributes
• These attribute values become a major part of the data stored in the database
Example:
• EMPLOYEE  is an entity
It has the following attributes:
 Employee_name
 Age
 Designation
 Salary
 Address
Types of Attributes
Simple/Atomic
Composite

ATTRIBUTES
Single valued
Multivalued
Stored
Derived
Types of Attributes-Contd…
• Simple/Atomic attributes
• Attributes that are not divisible are known as simple attributes.
Example:
• City, state, pincode

• Composite attributes
• Can be divided into smaller subparts, which represent more basic attributes with
independent meanings.
• The value of a composite attribute is the concatenation of the values of its constituent simple
attributes.
Types of Attributes-Contd…
• Composite attributes - Example
• Address attribute of the EMPLOYEE entity
• It can be subdivided into Street_address, City, State and Zip
• Street_address can be further subdivided into Street_no, Street_name, Door_no

Address

Street_address City State Zip

Street_no Street_name Door_no


Types of Attributes-Contd…
• Single valued attributes
• Attributes that have a single value for a particular entity.
Example:
• Age of a person
• Multivalued attributes
• May have lower and upper bounds to constrain the number of values allowed for each
individual entity.
Example:
• College_degree attribute
• That is, one person may not have a college degree
• Another person may have one degree
• A third person may have two or more degrees
• That is, different persons can have different values for the College_degree attribute.
Types of Attributes-Contd…
• Stored attributes
Example:
• Date_of_birth attribute of a person

• Derived attributes
• Some attribute values can be derived from related attributes.
• Such attributes are called derived attributes.
Example:
• Age
• The value of the ‘Age’ attribute can be derived from the ‘Date_of_birth’ attribute.
• Hence, ‘Age’ is called a derived attribute and ‘Date_of_birth’ is called a stored attribute.
Domains
• For a given application, an attribute may only be allowed to take a value from a
set of permissible values.
• This set of permissible values for the attributes is the domain of the attribute.
Example:
If persons can only be between 0 and 150 years of age,
then the attribute “Age” will be defined over the domain P_Age where,

P_Age : { x | x is a positive integer ^ 0 ≤ x ≤ 150 }


Domains – contd…

Unstructured or Atomic or
Application independent domains
Domains
Structured or Non-atomic or
Composite domains
Domains – contd…
• A domain is a set of values of the same data type.
• A domain may be structured or unstructured(atomic)
• A domain is said to be simple, if all its elements are non-decomposable (atomic)
• A domain is said to be composite, if its elements are decomposable (non-atomic)
• Atomic domains are also called as “application independent domains”
• Non-atomic domains are also called as “structured or composite domains”

You might also like