0% found this document useful (0 votes)
3 views

Database Development and Data Modeling

The document outlines the phases of database development and data modeling, detailing the purposes and deliverables of each phase from project identification to maintenance. It explains different types of data models, including conceptual, logical, internal, and physical models, and emphasizes the importance of data modeling in understanding data structures and relationships. Additionally, it describes entities, attributes, relationships, and constraints, providing a comprehensive overview of the components and types of attributes used in database design.

Uploaded by

alihassan940210
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Database Development and Data Modeling

The document outlines the phases of database development and data modeling, detailing the purposes and deliverables of each phase from project identification to maintenance. It explains different types of data models, including conceptual, logical, internal, and physical models, and emphasizes the importance of data modeling in understanding data structures and relationships. Additionally, it describes entities, attributes, relationships, and constraints, providing a comprehensive overview of the components and types of attributes used in database design.

Uploaded by

alihassan940210
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Database Systems

Unit -3
Database Development and
Data Modeling

Asif Sohail
University of the Punjab
Punjab University College of Information Technology (PUCIT)

Database Systems Slide 1


Project Purpose: To develop a preliminary understanding of the business situation that
has caused request for a new / enhanced IS
Identification
Deliverable: A formal request to conduct a project to design & develop an IS
& Selection
Project Purpose: To state business situation & how IS might solve problems
Initiation Deliverable: A written request to study the possible changes to existing
system / the development of a new system
& Planning
Purpose: To analyze business situation to determine requirements.,
to structure requirements
Analysis
Deliverable: A functional specs of the system

Purpose: To elicit & structure all information requirements


Logical Design Deliverable: Detailed functional specs of all data, forms,
reports, displays and processing rules

Purpose: To develop all technology & organizational specs


Physical Design Deliverable: Program & DB structure, technology purchases,
physical site plans and redesigns

Purpose: To write programs, build data files , install


new system, train users
Implementation
Deliverable: Properly working programs with specs,
and training material
Purpose: To monitor the operation and usefulness
of system, to repair and enhance it
Maintenance
Deliverable: Periodic audits of the system
Project
Identification
& Selection Analyze current data processing, general business
Project
functions and their database needs
Initiation
& Planning

Analysis Conceptual Data Model

Logical Design Logical Data Model

Internal Data Model


Physical Design

Implementation Physical Data Model

Maintenance
Types of Data Models
1. Conceptual Data Model refers to the way data is organized, documented, and defined within a
database.
• It defines WHAT the system contains?
• It identifies entities, their attributes and their relationships (E-R Model).
2. Logical or Representational Data Models
• Defines HOW the system should be implemented regardless of the DBMS.
• Define the structure of data elements and the relationships between them.
a) Hierarchical Data Model
b) Network Data Model
c) Relational Data Model
3. Internal Data Model
• Describes the database specific implementation of the data model
Create table Product (
Prod-Id Character(6) PRIMARY KEY,
Prod-Name Character(30), …);
4. Physical Data Model
• Describes the way data is stored on storage media
• It requires the definition of both the storage devices and access methods.
Database Systems Slide 4
Database Development Life Cycle
• It is important to recognize that the stages of the
database development life cycle are not strictly
sequential, but involve some of amount of repetition
of previous stages through feedback loops.
• For example, problems encountered during database
design may necessitate additional requirements
collection and analysis.

Database Systems Slide 5


Database Development Life Cycle
Analyze User Environment

Develop Conceptual Model

Map Conceptual Model into Logical

Choose DBMS

Develop Physical Design

Implement System

Test System

Operational Maintenance
Database Systems Slide 6
System Models
• Webster’s Dictionary defines model as a “description or analogy used
to visualize something that cant be directly observed”.
• Models are abstraction of a more complex real-world object or event.
• The System models are the graphical representation of a System.
• Models are more understandable than detailed natural language
description of the system.
• Model is an effective communication tool use for communication with
different stakeholders of the system as per their needs.
• Models are an abstraction of the system. It leaves out details.
• Models are helpful for:
– Testing a physical entity before building it
– Communication with the customer
– Visualization
– Reduction of Complexity
– Concept building and understanding
Database Systems Slide 7
Data Modeling
• A data model is a relatively simple representation, usually graphical,
of more complex real-world data structures.
• A data model is an integrated collection of concepts for describing
and manipulating data, relationships between data, and constraints
on the data in an organization.
• It is the first step in designing a database.
• It is unlikely to create a good database without first selecting an
appropriate data model.
• It is the process of creating the logical structure of the database.
• Two main purposes of data modeling are to assist in the
understanding of the data (semantics of data) and to facilitate
communication about information requirements.
• Data Models are governed by the business rules of an organization.
• A business rule is a brief and precise description of policy or principle
of an organization.
Database Systems Slide 8
Components of Data Models
• A data model has the following three components:
1. Structural Part: How the data are structured?
2. Manipulative Part: Defines the types of operations that are
allowed on the data. This includes the operations that are
used for updating or retrieving data and for changing the
structure of the database.
3. Integrity Constraints. Defines the checks that are used to
ensures correctness of data.
• The basic building blocks of all the data models are entities,
attributes, relationships and constraints that are determined on
the basis of business rules of an organization.

Database Systems Slide 9


Entity
• An Entity is an Object, Event, Persons, Place or Concept about
which the organization wishes to maintain data.
• An Entity Type or Entity Class is a collection of entities that can
described under the same set of characteristics.
• An Entity Instance is a single occurrence of an entity type.
• Generally, an entity in the real world is defined under a single
entity type, but sometimes an entity may fall in more than one
entity classes.
• For Example: Doctor and Patient Entity Class, Student and
Faculty Entity Class etc.
• An Entity is diagrammatically represented as STUDENT

Database Systems Slide 10


Attributes
• An Attribute is a property or
characteristics of an entity type that Attribute
is of interest to the organization.
• The other terms used for attribute ASSOCIATED
are feature used in machine learning, ENTITY
dimension used in data warehousing
and variable used in statistics.
• The attributes of a entity are selected on the basis of
information requirements of an organization. For Ex, the
attribute of a product for Sales Department will be different
than that for Manufacturing Department.
• A set of attributes used to describe an entity is called an
attribute vector.

Database Systems Slide 11


Attributes
• Each entity in an entity class must posses at least one attribute
that distinguishes it from other entities in the same entity class.
• This unique attribute of an entity is called an Identifier.
• Domain of an attribute is a set of permitted values for an
attribute OR Domain is a pool of value from which an attribute
extracts its actual value.
• Null Value of an attribute means the absence of value. Some
less important attributes of an entity may be allowed to accept
null values. Such attributes are called optional attributes.

Database Systems Slide 12


Types of Attributes

An attribute can be divided into the following types


on the basis of values it can assume:
a) Nominal Attributes
b) Binary Attributes
c) Ordinal Attributes
d) Numeric Attributes

Database Systems Slide 13


Types of Attributes
a) Nominal Attributes:
• The attributes used to put entities into categories.
• Predefined set of values.
• Examples: Occupation, Marital-status, Province etc.
• Nominal attributes may be represented using
numbers, however, mathematical operations on
nominal attributes are not meaningful.
b) Binary Attributes:
• A binary attribute is a special case of nominal attribute
with only two categories.
• Examples: Class-attendance-status, gender etc.

Database Systems Slide 14


Types of Attributes
c) Ordinal Attributes:
• An ordinal attribute is an attribute with possible
values that have a meaningful order or ranking among
them, but the magnitude between successive values
may not be known.
• Examples: Grade, drink-size (small, medium, large)
• Describe a feature of an object without giving an
actual size or quantity.
d) Numeric Attributes:
• Assume values that are genuine integer or real
numbers.
• Examples: Quantity, Marks etc.
Database Systems Slide 15
Binary Classes of Attributes

a) Required Attribute / Optional Attribute


b) Atomic Attribute / Composite Attribute
c) Single Valued Attribute / Multi-valued Attribute
d) Base Attribute / Derived Attribute
e) Discrete Attribute / Continuous Attribute

Database Systems Slide 16


Binary Classes of Attributes
• Required Attribute: An attribute of an entity that must
have a value for each entity instance
• Optional Attribute: An attribute of an entity that
may/may not have a value for every entity instance.

Name* Mobile_NumberO

Required Attribute STUDENT Optional Attribute

Database Systems Slide 17


Binary Classes of Attributes
• Atomic Attribute is an attribute which can’t be further
subdivided into further meaningful attributes.
• For Ex: Price of a product.
• Composite Attribute is an attribute which can be broken into
further meaningful attributes.
• For Ex: Address of a student.
H_No
St_No

Address Area
EMPLOYEE

City

Database Systems Slide 18


Binary Classes of Attributes
• Single Valued Attribute is an attribute which has one and only
one value against an entity instance.
• For Ex: RegNo of a Student, Pno of a product etc.
• Multi valued Attribute is an attribute that may take on more than
one values for a given entity instance.

Phone_No

STUDENT

Database Systems Slide 19


Binary Classes of Attributes
• Base Attribute is an attribute that is stored in the database.
• Derived Attribute: An attribute whose value can be calculated
from related attribute values.

EMPLOYEE
Base
Derived
Attribute
Attribute

Date_Employed Years_Employed

Database Systems Slide 20


Binary Classes of Attributes
• Discrete Attribute:
– A discrete attribute has a finite or countable set of values,
which may or may not be represented as integers.
– Examples: Grade, Color etc.
• Continuous Attribute:
• Has real numbers (floating points) as attribute values.
– Examples: Temperature, Height, or Weight etc.

Database Systems Slide 21


Relationship
• A relationship describes an association among
attributes of an entity and among different entities.
• The relationship between attributes of an entity (data
association) is represented using Bubble Charts.
• The relationship between entities is represented using
Entity Relationship Diagram (ERD).

Database Systems Slide 22


Types of Relationship
• There are the following types of relationships or data
associations:
a) One to One Association
b) One to Many Association
c) Many to Many Association
• There are two levels of observing the association:
a) Between the attributes
b) Between the entities

Database Systems Slide 23


Types of Relationships
a) One to One Relationship (1:1, 1..1)
• Let A and B are two data items, then one to one association
from A to B means that for a given value of A, there is one and
only one value of B.
• Example: -------
• The special cases of one to one association are Bidirectional
Association and Conditional Association.
• In a Bidirectional association, from a given value of any data
item, we can uniquely determine the value of other.
• In Conditional Association, for a given value of A, there is either
one or no value of B.

person and their passport.

Database Systems Slide 24


Types of Relationships
b) One to Many Relationship (1:M, 1..*)
• Let A and B are two data items, then one to many association
from A to B means that for a given value of A, there can be
many values of B.
• Example: -------- Department -> emp

c) Many to Many Relationship (M:N, *..*)


• Let A and B are two data items, then many to many association
from A to B means that for a given value of A, there can be
many values of B and vice-versa.
• Example: --------
courses -> students

Database Systems Slide 25


Data Association Diagrams
a) Bubble Chart
• It represents data associations between the primary key and other
attributes of an entity.
• Example: -------
b) Entity Relationship (ER) Diagram
• It is the graphical representation of the association/relationship between
entities of an organization.
• This diagram is very helpful for conceptual understanding.
• Example: -------

EMPLOYEE Works in DEPARTMENT

Database Systems Slide 26


Constraints
• A constraint is a restriction placed on data.
• Constraints are used to improve data quality and data
integrity.
• Examples …

Database Systems Slide 27


Reading Material
• Text Book: Chapter 2 (2.1 to 2.4, 2.6)
• Ref. Book-B: Section 2.3
• Ref. Book-C: Section 2.1

Thank you for your attention.


Asif Sohail

Assistant Professor
University of the Punjab
Punjab University College of Information Technology (PUCIT)
Allama Iqbal (Old) Campus, Anarkali
Lahore, Pakistan
Tel: +92-(0)42-111-923-923 Ext. 154
E-mail: [email protected]

Database Systems Slide 28

You might also like