1. RDBMS THEORY
UNIT – 2
DB Architecture
Data Modeling
Mr.S.Viswanathan
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
2. Data Modelling
• Data modeling is the process of creating a data model for the data to be
stored in a database.
• Two main purpose of data modelling are to assist,
1) Understanding the semantics of data.
2) Communication about the requirements
• Planning the structure of database is called as “Data Models”.
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
3. Cont…
• Data model is a collection of conceptual tools for,
1) Describing data.
2) Data relationship.
3) Data Semantics.
4) Consistency Constraints.
• This Makes the developer to understand the relationship between
various objects in the database.
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
4. Cont…
• Data model visually represents,
1) Nature of Data.
2) Each User’s Perspective of the data.
3) Use of Data across application areas.
• Notation used in the model will support communication between users
and designers.
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
5. Cont…
• Optimal Data model should satisfy the criteria listed below,
1) Structural Validity:
Consistency with the way the organization defines and organizes information.
2) Simplicity:
Ease of easy understanding.
3) Expressability:
Ability to distinguish between different data, relationships between data and
constraints.
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
6. Cont…
4) Non-redudancy:
Representation of information only once.
5) Shareability:
Not for particular application that is data can be shared to any
application.
6) Extensibility:
Ability to evolve to support new requirements.
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
7. Cont…
7) Integrity:
Consistency with the way the organization uses and manages
information.
8) Diagramatic Representation:
Represent the model using easily understood diagrammatic notation.
9) Extensibility:
Ability to evolve to support new requirements.
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
8. Database Environment
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
Data
Dictonary
DATA
Operating System
Schema
Compiler
Storage /
Retrieval System
User Interface
Database
Designer
Database
User
DBMS
9. Cont…
• DBMS is common and is aim to support a wide variety of database
applications.
• Database designer – Provides the names of the entities and their
attributes in a machine-readable script called as conceptual schema.
Example:
Conceptual schema for Publisher-book will describe,
1) The publisher and book tables.
2) How publisher rows related to the book rows.
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
10. Cont…
• Database Users – dealing with an interactive interfaces to access the
database.
• DBMS – Compiles the schema into compact form (Small form) for
reference by other parts of the system and stores it in the data
dictionary.
• Schema Compiler – Compiles the structure to compact form.
• Storage / Retrieval – Proccess the storage / retrieval request, perform query
optimization and carries out data operations.
• User interface – Responds to the service request.
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
11. Cont…
• Data Dictionary – Available to resolve references to table and
attribute names.
• There are three levels of database services,
1) External (or) Logical Level
2) Conceptual Level
3) Physical Level
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
12. Database Level
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
Physical Level
Conceptual Level
External View External View
External View
Physical & Logical Data Independence
13. Conceptual Level
• Conceptual data model can easily be drawn.
• It represents a global view of the data.
• It is a visual representation and highly abstract.
• It is easy to understand.
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
14. Cont…
• Most used conceptual model is “Entity Relationship Model (ER
Model)”.
• ER-Model is represented using “E-R Diagram (ERD)”.
• Conceptual model is independent of both software and hardware.
• The entities together with their relationships, constraints and
security mechanisms reside here.
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
16. External or Logical Level
• It is also called as “View Level”
• It expands the conceptual data model by adding more details.
• It presents the attributes for each entity.
• These attributes are further identified as,
1) Key attributes.
2) Non-Key attributes.
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
17. Cont..
• Key Attribute – It defines the uniqueness of that entity.
• Non – Key Attribute – It doesnot defines the uniqueness of the
entity.
• Primary key and foreign key relationships are clearly defined.
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
18. Cont…
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
Time
Store
Product
Sales
Date
Store ID (FK)
Product ID
Store ID
Product ID (FK)
Date (FK)
Month
Year
Week
Price
Unit
Name
Sold
Amount Region
Name
19. Physical Level
• This is the lower level.
• It is similar to logical data model.
• It is the process of producing a description of the implementation of
the database.
• It describes the storage structures and access methods
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
20. Cont…
• We want to design the physical data model based on specific DBMS.
• The main aim of the physical data model involves the following,
1) Deriving set of relational tables and the constraints.
2) Identifying the specific storage structures and access
methods.
3) Designing security protection for the system.
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
21. Cont…
31-01-2021
Mr.S.Viswanathan, Assistant Professor, Department of Information Technology
Time
Store
Product
Sales
Date : Integer
Store ID (FK)
Product ID : Integer
Store ID: Integer
Product ID (FK)
Date (FK)
Month: Varchar
(20)
Year
Week
Price
Unit
Name: varchar(20)
Sold
Amount Region
Name