DMS Chapter-1 Notes
DMS Chapter-1 Notes
DATA:
FILE SYSTEM:
Some fields are duplicated in more than one file, which leads
to data redundancy. So to overcome this problem, we need to
create a centralized system, i.e. DBMS approach.
File system
Cost friendly
There is a very minimal to no set up and usage fee for File
Processing System. (In most cases, free tools are inbuilt in
computers.)
Easy to use
File systems require very basic learning and understanding, hence,
can be easily used.
High scalability
One can very easily switch from smaller to larger files as per his
needs.
Disadvantages of File Processing System :
Inconsistent Data
Due to data redundancy, same data stored at different places might
not match to each other.
DATABASE SYSTEM:
Database system
Data Sharing:
In the normal file system, data sharing is too difficult because file
sharing is a complex task. In DBMS, all the data is centralized, so
data sharing is a very easy task.
Data Concurrency:
Data Searching:
System Crashing:
There are various reasons by which our system can crash. Once a
system crashes, the file system loses all its files and data, and we
can not recover it again. But DBMS has a recovery manager which
can recover the data if the system crashes.
Data Security:
Maintenance:
APPLICATION OF DBMS
A Database Management System (DBMS) is a software application that
interacts with end-users, applications, and the database itself to capture
and analyze data. Its applications span across various industries and
sectors.
1. Railway Reservation System
In the rail route reservation framework, the information base is needed
to store the record or information of ticket appointments, status of
train’s appearance, and flight.
3. Banking
It is one of the major applications of databases. Banks have a huge
amount of data as millions of people have accounts that need to be
maintained properly. The database keeps the record of each user in a
systematic manner.
4. Universities
It is an undeniable application of the database. Universities have so
much data which can be stored in the database, such as student
information, teacher information, non-teaching staff information, course
information, section information, grade report information, and many
more. University information is kept safe and secure in the database.
5. Social media sites
Nowadays, everyone has a smartphone and accounts on various social
media sites like Facebook, LinkedIn, Pinterest, Twitter, Instagram, etc.
People can chat with their friends and family and make new friends from
all over the world. Social media has millions of accounts, which means
they have a huge amount of data that needs to be stored and maintained.
Social media sites use databases to store information about users,
images, videos, chats, etc.
6. E-commerce
E-commerce websites are one of the prominent applications of the
database. Websites such as Flipkart, Myntra, Amazon, Nykaa, Snapdeal,
Shopify, and many more, are online shopping websites where people
buy items online. These websites have so much data. These websites use
databases to securely store and maintain customer details, product
details, dealer details, purchase details, bank & card details, transactions
details, invoice details, etc.
7.Medical
There is a lot of important data collection in the medical field, so it is
necessary to use the database to store data related to the medical field,
such as patient details, medicine details, practitioner details, surgeon
details, appointment details, doctor schedule, patient discharge details,
payment detail, invoices, and other medical records.
8. Accounting and finance
When there is big data regarding accounting and finance, there is a need
to maintain a large amount of data, which is done with the help of a
database. The database stores data such as accounting details, bank
details, purchases of stocks, invoice details, sales records, asset details,
etc. Accounting and finance database helps in maintaining and analyzing
historical data.
9.Industries
The database management system is the main priority of industries
because they need to store huge amounts of data. The industry database
stores customer details, sales records, product lists, transactions, etc. All
the information is kept secure and maintained by the database.
10.Airlines system
It is one of the applications of database management systems that
contain data such as passenger name, passenger check-in, passenger
departure, flight schedule, number of flights, distance from source to
destination, reservation information, pilot details, accounting detail,
route detail, etc.
11. Telecommunication
In telecommunication database is required, which stores data such as
customer names, phone numbers, calling details, prepaid & post-paid
connection records, network usage, bill details, balance details, etc.
12. Human resource management
The human resource database stores data such as employee name,
joining details, designation, salary details, tax information, benefits &
goodies details, etc.
DATA ABSTRACTION
1. Physical Level:
This is the lowest level of data abstraction. It tells us how the data
is actually stored in memory.
It is the layer that defines how data is actually stored in the
database. It defines methods to access the data in the database. It
defines complex data structures in detail, so it is very complex to
understand, which is why it is kept hidden from the end user.
Data Administrators (DBA) decide how to arrange data and where
to store data.
2. Logical Level:
The logical or conceptual level is the intermediate or next
level of data abstraction.
3. View Level:
View or External Level is the highest level of data
abstraction.
There are different views at this level that define the parts of
the overall data of the database.
This level is for the end-user interaction; at this level, end
users can access the data based on their queries.
Even though the logical level uses simpler structures,
complexity remains because of the variety of information
stored in a large database. Many users of the database
system do not need all this information; instead, they need to
access only a part of the database.
DATA INDEPENDENCE
Fig.Data Independence
DATABASE SCHEMA
Fig.Database Schema
DATABASE INSTANCE
In DBMS, the data is stored for a particular amount of time and is called
an instance of the database. The database schema defines the attributes
of the database in the particular DBMS. The value of the particular
attribute at a particular moment in time is known as an instance of the
DBMS.
example: Let's say we have a single table student in the database; today,
the table has 100 records, so today, the instance of the database has 100
records. We are going to add another 100 records to this table by
tomorrow, so the instance of the database tomorrow will have 200
records in the table. In short, at a particular moment, the data stored in
the database is called the instance; this change over time as and when we
add, delete or update data in the database.
CODD’S RULE
Codd’s rules are proposed by a computer scientist named Dr. Edgar F.
Codd in 1985 and he also invent the relational model for database
management.
Rule 1: The Information Rule
All information, whether it is user information or metadata, that is
stored in a database must be entered as a value in a cell of a table. It is
said that everything within the database is organized in a table layout.
A database must be independent of the application that uses it. All its
integrity constraints can be independently modified without the need of
any change in the application.
The end-user must not be able to see that the data is distributed over
various locations. Users should always get the impression that the data is
located at one site only. This rule has been regarded as the foundation of
distributed database systems.
Database Administrators are typically the only people who work directly
with a DBMS.
The database system is divided into three components: Query
Processor, Storage Manager, and Disk Storage.
1. Query Processor
DML Compiler:
DDL Interpreter:
2. Storage Manager
Authorization Manager:
File Manager:
All the files and data structure of the database are managed by this
component.
Transaction Manager:
Buffer Manager:
3.Disk Storage
Data Dictionary:
Data Files
Indices
These indices are used to access and retrieve the data in a very fast
and efficient way.
TWO-TIER VS THREE-TIER ARCHITECTURE
1. ) Client Application.
2. ) Database.
The client in a Two-tier architecture application has the code written for
saving data in the database. The client sends a request to the server,
where it then processes the request and sends back the data.
The Database Layer is the layer that stores data with the retrieval
storage and execution methods made by the application layer. It
contains methods that connect to the database and performs the
required actions needed. These are Insert, update or delete. Just to
name a few.
Scalability :Each tier can scale horizontally. For example, you can
load-balance the Presentation tier among three servers to satisfy more
Web requests without adding servers to the Application and Data
tiers.
DATA MODELS
In the below figure, Electronics is the root node which has two children
i.e. Televisions and Portable Electronics. These two has further
children for which they act as parent. For example: Television has
children as Tube, LCD and Plasma, for these three Television act as
parent. It follows one to many relationship.
In the above figure, Project is the root node which has two children i.e.
Project 1 and Project 2. Project 1 has 3 children and Project 2 has 2
children. Total there are 5 children i.e Department A, Department B
and Department C, they are network related children as we said that
this model can have more than one parent. So, for the Department B
and Department C have two parents i.e. Project 1 and Project 2.
The relational data model was developed by E.F. Codd in 1970. There
are no physical links as they are in the hierarchical data model.
Following are the properties of the relational data model :