3.BIT2103_3Database Systems_Architecture and Components
3.BIT2103_3Database Systems_Architecture and Components
CHAPTER 3
Database Systems_Architecture
and Components.
Database
A Database is a collection of related data organised
in a way that data can be easily accessed, managed
and updated.
7. supports transactions
£9 G\J
8;
Better
Data redundancy Easy Integration
Advantages of RDBMS
In DBMS data are store as a file. In Rdbms data are store in a tabular form.
1
3 Dbms does not support client server architecture. Rdbms supports client server architecture.
4 Dbms does not support distributed architecture. Rdbms support distributed architecture.
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.
8 Examples of DBMS are file systems, xml etc. Example of RDBMS are mysql, postgre, sql server, oracle etc.
15-Oct-22
RDBMS 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
J
Logical Data Independence
kr
1
Logical level
jh
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.
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:
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:
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.
> 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
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:
Sub-schema DDL
• Enables the database administrator to define the database
components.
F-----------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------
This model enforces database integrity.
F'I
This model achieves sufficient data independence.
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
> 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
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
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.