0% found this document useful (0 votes)
16 views

3.BIT2103_3Database Systems_Architecture and Components

Uploaded by

birungiderick887
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

3.BIT2103_3Database Systems_Architecture and Components

Uploaded by

birungiderick887
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

BIT2103 - Database Management Systems

CHAPTER 3
Database Systems_Architecture
and Components.

Bachelor of Information Technology


What is Data?

□ Data is facts and statistics stored or free flowing


over a network, generally it's raw and unprocessed.

Database
A Database is a collection of related data organised
in a way that data can be easily accessed, managed
and updated.

© ISBAT UNIVERSITY - 2019. 15-Oct-22


RDBMS

□A RDBMS is a software that allows creation, definition and


manipulation of database, allowing users to store, process and
analyze data easily.
□ DBMS provides us with an interface or a tool, to perform various
operations like creating database, storing data in it, updating data,
creating tables in the database and a lot more.
□ DBMS also provides protection and security to the databases. It also
maintains data consistency in case of multiple users.

Here are some examples of popular DBMS used these days:


□ MySql
□ Oracle
□ SQL Server
□ IBM DB2
□ PostgreSQL
□ Amazon SimpleDB (cloud based) etc.
Characteristics of Relational Database
Management System

1. Data stored into Tables


2. Reduced Redundancy
3. Data Consistency
4. Support Multiple user and Concurrent Access
5. Query Language
6. Security

7. supports transactions

£9 G\J
8;
Better
Data redundancy Easy Integration
Advantages of RDBMS

□ Segregation of application program.


□ Minimal data duplicacy or data redundancy.
□ Easy retrieval of data using the Query Language.
□ Reduced development time and maintenance need.
□ With Cloud Datacenters, we now have Database
Management Systems capable of storing almost infinite
data.
□ Seamless integration into the application programming
languages which makes it very easier to add a database
to almost any application or website.
Components of RDBMS
RDBMS Characteristics
8

□ System should be designed for easy maintenance


□ System should be designed to correlate different data to
meet the new requirements
□ Minimum Redundancy
□ Independent central repository
□ Integrated Database
□ Automatic Recovery
# DBMS RDBMS

In DBMS data are store as a file. In Rdbms data are store in a tabular form.
1

2 Dbms follows hierarchical form of structure tabular structure

3 Dbms does not support client server architecture. Rdbms supports client server architecture.

4 Dbms does not support distributed architecture. Rdbms support distributed architecture.

In rdbms there are multiple level of security, at logging level, at command


5 In dbms there are no security of data.
level, at object level.

6 Dbms may satisfy less than 7 rules of Dr. e.f codd Rdbms usually satisfy more than 7 to 8 rules of Dr. e.f codd.

Normalization is not available in DBMS. Normalization is available in RDBMS.


7

8 Examples of DBMS are file systems, xml etc. Example of RDBMS are mysql, postgre, sql server, oracle etc.

15-Oct-22
RDBMS Architecture

□ A Database Management system can be centralised(all the data stored at one


location), decentralised(multiple copies of database at different locations) or
hierarchical, depending upon its architecture.

1-Tier DBMS
Schema in the Database Management
System?
A schema can be defined as the design of a database. The overall description
of the database is called the database schema. It can be categorized into three
parts. These are:

• Physical
Schema
• Logical
Schema
• View Schema
.•A*.
>5-
□ A physical schema can be defined as the
design of a database at its physical level. In this
level, it is expressed how data is stored in
blocks of storage.
□ A logical schema can be defined as the design
of the database at its logical level.
□ View schemacan be defined as the design of
the database at the view level, which generally
describes end-user interaction with database
systems
Data Independence

□ Data independence refers characteristic of being able


to modify the schema at one level of the database
system without altering the schema at the next higher
level
□ There are two types of data independence:
□ Logical Data Independence
□ Physical Data Independence
External level

J
Logical Data Independence
kr
1

Logical level
jh

• Physical Data Independence

Physical level

Stored Database
Logical Data Independence
□ Logical data independence refers characteristic of being able to change the
conceptual schema without having to change the external schema.
□ Logical data independence is used to separate the external level from the
conceptual view.
□ If we do any changes in the conceptual view of the data, then the user view
of the data would not be affected.
□ Logical data independence occurs at the user interface level.
Physical Data Independence
□ Physical data independence can be defined as the capacity to change the
internal schema without having to change the conceptual schema.
□ If we do any changes in the storage size of the database system server, then
the Conceptual structure of the database will not be affected.
□ Physical data independence is used to separate conceptual levels from the
internal levels.
□ Physical data independence occurs at the logical interface level.
Logica Data Independence Physical Data Independence
Logical Data Independence is mainly concerned with the structure or Mainly concerned with the storage of the data.
changing the data definition.

It is difficult as the retrieving of data is mainly dependent on the logical It is easy to retrieve.
structure of data.

Compared to Logic Physical independence it is difficult to achieve logical Compared to Logical Independence it is easy to achieve physical data
data independence. independence.

You need to make changes in the Application program if new fields are A change in the physical level usually does not need change at the
added or deleted from the database. Application program level.

Modification at the logical levels is significant whenever the logical Modifications made at the internal levels may or may not be needed to
structures of the database are changed. improve the performance of the structure.

Concerned with conceptual schema Concerned with internal schema

Example: change in compression techniques, hashing


Example: Add/Modify/Delete a new attribute
algorithms, storage devices, etc
Database Models
20

Databases can be differentiated based on functions and model of the data.

A data model describes a container for storing data, and the process of storing
and retrieving data from that container.

The analysis and design of data models has been the basis of the evolution of
databases.

Each model has evolved from the previous one. The commonly used
Database Models are as follows:

Hierarchical Network Relational


Data Model Data Model Data Model
Flat-file Data Model
21

In this model, the database consists of only one table or file.

This model is used for simple databases - for example, to store the roll
numbers, names, subjects, and marks of a group of students.

This model cannot handle very complex data. It can cause redundancy when data is
repeated more than once.
> Following table depicts the structure of a flat file database:

Roll Number First Name Last Name Subject Marks


45 Jones Bill Maths 84

45 Jones Bill Science 75

50 Mary Mathew Science 80


Hierarchical Data Model 1-3
22

In this model, different records are inter-related through hierarchical or tree-like


structures.

In this model, relationships are thought of in terms of children and


parents.
ft_______________________________________________________________________________________________________________________________
_

A parent record can have several children, but a child can have only one parent.

To find data stored in this model, the user needs to know the structure of the tree.

Windows Registry is an example of a hierarchical database storing configuration


settings and options on Microsoft Windows operating systems.
Hierarchical Data Model 2-3
23
> Following figure illustrates an example of a hierarchical representation:

> Within the hierarchical model, Department is perceived as the parent of the segment.
> The tables, Project and Employee, are children.
> A path that traces the parent segments beginning from the left, defines the tree.
> This ordered sequencing of segments tracing the hierarchical structure is called the
hierarchical path.
Hierarchical Data Model 3-3
24

> The advantages of a hierarchical model are as follows:

Data is held in a common database so data sharing becomes easier, and


security is provided and enforced by a DBMS.

Data independence is provided by a DBMS, which reduces the effort and costs
in maintaining the program.

This model is very efficient when a database contains a large volume of data.

> For example, a bank's customer account system fits the hierarchical model well
because each customer's account is subject to a number of transactions.
Network Data Models

This model is similar to the Hierarchical Data Model. It is actually a subset of the
network model.

In the network model, data is stored in sets, instead of the hierarchical tree format.
This solves the problem of data redundancy.

The set theory of the network model does not use a single-parent tree hierarchy. It
allows a child to have more than one parent. Thus, the records are physically linked
.through linked-lists.

For every database, a definition of the database name, record type for each record,
and the components that make up those records is stored. This is called its network
schema.
A portion of the database as seen by the application's programs that actually
produce the desired information from the data contained in the database is called
.sub-schema
It allows application programs to access the required data from the database. Raima
Database Manager (RDM) Server by Raima Inc. is an example of a Network DBMS.
Network Data Model 2-4
■u
The network model shown in the following figure illustrates a series of one-to-many
relationships:

uA sales representative may write many Invoicetickets, but each Invoice is written by a
single Sales representative (Salesrep).
u A Customer might make purchases on different occasions.
u A Customer may have many Invoicetickets, but each Invoice belongs only to a single
customer.
u An Invoiceticket may have many Invoice lines (Invline), but each Invline is found on a
single Invoiceticket.
u A Product may appear in several different Invline, but each Invline co n ta i n s only a
single Product.
Network Data Model 3-4
The components of the language used with network models are as follows:

Data Definition Language (DDL)


• Used to create and remove databases and database objects. It
enables the database administrator to define the schema
components.

Sub-schema DDL
• Enables the database administrator to define the database
components.

• Used to insert, retrieve, and modify database information.

• Used to administer permissions on the databases and database


objects.
Network Data Model 4-4
28 u The advantages of such a structure are specified as follows:
Relationships are easier to implement in the network database model than in the
hierarchical model.

F-----------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------
This model enforces database integrity.
F'I
This model achieves sufficient data independence.

u The disadvantages are specified as follows:

The databases in this model are difficult to design.

The programmer has to be familiar with the internal structures to access the database.

is difficult
U Thismode . toaimplementcand maintain.
> Computer programmers, rather than end users, utilize this model
Relational Data Model 1-5
29
As the information needs grew and more sophisticated databases and applications
were required, database design, management, and use became too cumbersome.
W■ !■S■™■•B■■I I■■ ■
This led to the development of what came to be called the Relational Model
database.

The term 'Relation' is derived from the set theory of mathematics. In the Relational
Model, unlike the Hierarchical and Network models, there are no physical links.

All data is maintained in the form of tables consisting of rows and columns. Data
in two tables is related through common columns and not physical links.

Operators are provided for operating on rows in tables. This model represents the
database as a collection of relations.
' ■ !! ■ ■ ! ■■ ' '• ■ ■!
Relational Data Model 2-5
A row is called a tuple, a column an attribute and a table is called a
relation

The list of values applicable to a particular field is called domain.

Several attributes can belong to the same domain.

The number of attributes of a relation is called degree of the relation.

The number of tuples determines the cardinality of the relation.


I
Relational Data Model 3-5

> In order to understand the relational model, consider the following Students
and Marks tables:
Roll Number Student Name
1 Sam Reiner
2 Jchn Parkinson

3 Jenny Smith
4 Lisa HayES
5 Penny Walker
6 Peter Jordan
7 Joe Wong

Students Marks Table


> The StudeTnabtsletable displays the Roll Numberand the StudentName, and the
Markstable displays the RollNumberand Marksobtained by the students.
> To locate students with marks above 40:
• First, locate the roll numbers of those who have scored above 50 from the Marks
table.
• Second, their names have to be located in the Studentstable by matching the
-----roll number.----------------------------------------------------------------------
2
Relational Data Model 4-5
32
> The result is displayed as shown in the following table:

> It was possible to get this information because of two facts:

First, there is a column common to both the tables - Roll Number.

Second, based on this column, the records from the two different tables could be
matched and the required information could be obtained.
'> In a relational model, data is stored in tables.-----------------------------------
> A table in a database has a unique name that identifies its
contents.
> Each table can be defined as an intersection of rows and columns.
Relational Data Model 5-5
33
k

Advantages of the relational model

I__________________
• Gives the programmer time to concentrate on the logical view of the
database rather than being bothered about the physical view.
• Provides querying flexibility and hence the popularity of the relational
databases.
• Easy to handle model to the extent that even untrained people find it
easy to generate handy reports and queries, without giving much thought
to the need to design a proper database.

• Hides all the complexities of the system and hence it tends to be


slower than the other database systems.

You might also like