Ch1-Database System Concepts
Ch1-Database System Concepts
Ch1-Database System Concepts
What is Data?
• The fact and figures that can be recorded in system and that have
some special meaning is called data.
• Ex:Student Table:
DBMS:
• Ex:
• MySQL
• Oracle
Characteristics/Features of DBMS:
2. Inconsistent Data :Due to data redundancy, same data stored at different places might not match to
each other.
3. Data Integrity Problems :The data present in the database should be consistent and correct. To
achieve this, the data should must satisfy certain constraints.
4.Difficulty in recovery of corrupt data :
Recovery or backup of lost and corrupt data is nearly impossible in case of File Processing System.
5.Unauthorized Access – Anyone who gets access to the file can read or modify the data.
Advantages of DBMS:
1. Reduction in redundancy: All the data is stored in one place, and that recorded in the database
3. Easy Maintenance: The centralized nature of the database helps in the easy maintenance of the
data.
Redundant data can be present in a file system. In DBMS there is no redundant data.
It doesn’t provide backup and recovery of data It provides backup and recovery of data even if
if it is lost. it is lost.
File systems provide less security in DBMS has more security mechanisms as
comparison to DBMS. compared to file systems.
Only one user can access data at a time. Multiple users can access data at a time.
Application of DBMS:
1. Railway And Airline Reservation System:
• The database keeps a record of ticket booking, arrival time, departure time, delays, and even seat numbers of
airplanes or trains.
2. Banking:
• An uncountable number of bank transactions and deposits are made, thousands of new bank accounts are
created daily, and many such things.
• The details of each student, teacher, and even janitor are stored in a database to manage the information
easily.
Application of DBMS:
• Social media websites like Instagram, Facebook, Whatsapp, etc., are able to
keep track of each and every detail of their users (name, phone number, photos,
email address, password, etc.) with the help of Database Management Systems.
All the details of the customers, products as well as order and tracking details are
stored and managed using a Database Management System.
Data Abstraction:
• It is the process of hiding the complexity of data and representing the
data which need to be shown to the
user.
1. Physical or Internal Level:
dept
Types of schema:
1.Physical Database Schema:
• A Physical schema defines, how the data or information is stored physically in the storage systems in the
form of files & indices.
• 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.
Types of schema:
3.View Database Schema:
It is a view level design which is able to define the interaction between
end-user and database.
Data Independence:
3. Specialized User: These are the users who write specialized applications.
• DBA is also responsible for providing security to the database and he allows only the
authorized users to access/modify the data base.
5.Database Designer: Data Base Designers are the users who design the structure of
database which includes tables, indexes, views, triggers, stored procedures and
constraints.
Roles of DBA:
• A Database Administrator is a person or a group of person who are responsible for managing all the
activities related to database system.
1. Database design:
• The logical design of the database is designed by the DBA. Also a DBA is responsible for physical
design, external model design, and integrity control.
2.Database accessibility:
• DBA writes subschema to decide the accessibility of database. He decides the users of the database
and also which data is to be used by which user.
Roles of DBA:
3.Managing Data Integrity:
• Data integrity should be managed accurately because it protects the data from
unauthorized use. DBA manages relationship between the data to maintain data
consistency.
DBA has to decide that how much data should be backed up and how frequently the back
should be taken.
Roles of DBA:
5. Monitoring performance :
• If database is working properly then it doesn’t mean that there is no task for the
DBA. Yes f course, he has to monitor the performance of the database
Components of DBMS & Overall
Structure of DBMS:
1.Query Processor
5. File Manager: It manages the file space and the data structure used
to represent information in the database.
• DBMS Architecture helps users to get their requests done while connecting to the
database.
• We choose database architecture depending on several factors like the size of the
database, number of users, and relationships between the users
• Hence it is important to select the correct architecture for efficient data management.
• In 1-Tier Architecture the database is directly available to the user, the user can
directly sit on the DBMS and use it that is, the client, server, and Database are all
present on the same machine.
2-Tier Architecture:
• On the client side, the user interfaces and application programs are run.
• The server side is responsible for providing query processing and transaction
management functionalities.
2-Tier Architecture:
• The middle level which processes applications and databse server process the
queries.
• Advantages:
• Easy to modify without affecting other modules.
• Fast communication.
Data Models in DBMS:
• Data models are used to describe the structure of a database.
• A set of symbols and text is used to represent them so that all the
members of an organization can understand how the data is
organized.
Types of Data Models in DBMS:
1. Hierarchical Model.
2. Network Model
3. Relational Model
4. Entity-Relationship Model (ER Model)
1. Hierarchical Model:
• In this model, a child node will only have a single parent node.
• In this model, data is organized more like a graph, and allowed to have more than one parent
node.
• In the network database model, data is more related as more relationships are established in
• Also, as the data is more related, hence accessing the data is also easier and fast.
• You can design tables, normalize them to reduce data redundancy, and use
Structured Query language or SQL to access data from the tables.
• Some of the most popular databases are based on this database model. For
example, Oracle, MySQL, etc.
3.Relational Model :
Compare Hierarchical and Network
Model:
Hierarchical Network
1.It is based on tree like structure with one root. 1.It is based on records and links.
4.It does not uses client server architecture. 4.It uses client server architecture.
2.Supports many to many relationships & one to many 2.Supports many to many relationships & one to one
relationship. relationship.
4.There is partial data independence in this model. 4.This model provides data independence
2.Supports one to many relationships. 2.Supports many to many relationships & one to one
relationship.
3.Less Popular. 3.It is much Popular.
4.The main application of hierarchical data model is in 4.There are many application of relational model
the mainframe database system. which are unlimited.
ER-Model:
• ER Diagram is a visual representation of data that describes how data is related to
each other.
• Creation of ER diagram helps the designer to understand & specify the desired
• An entity may be any object, class, person or place. In the ER diagram, an entity can be
represented as rectangles.
• Weak entity is an entity that depends on another entity. Weak entity doesn't have
anay key attribute of its own.
b) Strong Entity :
An entity that have sufficient attributes to form a primary key is called as strong
entity set.
Components of ER-Model:
• Attributes: An Attribute describes a property or characterstic of an
entity.
• For example, Name, Age, Address etc can be attributes of a Student.
An attribute is represented using eclipse.
Components of ER-Model:
Types of Attributes:
1. Single-value attribute − Single-value attributes contain single value. For example − age of
employee.
2. Multi-value attribute − Multi-value attributes may contain more than one values. For example, a
person can have more than one phone number, email_address, etc.
3. Simple attribute − Simple attributes are atomic values, which cannot be divided further. For
3. Composite attribute − Composite attributes are made of more than one simple attribute. For
4. Derived attribute − Derived attributes are the attributes that do not exist in the physical
database, but their values are derived from other attributes present in the database.
5. Key attribute : Key attribute represents the main characterstic of an Entity. It is used to
represent a Primary key. Ellipse with the text underlined, represents Key Attribute.
Components of ER-Model:
ER-Diagram for hospital management system :
ER-Diagram for Library management
system :
Relationship/Cardinality Constraints:
• Relationships are represented by diamond-shaped box. Name of the relationship
is written inside the diamond-box.