Data Base Chapter 1 - Iot
Data Base Chapter 1 - Iot
Data Base Chapter 1 - Iot
Chapter 1
Introduction
A DBMS (Database management system) is used to create and maintain the structure
of a database, and then to enter, manipulate and retrieve the data it stores. Creating
an efficient database design is the key to effectively using a database to support an
organization's business operations. A database management system (DBMS) is a
computer software that manages databases, it may use any of a variety of database
models, such as the hierarchical DBMS, network DBMS and relational DBMS . In
large systems, a DBMS allows users and other software to store and retrieve data in a
structured way.
A HISTORICAL PERSPECTIVE
1960's-1970's: The emergence of the first type of DBMS, the hierarchical DBMS. IBM
had the first model, developed on IBM 360 and their (DBMS) was called IMS, originally
it was written for the Apollo program. This type of DBMS was based on binary trees,
where the shape was like a tree and relations were only limited between parent and
child records. The benefits were numerous; less redundant data, data independence,
security and integrity, which all lead to efficient searches. Nonetheless; there were
some disadvantages such as; complex implementation, was hard to manage because
of the absence of standards, which made it harder to handle many relationships
1970's- 1990's: The emergence of the relational DBMS on the hands of Edgar Codd.
He worked at IBM, and he was unhappy with the navigational model of the CODASYL
APPROACH. To him, a tool for searching, such as a search facility was very useful,
and it was absent . In 1970, he proposed a new approach to database construction,
which made the creation of a Relational DBMS intended for Large Shared Data Banks,
possible and easy to grab . Moreover; This was a new system for entering data and
working with big databases, where the idea was to use a table of records. All tables
Electrical & computer Engg., 1|P ag e
Database Systems IV Year
will be then linked by either one to one relationships, one to many, or many to many.
when elements took space and were not useful, it was easy to remove them from the
original table, and all the other "entries" in other tables linked to this record were
removed. Worth mentioning, is that two initial projects were launched, the R program
at IBM, and INGRES program at the university of California. In 1985, the object
oriented DBMS was developed, but it did not have any booming commercial profit
because of the high unjustified costs to change systems, and format. In 1990, the
DBMS took on a new object oriented approach joint with relational DBMS . In this
approach, text, multimedia, internet and web use in conjunction with DBMS were
available and possible.
Most significant, perhaps, DBMSs have entered the Internet Age. While the first
generation of websites stored their data exclusively in operating systems files, the use
of a DBMS to store data accessed through a Web browser is becoming widespread.
Queries are generated through Web-accessible forms and answers are formatted using
a markup language such as HTML to be easily displayed in a browser. All the database
vendors are adding features to their DBMS aimed at making it more suitable for
deployment over the Internet.
Components of a DBMS
The software of DBMS seems very complex and confusing. But if we look DBMS
internally then it is just a combination of different modules having specific tasks. Each
module of DBMS performs particular task and operation. DBMS fetches query from
the user, works on it using different plans and produces results as the data fed in it.
There are many user interfaces which are used by end users to make queries.
Query Processor
Machine only understand low level language, so it is the task of query processor to
convert user’s queries in the series of low level instruction. Then after, it sends these
instructions to database manager for execution. There are various component of of
query processor.
DDL Complier: it records the ddl statements into set of tables containing data
dictionary. It coverts ddl statement into object form from source form.
DML Complier: It converts DML statements into low level instructions that are more
easy to understand by query evaluation engine.
Query Evaluation Engine: Queries generated by DML compiler are executed in Quesry
evaluation Engine.
Database Manager
Database manager components issue the interface between low level data, application
program and queries. It is responsible for the backup and recovery operations of
database. Also it controls the consistency and integrity of data. Security is also
performed by the database manager.
Authority and integrity manager: Authority manager is responsible for checking the
authority of users to access and use information in database. Integrity manager check
the integrity constrains like various keys (Primary, unique etc.)
File manager: The task of file manager is to ensure that file space is managed
correctly. Also the allocation of disk space is managed by file manager.
Buffer Manager: It manages the data fetched from disk storage into main memory. Its
task is to send blocks from disk to main memory.
Data Structure
Data Files: These are the files that stored data base.
Data Dictionary: Data dictionary carries the data about data means it stores the meta
data of data structure.
Access Acids: Acid properties are used to improve the performance of database
management system. They make the search operations very fast.
Statistical Data: It stores some information that are used by query processor to choose
the best way to execute queries.
Functions of a DBMS
(ii) Data Manipulation Management: A DBMS furnishes users with the ability to
retrieve, update and delete existing data in the database.
(iii) Data Definition Services: The DBMS accepts the data definitions such as
external schema, the conceptual schema, the internal schema, and all the associated
mappings in source form.
(vi) Authorization / Security Management: The DBMS protects the database against
unauthorized access, either international or accidental. It furnishes mechanism to
ensure that only authorized users an access the database.
{vii) Backup and Recovery Management: The DBMS provides mechanisms for
backing up data periodically and recovering from different types of failures. This
prevents the loss of data,
(viii) Concurrency Control Service: Since DBMSs support sharing of data among
multiple users, they must provide a mechanism for managing concurrent access to the
database. DBMSs ensure that the database kept in consistent state and that integrity
of the data is preserved.
(x) Database Access and Application Programming Interfaces: All DBMS provide
interface to enable applications to use DBMS services. They provide data access via
Structured Query Language (SQL). The DBMS query language contains two
components: (a) a Data Definition Language (DDL) and (b) a Data Manipulation
Language (DML).
Types of Models
A database model is a type of data model that determines the logical structure of a
database and fundamentally determines in which manner data can be stored,
organized and manipulated. The most popular example of a database model is the
relational model, which uses a table-based format.
Hierarchical Model
Network Model
Entity-relationship Model
Relational Model
Hierarchical Model
This database model organizes data into a tree-like-structure, with a single root, to
which all the other data is linked. The hierarchy starts from the Root data, and
expands like a tree, adding child nodes to the parent nodes.
In this model, a child node will only have a single parent node. This model efficiently
describes many real-world relationships like index of a book, recipes etc. In
hierarchical model, data is organized into tree-like structure with one one-to-many
relationship between two different types of data, for example, one department can have
many courses, many professors and of-course many students.
Network Model
This is an extension of the Hierarchical model. In this model data is organised more
like a graph, and are allowed to have more than one parent node. In this database
model data is more related as more relationships are established in this database
model. Also, as the data is more related, hence accessing the data is also easier and
fast. This database model was used to map many-to-many data relationships.
This was the most widely used database model, before Relational Model was
introduced.
Entity-relationship Model
In this database model, relationships are created by dividing object of interest into
entity and its characteristics into attributes.
Different entities are related using relationships. E-R Models are defined to represent
the relationships into pictorial form to make it easier for different stakeholders to
understand.
This model is good to design a database, which can then be turned into tables in
relational model(explained below). Let's take an example, If we have to design a School
Database, then Student will be an entity with attributes name, age, address etc. As
Address is generally complex, it can be another entity with attributes street name,
pincode, city etc, and there will be a relationship between them.
Relationships can also be of different types. To learn about E-R Diagrams in details,
click on the link.
Relational Model
1970, and since then it has been the most widely used database model, infact, we can
say the only database model used around the world.
The basic structure of data in the relational model is tables. All the information related
to a particular type is stored in rows of that table. Hence, tables are also known as
relations in relational model. In the coming tutorials we will learn how to design
tables, normalize them to reduce data redundancy and how to use Structured Query
language to access data from tables.
The relational database model has a widely variety of applications. However it does not
easily support the distribution of one database across a number of servers. Due to
this, object-oriented database management system was developed.
In these databases, the users can define own data access methods, the representation
of data and the method of manipulating it. An object-oriented database stores and
maintains objects.
Database design is a framework that the database uses for planning, storing and
managing data in companies and organizations. Data and database design are the
lifeblood of every company.
We can say that the consistency of a data is achieved when the database is designed
in such a way so it can store only useful and often most required data.
In this article, we will explain you the main phases that create database design and
their roles in the design.
1. Conceptual design
When every data requirement is stored and analyzed, the next thing that we need to
do is creating a conceptual database plan. Here, a highly leveled conceptual data
model is used. This phase is called conceptual design.When the conceptual design
phase is in progress, the basic data modeling operations can be deployed to define the
high-level user operations that are noted during analysis of the functions.
2. Logical Design
The logical phase of database design is also called the data modeling mapping phase.
This phase gives us a result of relation schemas. The basis for these schemas is the
ER or the Class Diagram.To create the relation schemas is mainly mechanical
Electrical & computer Engg., 9|P ag e
Database Systems IV Year
operation. There are rules for transferring the ER model or class diagram to relation
schemas.
3. Normalization
Normalization is, in fact, the last piece of the logical design puzzle. The main purpose
of normalization is to remove superfluity and every other potential anomaly during the
update.Normalization in database design is a way to change the relation schema to
reduce any superfluity. With every normalization phase, a new table is added to the
database.
4. Physical Design
The last phase of database design is the physical design phase. In this phase, we
implement the database design. Here, a DBMS (Database Management System) must
be chosen to use.For instance, different DBM systems have different names for every
datatype and they have different data types.SQL clauses are written to help in creating
the database. Also, the indexes and the integrity constraints (rules) are defined in this
phase. And finally the data is added and the database can finally be tested.