DBMS 20-21 Lect-4
DBMS 20-21 Lect-4
Management System
Class : - TY CSE – I
Dr. Deepa Deshpande
Example of Schema
View 1 View 2
Employee : Name External Level Employee : SSN
Employee : Employee : Name
Address Employee Employee :Addres
Name string[25] s
SSN number Employee : Salary
Address string[50]
Conceptual/Logical Level
Salary number
Attribute Length
Name 0-24
SSN 25-26
Address 27-76 Internal/Physical Level
Salary 77-78
Department of Computer Science &
Engineering 02/26/2025 2
Instances & Schema
Schema
◦ is a description of database structure
◦ logical structure of database
Instance :
◦ is set of data that fits in description
◦ actual contents of database at a particular point of time
◦ also called as database state or occurrence
One schema may have many instances
Difference between schema & state
◦ At design time schema is defined and state is empty state
◦ State changes each time data is inserted or updated, schema
remains the same
Department of Computer Science &
Engineering 02/26/2025 3
Examples
Roll Number Name Contact
Instance at time T1
506101 Deepa 9822475431
Deshpande
Roll Number Name Contact
Instance at time T2
506101 Deepa 9822475431
Deshpande
506102 aaaaa 9833442261
506103 bbbbb 8687543216
Roll Number Name Contact
Instance at time T3
506101 Deepa 9822475431
Deshpande
506102 aaaaa 9833442261
506105 cccccc 8688985654
Good Design
possessed by an entity
E.g. student- rollno, name ,address, phone
Entity set is a set of entities of the same type that
Types of relationship
One – One e.g. student-department
One – Many e.g. customer- order
Many – One e.g. order - product
Many – Many e..g student - project
Department of Computer Science & Engineering 02/26/2025 14
Thank You