Você está na página 1de 9

SUBJECT: DBMS (ECEg4172) Introduction to DBMS

Chapter 1: Introduction to DBMS

1.1 Introduction

Database: A database is simply an organized collection of related data, typically stored on disk, and
accessible by possibly many concurrent users. Databases are generally separated into application areas. For
example, one database may contain Human Resource (employee and payroll) data; another may contain
sales data; another may contain accounting data; and so on. Databases are managed by a DBMS.

Database Management System (DBMS): A Database Management System (DBMS) is a set of programs
that manages any number of databases.
A DBMS is responsible for:
• accessing data
• inserting, updating, and deleting data
• security
• integrity, facilitated by:
o locking
o logging
o application-defined rules, including triggers
• supporting batch and on-line programs
• facilitating backups and recoveries
• optimizing performance
• maximizing availability
• maintaining the catalogue and directory of database objects
• managing the buffer pools
• acting as an interface to other systems programs
• supporting user interface packages, such as the popular SQL interface for relational database
systems

1.2 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

1|Page

PREPARED BY: RITURAJ JAIN WOLLEGA UNIVERSITY, NEKEMTE


SUBJECT: DBMS (ECEg4172) Introduction to DBMS

disadvantages such as; complex implementation, was hard to manage because of the absence of standards,
which made it harder to handle many relationships.
1960's-1970's: The emergence of the network DBMS. Charles Bachmann developed first DBMS at
Honeywell, Integrated Data Store (IDS) then a group called CODASYL who is responsible for the creation
of COBOL, had that system standardized. However; the CODASYL group invented what they call the
"CODASYL APPROACH. Based on that approach many systems using network DBMS were developed
for business use. In this model, each record can have multiple parents in comparison with one in the
hierarchical DBMS. It is made of sets of relationships where a set represents a one to many relationship
between the owner and the member. The main and unfortunate disadvantage was that the System was
complex and there was difficulty in design and maintenance, it is believed that the Lack of structural
independence was the main cause.

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 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 orientedapproach joint with
relational DBMS. In this approach, text, multimedia, internet and web use in conjunction with DBMS were
available and possible.

1.3 Components of DBMS


A database management system (DBMS) consists of several components. Each component plays very
important role in the database management system environment. The major components of database
management system are:
• Software

• Hardware

• Data

• Procedures

• Database Access Language

2|Page

PREPARED BY: RITURAJ JAIN WOLLEGA UNIVERSITY, NEKEMTE


SUBJECT: DBMS (ECEg4172) Introduction to DBMS

Software
The main component of a DBMS is the software. It is the set of programs used to handle the database and
to control and manage the overall computerized database
1. DBMS software itself, is the most important software component in the overall system
2. Operating system including network software being used in network, to share the data of database
among multiple users.
3. Application programs developed in programming languages such as C++, Visual Basic that are used
to access database in database management system. Each program contains statements that request
the DBMS to perform operation on database. The operations may include retrieving, updating,
deleting data etc. The application program may be conventional or online workstations or terminals.

Hardware
Hardware consists of a set of physical electronic devices such as computers (together with associated I/O
devices like disk drives), storage devices, I/O channels, electromechanical devices that make interface
between computers and the real world systems etc, and so on. It is impossible to implement the DBMS
without the hardware devices, In a network, a powerful computer with high data processing speed and a
storage device with large storage capacity is required as database server.

Data
Data is the most important component of the DBMS. The main purpose of DBMS is to process the data. In
DBMS, databases are defined, constructed and then data is stored, updated and retrieved to and from the
databases. The database contains both the actual (or operational) data and the metadata (data about data or
description about data).

Procedures
Procedures refer to the instructions and rules that help to design the database and to use the DBMS. The
users that operate and manage the DBMS require documented procedures on hot use or run the database
management system. These may include.
1. Procedure to install the new DBMS.
2. To log on to the DBMS.
3. To use the DBMS or application program.
4. To make backup copies of database.
5. To change the structure of database.
6. To generate the reports of data retrieved from database.

3|Page

PREPARED BY: RITURAJ JAIN WOLLEGA UNIVERSITY, NEKEMTE


SUBJECT: DBMS (ECEg4172) Introduction to DBMS

Database Access Language


The database access language is used to access the data to and from the database. The users use the
database access language to enter new data, change the existing data in database and to retrieve required
data from databases. The user write a set of appropriate commands in a database access language and
submits these to the DBMS. The DBMS translates the user commands and sends it to a specific part of the
DBMS called the Database Jet Engine. The database engine generates a set of results according to the
commands submitted by user, converts these into a user readable form called an Inquiry Report and then
displays them on the screen. The administrators may also use the database access language to create and
maintain the databases.
The most popular database access language is SQL (Structured Query Language). Relational databases are
required to have a database query language.

Users
The users are the people who manage the databases and perform different operations on the databases in
the database system. There are three kinds of people who play different roles in database system
1. Application Programmers
2. Database Administrators
3. End-Users

Application Programmers
The people who write application programs in programming languages (such as Visual Basic, Java, or
C++) to interact with databases are called Application Programmer.

Database Administrators
A person who is responsible for managing the overall database management system is called database
administrator or simply DBA.

End-Users
The end-users are the people who interact with database management system to perform different
operations on database such as retrieving, updating, inserting, deleting data etc.

1.4 Database Models


A database model shows the logical structure of a database, including the relationships and constraints that
determine how data can be stored and accessed. Individual database models are designed based on the rules

4|Page

PREPARED BY: RITURAJ JAIN WOLLEGA UNIVERSITY, NEKEMTE


SUBJECT: DBMS (ECEg4172) Introduction to DBMS

and concepts of whichever broader data model the designers adopt. Most data models can be represented
by an accompanying database diagram.

Types of database models


There are many kinds of data models. Some of the most common ones include:
• Relational model
• Hierarchical database model
• Network model
• Object-oriented database model
• Entity-relationship model

Relational model
The most common model, the relational model sorts data into tables, also known as relations, each of
which consists of columns and rows. Each column lists an attribute of the entity in question, such as price,
zip code, or birth date. Together, the attributes in a relation are called a domain. A particular attribute or
combination of attributes is chosen as a primary key that can be referred to in other tables, when it’s called
a foreign key.
Each row, also called a tuple, includes data about a specific instance of the entity in question, such as a
particular employee.

The model also accounts for the types of relationships between those tables, including one-to-one, one-to-
many, and many-to-many relationships. Here’s an example:

Hierarchical model
The hierarchical model organizes data into a tree-like structure, where each record has a single parent or
root. Sibling records are sorted in a particular order. That order is used as the physical order for storing the
database. This model is good for describing many real-world relationships.

5|Page

PREPARED BY: RITURAJ JAIN WOLLEGA UNIVERSITY, NEKEMTE


SUBJECT: DBMS (ECEg4172) Introduction to DBMS

Network model
The network model builds on the hierarchical model by allowing many-to-many relationships between
linked records, implying multiple parent records. Based on mathematical set theory, the model is
constructed with sets of related records. Each set consists of one owner or parent record and one or more
member or child records. A record can be a member or child in multiple sets, allowing this model to
convey complex relationships.

The Object-Oriented Data Model


A data model is a logic organization of the real world objects (entities), constraints on them, and the
relationships among objects. A DB language is a concrete syntax for a data model. A DB system
implements a data model.
A core object-oriented data model consists of the following basic object-oriented concepts:

6|Page

PREPARED BY: RITURAJ JAIN WOLLEGA UNIVERSITY, NEKEMTE


SUBJECT: DBMS (ECEg4172) Introduction to DBMS

(1) Object and object identifier: Any real world entity is uniformly modeled as an object (associated with a
unique id: used to pinpoint an object to retrieve).
(2) Attributes and methods: every object has a state (the set of values for the attributes of the object) and a
behavior (the set of methods - program code - which operate on the state of the object). The state and
behavior encapsulated in an object are accessed or invoked from outside the object only through explicit
message passing.
[An attribute is an instance variable, whose domain may be any class: user-defined or primitive. A class
composition hierarchy (aggregation relationship) is orthogonal to the concept of a class hierarchy. The link
in a class composition hierarchy may form cycles. ]
(3) Class: a means of grouping all the objects which share the same set of attributes and methods. An
object must belong to only one class as an instance of that class (instance-of relationship). A class is
similar to an abstract data type. A class may also be primitive (no attributes), e.g., integer, string, Boolean.
(4) Class hierarchy and inheritance: derive a new class (subclass) from an existing class (superclass). The
subclass inherits all the attributes and methods of the existing class and may have additional attributes and
methods. single inheritance (class hierarchy) vs. multiple inheritance (class lattice).

Entity-relationship model
This model captures the relationships between real-world entities much like the network model, but it isn’t
as directly tied to the physical structure of the database. Instead, it’s often used for designing a database
conceptually.
Here, the people, places, and things about which data points are stored are referred to as entities, each of
which has certain attributes that together make up their domain. The cardinality, or relationships between
entities, are mapped as well.

7|Page

PREPARED BY: RITURAJ JAIN WOLLEGA UNIVERSITY, NEKEMTE


SUBJECT: DBMS (ECEg4172) Introduction to DBMS

1.5 Main Phases of Database Design


In the picture below there are the main phases of database design. Database design is connected with
application design.
The requirements and the collection analysis phase produce both data requirements and functional
requirements. The data requirements are used as a source of database design. In parallel with specifying the
data requirements, it is useful to specify the known functional requirements of the application. These
consist of user-defined operations that will be applied to the database (retrievals and updates). The
functional requirements are used as a source of application software design. Of course some functions may
produce also needs for database design.

8|Page

PREPARED BY: RITURAJ JAIN WOLLEGA UNIVERSITY, NEKEMTE


SUBJECT: DBMS (ECEg4172) Introduction to DBMS

Conceptual Design
Once all the requirements have been collected and analysed, the next step is to create a conceptual schema
for the database, using a high level conceptual data model. This phase is called conceptual design.
The result of this phase is an Entity-Relationship (ER) diagram. It is a high-level data model of the specific
application area. It describes how different entities are related to each other. It also describes what
attributes each entity has. It includes the definitions of all the concepts (entities, attributes) of the
application area.

Logical Design
The result of the logical design phase (or data model mapping phase) is a set of relation schemas. The ER
diagram is the basis for these relation schemas. To create the relation schemas is quite a mechanical
operation. There are rules how the ER model is transferred to relation schemas.
The relation schemas are the basis for table definitions. In this phase (if not done in previous phase) the
primary keys and foreign keys are defined.

Normalization
Normalization is the last part of the logical design. The goal of normalization is to eliminate redundancy
and potential update anomalies.
Redundancy means that the same data is saved more than once in a database. Update anomaly is a
consequence of redundancy. If a piece of data is saved in more than one place, the same data must be
updated in more than one place.
Normalization is a technique by which one can modify the relation schema to reduce the redundancy. Each
normalization phase adds more relations (tables) into the database.

Physical Design
The goal of the last phase of database design, physical design, is to implement the database. At this phase
one must know which database management system (DBMS) is used. For example, different DBMS's have
different names for data types and have different data types.
The SQL clauses to create the database are written. The indexes, the integrity constraints (rules) and the
users' access rights are defined.

9|Page

PREPARED BY: RITURAJ JAIN WOLLEGA UNIVERSITY, NEKEMTE

Você também pode gostar