7.2 Types of Databases

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 22

7.

Database Management Systems

7.2 Types of Databases


Types of Databases

1. Hierarchical database
2. Network database
3. Relational database
4. Object-Oriented database
1. Hierarchical Database
• A DBMS is said to be hierarchical if the relationships among data
in the database are established in such a way that one data item
is present as the subordinate of another one.
• Here subordinate means that items have 'parent-child'
relationships among them.
• In a hierarchical database, records contain information about the
parent/child relationships,
• Relationships among the records are One-to-Many, since each
data element is related only to one element above it.
• A hierarchical database is structured in such a way that data is
organized in the form of a “Tree” like structure. The structure
implies that a record can have also a repeating information
• No backward movement is possible/allowed in the hierarchical
database.
Hierarchical Database….
• Hierarchical Databases are very similar to your folder
structure on the laptop. Every folder can contain sub-
folder and each sub-folder can still hold more sub-
folders. Finally in some folders we will store files.
However, every child node (sub-folder) will have a
single parent (folder or sub-folder). Finally, we can
create a hierarchy of the dataset
• Hierarchical databases, however cannot solve many
purposes, its applications are restricted to one-to-one
mapping data structures. For example, it will work well
if you are using this data structure to show job profile
hierarchy in a corporate. But the structure will fail if the
reporting becomes slightly more complicated and a
single employee reports to many managers.
Hierarchal Database Cont..
Hierarchal Database Cont..
Hierarchical Database cont..
ADVANTAGES 4. Ease with which data can
1. It is easy to understand, be stored and retrieved in
simple to construct and structured, routine types
operate on of transactions.
2. Corresponds to a number
of natural hierarchically
organized domains - e.g., 5. Ease with which data can
assemblies in be extracted for reporting
manufacturing, personnel purposes.
organization in companies
3. Language is simple; uses 6. Structured and routine
constructs like GET, GET types of transaction
UNIQUE, GET NEXT, GET processing is fast and
NEXT WITHIN PARENT efficiently.
etc.
Hierarchical Database cont..
DISADVANTAGES
1. Data inconsistency occur 6. One-to many relationships
when the parent node is must be specified in
deleted that results in the advance, and are not
deletion of the child node. flexible.
2. Wastage of storage space 7. Cannot easily handle ad
3. Complex to design hoc requests for
4. Absence of structural information.
independence 8. Modifying a hierarchical
5. Requires knowledge of a database structure is
programming language. complex.
9. Great deal of redundancy.
2. Network Database
• A DBMS is said to be a Network DBMS if the relationships
among data in the database are of type Many-to-Many.
• This network model allows a record to have more than one
parent.
• In this network model, one can access a data element by
following one of several paths, because any data element or
record can be related to any number of other data elements.
• In a network database, relationships amongst data in the
database appear in the form of a graph /network data
structure.
• The structure of a network database is extremely
complicated because of these many-to-many relationships in
which one record can be used as a key of the entire
database.
Network Database Cont..
Network Database Cont..
ADVANTAGES DISADVANTAGES
1. Network many-to-many
1. Data access is easy in the relationships must be specified
network model than in advance
hierarchical
2. User is limited to retrieving
2. It is easy to design than data that can be accessed using
hierarchical the established links between
records. Cannot easily handle
3. Many to Many relationships ad hoc requests for information.
are easier to implement in
the than in the hierarchical 3. Requires knowledge of a
model. programming language.
4. Ability to provide 4. Absence of structural
sophisticated logical independence.
relationships among the
records
3. Relational Database …
• A DBMS is said to be a Relational if the data elements within
the database are stored in the form of simple tables.
• The relational database model is more popular than the
network and hierarchical database models.
• DBMS packages based on the relational model can link data
elements from various tables to provide information to users.
• Supports one to one, one to many and many to many
relationships.
• Some popular relational DBMS include Oracle, Sybase,
Ingress, Informix, Microsoft SQL Server, and Microsoft Access.
Relational Database Cont..
Relational Database Cont..
Relational Database Cont..
SECTION

SECTION-STUDENT SECTION-INSTRUCTOR
SECTION-KEY SECTION-KEY
STUDENT-KEY INSTRUCTOR-KEY

STUDENT INSTRUCTOR
COLLEGE-KEY COLLEGE-KEY

COLLEGE

Each file can have several parents. Both SECTION and COLLEGE are “parent” files..
Relational Database Cont..
Relational Database..
ADVANTAGES DISADVANTAGES
1. Flexible in that is can 1. Cannot process large
handle ad hoc amounts of business
information requests. transactions as quickly
2. Easy for programmers and efficiently as the
to work with. End users hierarchical and
can use this model with network models.
little effort or training.
3. Easier to maintain than
the hierarchical and
network models.
4. Object-Oriented Database..
• An Object-Oriented databases (OOD) is a DBMS in which information is
represented in the form of small, reusable chunks of software called objects.
• Objects are items that contain data as well as actions that read or process
that data. Each object consists of two elements:
– A piece of data (e.g., sound, video, text, or graphics, animations), and
– The instructions, or software programs called methods, for what to do
with the data.
• OOD supports inheritance, that is, new objects can be automatically created
by replicating some or all of the characteristics of one or more parent objects.
• OOD supports encapsulation, a mechanism whereby the implementation
details of an object are kept hidden from the user.
• OOD supports abstraction, a mechanism where you show only “relevant”
data and “hide” unnecessary details of an object from the user.
• OOD supports polymorphism, the ability of one object to be treated and
used like another object.
Polymorphism Example.
Object-Oriented Database…
• ADVANTAGES • DISADVANTAGES
1. Can store more types of
data (graphics, pictures, 1. They are more costly to
voice, and text) better than develop.
other structures. 2. Most organizations are
2. Can access data faster reluctant to abandon or
convert from those
3. Relatively easy to use and databases that they have
learn already invested money in
4. It is a key technology being developing and
used in multimedia web- implementing.
based applications for the
Internet and corporate
intranets and extranets.
5. Easier to share and
distribute objects than tables

You might also like