DataBase Management System (DBMS):
DataBase Management System is a collection of interrelated data and a set of programs to
access those data. The collection of data, usually referred to as the database,
contains information relevant to an enterprise.
The primary goal of a DBMS is to provide a way to store
and retrieve Database Information that is both convenient and efficient.
Database Systems are designed to manage large bodies of
information.
Management of data involves both defining structures for
storage of information and providing mechanisms for the manipulation of
information.
In addition, the
database system must ensure the safety of the information stored, despite
system crashes or attempts at unauthorized access.
If data are to be shared among several users, the system must
avoid possible anomalous results. Because information is so important in most
organizations, computer scientists have developed a large body of concepts and
techniques for managing data.
These concepts and techniques form the focus of this book.
This chapter briefly introduces the principles of database systems.
Database-System Applications:
Enterprise Information
◦ Sales: For customer, product, and purchase information.
◦ Accounting: For
payments, receipts, account balances, assets and other accounting information
◦ Human resources: For information about employees,
salaries, payroll taxes, and benefits, and for generation of paychecks.
◦ Manufacturing: For
management of the supply chain and for tracking production of items in
factories, inventories of items in warehouses and stores, and orders for items.
Banking and Finance
◦ Banking: For
customer information, accounts, loans, and banking transactions.
◦Credit card transactions:
For purchases on credit cards and generation of monthly statements. ◦ Finance:
For storing information about holdings, sales, and purchases of financial
instruments such as stocks and bonds; also for storing real-time market data to
enable online trading by customers and automated trading by the firm.
• Universities: For student information, course
registrations, and grades (in addition to standard enterprise information such
as human resources and accounting).
• Airlines: For reservations and schedule information.
Airlines were among the first to use databases in a geographically distributed
manner.
• Telecommunication: For keeping records of calls made,
generating monthly bills, maintaining balances on prepaid calling cards, and
storing information about the communication networks
What is Data?
Data is a collection of a distinct small unit of information. It
can be used in a variety of forms like text, numbers, media, bytes, etc. it can
be stored in pieces of paper or electronic memory, etc.
Word 'Data' is originated from the word 'datum' that means
'single piece of information.' It is plural of the word datum.
In computing, Data is Information that can be translated into a
form for efficient movement and processing. Data is interchangeable.
What is Database?
A Database is an organized collection of
data, so that it can be easily accessed and managed.
31.5M
647
How to find Nth Highest Salary in SQL
You can organize data into tables, rows, columns, and index it
to make it easier to find relevant information.
Database handlers create a database in such a way that only one set of
software program provides access of data to all the users.
The main purpose of the database is to operate a large amount of
information by storing, retrieving, and managing data.
There are many dynamic websites on the World Wide Web nowadays which are handled through
databases. For example, a model that checks the availability of rooms in a
hotel. It is an example of a dynamic website that uses a database.
There are many databases available like MySQL, Sybase, Oracle, MongoDB, Informix, PostgreSQL,
SQL Server, etc.
Modern databases are managed by the database management system
(DBMS).
SQL or
Structured Query Language is used to operate on the data stored in a database.
SQL depends on relational algebra and tuple relational calculus.
A cylindrical structure is used to display the image of a
database.
Evolution of
Databases
The database has completed more than 50 years of journey of its
evolution from flat-file system to relational and objects relational systems.
It has gone through several generations.
The Evolution
File-Based
1968 was the year when File-Based database were introduced. In
file-based databases, data was maintained in a flat file. Though files have
many advantages, there are several limitations.
One of the major advantages is that the file system has various
access methods, e.g., sequential, indexed, and random.
It requires extensive programming in a third-generation language
such as COBOL, BASIC.
Hierarchical
Data Model
1968-1980 was the era of the Hierarchical Database. Prominent
hierarchical database model was IBM's first DBMS. It was called IMS
(Information Management System).
In this model, files are related in a parent/child manner.
Below diagram represents Hierarchical Data Model. Small circle
represents objects.
Like file system, this model also had some limitations like complex implementation, lack structural independence, can't easily handle a many-many relationship, etc.
Network data model
Charles Bachman developed
the first DBMS at Honeywell called Integrated Data Store (IDS). It was
developed in the early 1960s, but it was standardized in 1971 by the CODASYL
group (Conference on Data Systems Languages).
In this model, files are related as owners and members, like to
the common network model.
Network data model identified the following components:
- Network schema (Database
organization)
- Sub-schema (views of database per
user)
- Data management language (procedural)
This model also had some limitations like system complexity and
difficult to design and maintain.
Relational
Database
1970 - Present: It is the era of Relational Database and Database
Management. In 1970, the relational model was proposed by E.F. Codd.
Relational database model has two main terminologies called
instance and schema.
The instance is a table with rows or columns
Schema specifies the structure like name of the relation, type
of each column and name.
This model uses some mathematical concept like set theory and
predicate logic.
The first internet database application had been created in
1995.
During the era of the relational database, many more models had
introduced like object-oriented model, object-relational model, etc.
Cloud database
Cloud database facilitates you to store, manage, and retrieve their structured, unstructured data via a cloud platform. This data is accessible over the Internet. Cloud databases are also called a database as service (DBaaS) because they are offered as a managed service.
Some best cloud options are:
- AWS (Amazon Web Services)
- Snowflake Computing
- Oracle Database Cloud Services
- Microsoft SQL server
- Google cloud spanner
Advantages of cloud database
Lower costs
Generally, company provider does not have to invest in
databases. It can maintain and support one or more data centers.
Automated
Cloud databases are enriched with a variety of automated
processes such as recovery, failover, and auto-scaling.
Increased accessibility
You can access your cloud-based database from any location,
anytime. All you need is just an internet connection.
NoSQL Database
A NoSQL database is an approach to design such databases that
can accommodate a wide variety of data models. NoSQL stands for "not only
SQL." It is an alternative to traditional relational databases in which
data is placed in tables, and data schema is perfectly designed before the
database is built.
NoSQL databases are useful for a large set of distributed data.
Some examples of NoSQL database system with their category are:
- MongoDB, CouchDB, Cloudant (Document-based)
- Memcached, Redis, Coherence (key-value
store)
- HBase, Big Table, Accumulo (Tabular)
Advantage of NoSQL
High Scalability
NoSQL can handle an extensive amount of data because of
scalability. If the data grows, NoSQL database scale it to handle that data in
an efficient manner.
High Availability
NoSQL supports auto replication. Auto replication makes it
highly available because, in case of any failure, data replicates itself to the
previous consistent state.
Disadvantage of NoSQL
Open source
NoSQL is an open-source database, so there is no reliable
standard for NoSQL yet.
Management challenge
Data management in NoSQL is much more complicated than
relational databases. It is very challenging to install and even more hectic to
manage daily.
GUI is not available
GUI tools for NoSQL database are not easily available in the
market.
Backup
Backup is a great weak point for NoSQL databases. Some
databases, like MongoDB, have no powerful approaches for data backup.
The Object-Oriented
Databases
The object-oriented databases contain data in the form of object
and classes. Objects are the real-world entity, and types are the collection of
objects. An object-oriented database is a combination of relational model
features with objects oriented principles. It is an alternative implementation
to that of the relational model.
Object-oriented databases hold the rules of object-oriented
programming. An object-oriented database management system is a hybrid
application.
The object-oriented database model contains the following
properties.
Object-oriented programming properties
- Objects
- Classes
- Inheritance
- Polymorphism
- Encapsulation
Relational database properties
- Atomicity
- Consistency
- Integrity
- Durability
- Concurrency
- Query processing
Graph Databases
A graph database is a NoSQL database. It is a graphical
representation of data. It contains nodes and edges. A node represents an
entity, and each edge represents a relationship between two edges. Every node
in a graph database represents a unique identifier.
Graph databases are beneficial for searching the relationship
between data because they highlight the relationship between relevant data.
Graph databases are very useful when the database contains a
complex relationship and dynamic schema.
It is mostly used in supply chain management, identifying the source of IP telephony.
DBMS (Data Base Management System):
Database management System is software which is used to store
and retrieve the database. For example, Oracle, MySQL, etc.; these are some
popular DBMS tools.
- DBMS provides the interface to
perform the various operations like creation, deletion, modification, etc.
- DBMS allows the user to create their
databases as per their requirement.
- DBMS accepts the request from the
application and provides specific data through the operating system.
- DBMS contains the group of programs
which acts according to the user instruction.
- It provides security to the database.
Advantage of DBMS
Controls redundancy
It stores all the data in a single database file, so it can
control data redundancy.
Data sharing
An authorized user can share the data among multiple users.
Backup
It provides Backup and recovery subsystem. This recovery system
creates automatic data from system failure and restores data if required.
Multiple user interfaces
It provides a different type of user interfaces like GUI,
application interfaces.
Disadvantage of DBMS
Size
It occupies large disk space and large memory to run
efficiently.
Cost
DBMS requires a high-speed data processor and larger memory to
run DBMS software, so it is costly.
Complexity
DBMS creates additional complexity and requirements.
RDBMS (Relational
Database Management System)
The word RDBMS is termed as 'Relational Database Management
System.' It is represented as a table that contains rows and column.
RDBMS is based on the Relational model; it was introduced by E.
F. Codd.
A relational database contains the following components:
- Table
- Record/ Tuple
- Field/Column name /Attribute
- Instance
- Schema
- Keys
An RDBMS is a tabular DBMS that maintains the security,
integrity, accuracy, and consistency of the data.
File System Approach
File based systems were an early attempt to computerize the
manual system. It is also called a traditional based approach in which a
decentralized approach was taken where each department stored and controlled
its own data with the help of a data processing specialist. The main role of a
data processing specialist was to create the necessary computer file
structures, and also manage the data within structures and design some
application programs that create reports based on file data.
In the above figure:
Consider an example of a student's file system. The student file
will contain information regarding the student (i.e. roll no, student name,
course etc.). Similarly, we have a subject file that contains information about
the subject and the result file which contains the information regarding the
result.
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.
DBMS:
A database approach is a well-organized collection of data that
are related in a meaningful way which can be accessed by different users but
stored only once in a system. The various operations performed by the DBMS
system are: Insertion, deletion, selection, sorting etc.
In the above figure,
In the above figure, duplication of data is reduced due to
centralization of data.
There are the following differences between
DBMS and File systems:
|
Basis |
DBMS Approach |
File System Approach |
|
Meaning |
DBMS is a collection
of data. In DBMS, the user is not required to write the procedures. |
The file system is a
collection of data. In this system, the user has to write the procedures for
managing the database. |
|
Sharing of data |
Due to the
centralized approach, data sharing is easy. |
Data is distributed
in many files, and it may be of different formats, so it isn't easy to share
data. |
|
Data Abstraction |
DBMS gives an
abstract view of data that hides the details. |
The file system
provides the detail of the data representation and storage of data. |
|
Security and
Protection |
DBMS provides a good
protection mechanism. |
It isn't easy to
protect a file under the file system. |
|
Recovery Mechanism |
DBMS provides a
crash recovery mechanism, i.e., DBMS protects the user from system failure. |
The file system
doesn't have a crash mechanism, i.e., if the system crashes while entering
some data, then the content of the file will be lost. |
|
Manipulation
Techniques |
DBMS contains a wide
variety of sophisticated techniques to store and retrieve the data. |
The file system
can't efficiently store and retrieve the data. |
|
Concurrency Problems |
DBMS takes care of
Concurrent access of data using some form of locking. |
In the File system,
concurrent access has many problems like redirecting the file while deleting
some information or updating some information. |
|
Where to use |
Database approach
used in large systems which interrelate many files. |
File system approach
used in large systems which interrelate many files. |
|
Cost |
The database system
is expensive to design. |
The file system
approach is cheaper to design. |
|
Data Redundancy and
Inconsistency |
Due to the
centralization of the database, the problems of data redundancy and
inconsistency are controlled. |
In this, the files
and application programs are created by different programmers so that there
exists a lot of duplication of data which may lead to inconsistency. |
|
Structure |
The database
structure is complex to design. |
The file system
approach has a simple structure. |
|
Data Independence |
In this system, Data
Independence exists, and it can be of two types.
|
In the File system
approach, there exists no Data Independence. |
|
Integrity
Constraints |
Integrity
Constraints are easy to apply. |
Integrity
Constraints are difficult to implement in file system. |
|
Data Models |
In the database
approach, 3 types of data models exist:
|
In the file system
approach, there is no concept of data models exists. |
|
Flexibility |
Changes are often a
necessity to the content of the data stored in any system, and these changes
are more easily with a database approach. |
The flexibility of the system is less as
compared to the DBMS approach. |
|
Examples |
Oracle, SQL Server,
Sybase etc. |
Cobol, C++ etc. |
DBMS Architecture
- The
DBMS design depends upon its architecture. The basic client/server
architecture is used to deal with a large number of PCs, web servers,
database servers and other components that are connected with networks.
- The
client/server architecture consists of many PCs and a workstation which
are connected via the network.
- DBMS
architecture depends upon how users are connected to the database to get
their request done.
Types of DBMS Architecture
Database architecture can be seen as a single tier or
multi-tier. But logically, database architecture is of two types like: 2-tier architecture and 3-tier architecture.
1-Tier
Architecture
- In
this architecture, the database is directly available to the user. It
means the user can directly sit on the DBMS and uses it.
- Any
changes done here will directly be done on the database itself. It doesn't
provide a handy tool for end users.
- The
1-Tier architecture is used for development of the local application,
where programmers can directly communicate with the database for the quick
response.
2-Tier
Architecture
- The
2-Tier architecture is same as basic client-server. In the two-tier
architecture, applications on the client end can directly communicate with
the database at the server side. For this interaction, API's like: ODBC, JDBC are
used.
- The
user interfaces and application programs are run on the client-side.
- The
server side is responsible to provide the functionalities like: query
processing and transaction management.
- To
communicate with the DBMS, client-side application establishes a
connection with the server side.
Fig: 2-tier Architecture
3-Tier
Architecture
- The
3-Tier architecture contains another layer between the client and server.
In this architecture, client can't directly communicate with the server.
- The
application on the client-end interacts with an application server which
further communicates with the database system.
- End
user has no idea about the existence of the database beyond the
application server. The database also has no idea about any other user
beyond the application.
- The
3-Tier architecture is used in case of large web application.
