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

Session-5 - DBMS

Uploaded by

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

Session-5 - DBMS

Uploaded by

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

Department of CSE

COURSE NAME: RELATIONAL ALGEBRA AND INFORMATION THEORY

COURSE CODE:23MT2013

Topic: Key Elements- Data Models Schemas ,Instances And Data Independence
Session -5
AIM OF THE SESSION
To familiarize students with comprehensive understanding of data models, schemas, instances, and
data independence in database systems.

INSTRUCTIONAL OBJECTIVES

This Session is designed to demonstrate the creation of a database schema, modify database

instances , strategies to achieve data independence in database design..

LEARNING OUTCOMES
At the end of this session, students gain a solid understanding of data models, schemas,
instances, and data independence, enabling them to apply these concepts effectively in their
database work.
DATABASE SCHEMA

 A schema can be defined as the design of a database.


 The overall description of the database is called the database schema.
 Database schema contains table, field, views and relation between different keys like
primary key, foreign key.
DATABASE SCHEMA
TYPES OF DATABASE SCHEMA

Database schema can be categorized into three parts. They are :


1. Physical Schema
2. Logical Schema
3. View Schema
PHYSICAL SCHEMA

Physical Database Schema


 A physical database schema specifies how the data is stored physically on a storage
system or disk storage in the form of Files and Indices.
 Designing a database at the physical level is called a physical schema.
 The Database administrator chooses where and how to store the data in the different
blocks of storage.
LOGICAL SCHEMA

Logical Database Schema


 A logical database schema defines all the logical constraints that need to be applied to
the stored data, and also describes tables, views, entity relationships, and integrity
constraints.
 The Logical schema describes how the data is stored in the form of tables & how the
attributes of a table are connected.
 Using ER modelling the relationship between the components of the data is maintained.
 In logical schema different integrity constraints are defined in order to maintain the
quality of insertion and update the data.
VIEW SCHEMA

View Schema
 The view level design of a database is known as view schema.
 This schema generally describes the end-user interaction with the database systems.
THREE LAYER OF SCHEMA DESIGN
VIEW SCHEMA

For example: Let suppose you are storing students' information on a student's table. At the
physical level, these records are described as chunks of storage (in bytes, gigabytes, terabytes,
or higher) in memory, and these elements often remain hidden from the programmers. Then
comes the logical level; here at a logical level, these records can be illustrated as fields and
attributes along with their data type(s); their relationship with each other can be logically
implemented. Programmers generally work at this level because they are aware of such things
about database systems. At view level, a user can able to interact with the system, with the
help of GUI, and enter the details on the screen. The users are not aware of the fact of how the
data is stored and what data is stored; such features are hidden from them.
DATA INDEPENDENCE

 Data independence refers characteristic of being able to modify the schema at one level of
the database system without altering the schema at the next higher level.
 There are two types of data independence:
 1.Logical Data Independence
2.Physical Data Independence
LOGICAL DATA INDEPENDENCE

Logical Data Independence


 Logical data independence refers characteristic of being able to change the conceptual
schema without having to change the external schema.
 Logical data independence is used to separate the external level from the conceptual view.
 If we do any changes in the conceptual view of the data, then the user view of the data
would not be affected.
 Logical data independence occurs at the user interface level.
PHYSICAL DATA INDEPENDENCE

Physical Data Independence


 Physical data independence can be defined as the capacity to change the internal schema
without having to change the conceptual schema.
 If we do any changes in the storage size of the database system server, then the
Conceptual structure of the database will not be affected.
 Physical data independence is used to separate conceptual levels from the internal levels.
 Physical data independence occurs at the logical interface level.
REFERENCES

1) https://www.w3schools.in/dbms/data-schemas

2). Fundamentals of Database System-Elmasri Ramez , Navathe


Shamkant
TERMINAL QUESTIONS

1) What is a database schema?


2) What is the primary purpose of a database schema?
3) What is the role of a database view?
SELF-ASSESSMENT QUESTIONS

1. Which of the following components is typically included in a database schema?

A) Database indexes and triggers.


B) User interfaces and application logic. Ans:D
C) Data storage algorithms.
D) Table definitions, relationships, and constraints

2. What is a database schema? ?

A) The physical representation of data on disk.


B) A collection of procedures that automate database operations. Ans:C
C) A logical description of the entire database structure.
D) The process of securing database access using encryption.
THANK YOU

Team

You might also like