Professional Documents
Culture Documents
By:-Prof.-Vaidehi Verma
Introduction: Purpose of Database System-–Views of data–data models, database
management system, three-schema architecture of DBMS, components of DBMS. E/R
Model - Conceptual data modelling - motivation, entities, entity types, attributes,
relationships, relationship types, E/R diagram notation, examples.
What is Data and Information
Integrity problems
Hard to add new constraints or change existing ones
Atomicity of updates
Concurrent access by multiple users
Security problems
Database systems offer solutions to all the above problems.
A general-purpose software system enabling:
Creation of large disk-resident databases.
Posing of data retrieval queries in a standard manner.
Retrieval of query results efficiently.
Concurrent use of the system by a large number of users in a consistent
manner.
Guaranteed availability of data irrespective of system failures.
Schemas
A database schema defines its entities and the relationship among them.
It gives us an overall description of the database.
A database schema defines how the data is organized using the schema diagram.
schema- name-university
View of Data
Physical Level Schema
Describes the physical structure of data in terms of record formats, file structures,
indexes etc.
Logical Level Schema
Describes the logical structure of the entire database.
No physical level details are given.
View Level Schema
Each view describes an aspect of the database relevant to a particular group of users.
For instance, in the context of a library database:
Books Purchase Section
Issue/Returns Management Section
Users Management Section
custID Loan No Amout
101 566788 50000
Conceptual data model, describes the database at a very high level and is
useful to understand the needs or requirements of the database.
E/R (Entity/Relationship) Model
The University Database Context
Entities: student, faculty member, course, departments etc.
Relationships: enrollment relationship between student & course, employment
relationship between faculty member, department etc.
Attributes: name, RollNumber, address etc., of student entity, name, empNumber,
phoneNumber etc., of faculty entity etc.
Representational Level Data Model
Relational Model: Provides the concept of a relation.
In the context of university database:
1.Entity Identification-student,professor,exam
2.Relationship
3.cardinality
4.Identify attribute
E-R Model
University
Want to store data about:
Employees
Students
Courses
Departments
Attributes
Associated with entities are attributes that describe them. (Attributes – set of properties
or characteristics of an entity).
Types of Attributes
Derived attribute
age
degree
Id salary
Name
dob
Street no House no Near
landmark
Address
pincode
Primary key
Relationships Between Entities
Relationships between entities are represented using diamonds that are connected to the
relevant entity sets.
• For example: students are enrolled in courses
• Another example: courses meet in rooms
Cardinality Constraints
The presence or absence of cardinality constraints divides relationships into three types:
• many-to-one (M:1)
• one-to-many (1:N)
• one-to-one (1:1)
• many-to-many (M:N)
Translating relationship into table (many
to many Relationship)
• Create a table for the relationship set.
• Add all primary keys of the participating entity sets as fields of the table.
• Add a field for each attribute of the relationship.
• Declare a primary key using all key fields from the entity sets.
• Declare foreign key constraints for all these fields from the entity sets.
DBMS Architecture
Components of DBMS
Query Processor
Storage manager
Database Users
Database Administrator