1 - Introduction To Database Systems

Download as pdf or txt
Download as pdf or txt
You are on page 1of 74

Database Management Systems

Introduction to Database Systems

Lecturer : Dr. Murat AKIN


e-mail : [email protected]

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Term Summary
• Course Objective and Content:
• In this course, students will be informed about database systems and they will gain
the ability of database programming.
• During the course, the structure and types of database management systems will
be explained, the conceptual structure will be taken into account while creating a
database, and the Microsoft SQL Server database management system program
will be used.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data & Information

Data Processing Systems Information

• The term DATA consists of unprocessed facts that are used in the
production of information and are suitable for making sense of. These
facts can be numeric, alphanumeric or symbols, or they can be graphical.
• INFORMATION is the result obtained by analyzing and processing the
data in order to make it meaningful to support the decision-making
process.
• Data is the source of information.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data & Information
Attributes of
Information

Time related Context related


Form attributes
attributes attributes

• Clear • On time • Accurate


• Details. • Valid • Relevant
• Complete
• Format • Frequency
• Abstract
• Environment • Interval • Cost-effective.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Information & Information Systems
Informatics refers to the processes that includes all the applied operations
in order to obtain information. Some of these processes are;
• association, • correction,
• classification,
• summarizing,
• calculation,
• arrangement.

• In a rough definition, an a structure which performs the information


process called an information system .
• It is an "information production system" that collects, processes, stores
and reports the information necessary for the rulers to make a decision
from different sources.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Information & Information Systems
• The information system can be:
➢ Manual or,
➢ Computer based.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Information & Information Systems

• Systems are evolving.


• Mankind is adapting day by day.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Information & Information Systems
• Data is the most important component of the information system.
• The process of storing data in information systems is done using
databases.
• In order to use a database management system with appropriate
features, it is of "great importance" to design an effective database
that will support the characteristics of the information in terms of
form, time and content.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Database Management Systems
• Database management systems
(DBMS) are computer applications
that store databases and ensure
that the stored databases are
managed and operated within
certain order and restrictions.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Database Management Systems
Some of functions of DBMS are:
✓ Data sharing,
✓ Conceptual data organization,
✓ User and rights management,
✓ Backup and recover,
✓ Many components for information production,
✓ Data distribution,
✓ Restriction definition and application.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Database Management Systems
Some of the most important DBMS currently used are listed below:
➢ Microsoft SQL Server
➢ Oracle IBM DB2
➢ MySQL (Open source, some paid)
➢ Sybase Firebird (Open source)
➢ PostgreSQL (Open source)
• One of the biggest advantages of DBMSs is that they allow users and
application developers to deal with the conceptual representation of
the data without needing to deal directly with the data itself. This
structure also brings many advantages in terms of data security.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Database Management Systems
Within the scope of DBMSs, different working areas can be listed as
follows:

❖ Database design,
❖ Design and implementation of DBMSs,
❖ Analyzing the data in the database.

• A database system and all the databases which operated such as


listed above is called database management system.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Database Management Systems
• Users can only interact with the DBMS components in a database
system.
• In other words, the database in which the data is located is not
available to users directly.
• DBMS performs the necessary operations on the database in
accordance with the requests from the users.
• In addition to the data itself, the database definitions called as
metadata is stored in the database.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Database Management Systems

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


History of DBMS
Year Novelty Explanation
1946 Magnetic Tape Drive IBM 726 Tape Unit
1956 Random Access Harddrive 305 RAMAC, 5 MB capacity
1960 First general purpose DBMS Integrated Data Store, Charles Bachman, Network data model
1960s DBMS Information Management System, IBM, hierarchical data model
1970s Data Model Relational data model, IBM, Edgar Codd
1980s SQL IBM
1980s Data Model object-oriented data model
1990s ERP Baan, Oracle, SAP

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Pros-Cons of DBMS

Advantage Disadvantage
The expense of DBMS hardware and software is
A database management system (DBMS) may store and
enormously expensive, which impacts your
retrieve data in a number of ways.
organization’s overall budget.
A database management system (DBMS) is a reliable
A database management system (DBMS) is inadequate
system for handling numerous applications requiring
for doing complex mathematical calculations.
identical data.
Since most database management systems are difficult
Data Integrity and Security are guaranteed by DBMS. and complicated, employees must always be instructed
on how to operate them.
The DBMS implements integrity constraints to provide
Many individuals using the same application at the
a high degree of protection against unauthorized
same time time potentially lead to data loss.
access to information.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Database Management Systems
It sets a standard for data definition and access,
also facilitates the development and operation
• It supports the development by of the system. It ensures compatibility of
creating a platform for the operation of Importance different data throughout the system.
a system. It prevents the programmer
from wasting time on unnecessary
technical details of data storage.

It is a set of rules for


Role Definition defining high-level data.
DATA
MODELS

1. Hierarchical Data Model


It provides the definition and
2. Network Data Model
3. Relational Data Model Class Scope format of the data. It does not deal
with physical data storage and the
4. Object Oriented Data Model.
complex details associated with it.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Database Management Systems

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Database Management Systems

• Data models define the data and database structure based on entities,
attributes of entities and relationships between entities.
• The used data model will answer the following questions regarding the
data to be kept in the system:
➢ How the data will be grouped and kept,
➢ Which groups will be related to each other,
➢ How to connect one group to another ,
➢ How will be defined the characteristics of the relations between
the groups (i.e. the student's grade in the course),
➢ What will be the restrictions on data processing?

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Flat Model

• The Flat Model was the first method used to store data in a
computer.
• Each data item is stored on a disc sequentially in one large file.
• If you want to locate a particular item, you must start searching
process from the beginning and each item is checked one by one
sequentially until the searched value is matched.
Drawbacks:
❖ Data duplication, very poor security, slow operation when
retrieving data, non-support for different data types, memory
allocation problem, concurrent data sharing is not allowed,
insecure mechanism, etc.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Hierarchical Model

• Hierarchical Model was the first DBMS model.


• This model organizes the data in a hierarchical tree structure. The
hierarchy starts from the root which has stem data and then it
becomes more extensive in a form of tree adding child node to the
parent node.
• This model easily represents some of the real-world relationships like
food recipes, sitemap of a website etc.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Hierarchical Model

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Features of a Hierarchical Model

• One-to-many relationship: The example in previous slide is organized


in a tree-like structure where the one-to-many relationship is
between the datatypes. Also, there can be only one path from parent
to any node. For example, if we want to go to the node Salary we
only have one path to reach there i.e. through Teachers node.
• Parent-Child Relationship: Each child node has a parent node but a
parent node can have more than one child node. Multiple parents are
not allowed.
• Deletion Problem: If a parent node is deleted then the child node is
automatically deleted.
• Pointers: Pointers are used to connect the parent node to child node
and to navigate between the stored data. In the previous example
the School node points to the two other nodes Students node and
Teachers node.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Pros-Cons of Hierarchical Model

• Advantages of Hierarchical Model:


➢ Very simple and fast to traverse through a tree-like structure.
➢ Any change in the parent node is automatically reflected in the child
node so, the integrity of data is maintained.

• Disadvantages of Hierarchical Model:


➢Complex relationships are not supported.
➢if we have some complex relationship where a child node needs to
have two parent node, we would not able to use this model as the
child node does not support multiple parents
➢If a parent node is deleted then the child node is automatically
deleted.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Example of Hierarchical Model

Computer File System


is hierarchical.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Example of Hierarchical Model

XML databases are hierarchical.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Example of Hierarchical Model

Simple View of the hierarchical model.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Network Model

• This model is an extension of the hierarchical model.


• It was the most popular model before the relational model.
• This model is the same as the hierarchical model, the only difference
is that a record can have more than one parent.
• It replaces the hierarchical tree with a graph.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Network Model

• In the example below we can see that node student has two parents
i.e. CSE Department and Library. This was earlier not possible in the
hierarchical model.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Network Model

• Ability to Merge more Relationships: In this model, since there are


more relationships, the data is more related. This model has the
ability to manage one-to-one relationships as well as many-to-many
relationships.
• Many paths: As there are more relationships so there can be more
than one path to the same record. This makes data access fast and
simple.
• Circular Linked List: The operations on the network model are done
with the help of the circular linked list. The current position is
maintained with the help of a program and this position navigates
through the records according to the relationship.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Network Model

• Advantages of Network Model:


➢ The data can be accessed faster compared to the hierarchical model. This
stems from the data is more related in the network model and there can be
more than one path to reach a particular node. Thus, the data can be
accessed in many ways.
➢ Since there is a parent-child relationship, the data integrity exists. Any
change in parent record is reflected in the child record.

• Disadvantages of Network Model:


➢ Because of need to handle more relationships, system might become more
complex. For this reason, in order to work with the model, the user must
have detailed information.
➢ Any change like updating, deletion, insertion is very complex.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Object-Oriented Model

• The main reason for the emergence of this model is the need to save
and share complex objects (objects derived from class) when
necessary.
• Like as in any object-oriented programming language, the classes are
defined and the objects of this class are derived and stored in the
database.
• A database with an object-oriented data model is called an object
database.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Object-Oriented Model

• OODBMS uses the same model as object-oriented programming


languages.
• It allows some basic features of object-oriented programming to
identify and manipulate the data in database management systems.
• It makes the database objects look like a programming language
objects.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Object-Oriented Model

• The real-world problems can be represented more closely using the


object-oriented data model.
• With this model, both the data and relationship are presented in a
single structure known as an object.
• Audio, video, images, etc. can be stored in a database which was not
possible in the relational model
• In an OODM model, two are more objects are connected through
links. This link is used to relate one object to other objects.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Object-Oriented Model

• As an example of OODBMS.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Object-Oriented Model

• In the example, two objects, Employee and Department can be seen.


• All the data and relationships of each object are contained as a single
unit.
• Attributes such as Name, Job title of the employee and the methods
which will be performed by that object are stored as a single object.
• The two objects are connected through a common attribute i.e. the
Department_id and the communication between these two will be
done with the help of this common id.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Relational Model

• Relational Model is the most widely used model.


• In this model, the data is maintained in the form of a two-dimensional
table.
• All the information is stored in the form of row and columns.
• The basic building blocks of the structure of a relational model are
tables.
• So, in the relational model the tables are connected with relations.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Relational Model

• Example: Employee table is shown below.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Advantages of Relational Model

• Simple: This model is more simple compared to the network and


hierarchical model.
• Scalable: This model can be easily scaled we can add as many rows
and columns as we want.
• Structural Independence: We can make any changes to the database
structure without changing the way data is accessed.
➢ If any change is applied to the database structure without
affecting the capability to DBMS and the data is still can be
reached without an iterruption.
➢ So, it can be said that the structural independence has been
achieved.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Disadvantages of Relational Model

• Hardware Overheads: This model requires more powerful hardware


computers and data storage devices to overcome complexities and
making things easier for the user.
• Bad Design: The relational model is very easy to design and use, so
the users don't need to know how the data is stored. However, this
ease of design can cause the database to slow down later with
database growth.
• But all these disadvantages are minor as compared to the advantages
of the relational model. These problems can be avoided with the help
of proper implementation and organization.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Entity-Relationship Model

• Entity-Relationship Model or simply ER Model is a high-level data


model diagram.
• In this model, the real-world problem is presented in the pictorial
form to make it easy for the users to understand.
• It is also very easy for the developers to understand the system by
just looking at the ER diagram.
• ER diagram is used as a visual tool to represent an ER Model.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Entity-Relationship Model
ER diagram has the following three components:

• Entities: Entity is a real-world thing. It can be a person, place, or even


a concept. Example: Teachers, Students, Course, Building,
Department, etc. are some of the entities of a School Management
System.
• Attributes: An entity contains a real-world property called attribute.
This is the characteristics of an attribute. Example: The entity teacher
has an attribute like teacher id, salary, age, etc.
• Relationship: Relationship tells how two attributes are related.
Example: Teacher works for a department.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Data Models - Entity-Relationship Model

• In the left side diagram, the


entities are Teacher and
Department.
• The attributes of Teacher entity
are Teacher_Name, Teacher_id,
Age, Salary, Mobile_Number.
• The attributes of entity
Department entity are Dept_id,
Dept_name.
• The two entities are connected
using the relationship.
• Here, each teacher works for a
department.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Features of Entity-Relationship Model

• Graphical Representation: It is very easy and simple to understand so


it can be used by the developers to communicate with the
stakeholders.
• ER Diagram: ER diagram is used as a visual tool for representing the
model.
• Database Design: This model helps the database designers to build
the database.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Advantages of Entity-Relationship Model

• Simple: Conceptually ER Model is very easy to build. If we know the


relationship between the attributes and the entities we can easily
build the ER Diagram for the model.
• Effective Communication Tool: This model is used widely by the
database designers for communicating their ideas.
• Easy Conversion to any Model: This model matches well with the
relational model and can be easily converted to a relational model by
converting the ER model to a table. It also can be converted to any
other model such as network model, hierarchical model etc.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Disadvantages of Entity-Relationship Model

• No industry standard for notation: There is no industry standard for


developing an ER model. So a developer may use notations that can
not be understandable by the other developers.
• Hidden information: Some information might be lost or hidden in the
ER model. Since it is a high-level view, there is a possibility that some
information will be hidden.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Relational DB Model - Concepts
Each row contains different Each column contains Since entities are related
data corresponding to to each other by
but the same type of data. attributes, it is called
an attribute of the
Relational Model.
entities.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Features of Relationships Should Provide

• The relationship has a singular name.


• Attributes are in a simple attribute structure.
• The relationship has at least one key.
• Attributes have singular names.
• The order of attributes is unimportant.
• Row order is unimportant.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Features of Relationships
Student R=“Student”, attributes of the
relation:
A1=“StudentID”,
A2=“First_Name”,
A3=“Last_Name”,
A4="Email",
A5="Major",
A6=“Faculty”
The representation of the R
relationship containing n
attributes as R(A1, A2, …, An) is
called the Relation Schema.

Student (Student_ID, First_Name, Last_Name, Email, Major,Faculty)

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Database Schema for RDBMS

• A relationship schema may also include detailed information such as


the data types of attributes (domain) and some other integrity
constraints.
• Student (studentID integer primary key, First_Name character[20],
Last_Name character[20], Email character[20], Major character[20],
Faculty character[20], )

• The set of relationship diagrams of ALL relationships in the database


is called the Database Relationship Schema.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Key Concept

Super Key

Key

Candidate
Key

Primary Key

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Super Key
SUPER KEY
A set of attributes belonging to a relationship whose subset is a key is called a Super Key.

Super key 1
Student_ID

Super key 2
{Student_ID, First_Name,
Last_Name}

Super key 3
{Student_ID, Major}

Super key 4
{Student_ID, Major, Faculty}

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Key Concept
KEY
A subgroup of attributes that make all the entities in the relationship different from each
other and contain the least number of attributes is called a Key. There may be more than one.
{StudentID, Course_Code, Term}
{Course_Code, Term}
{Course_Code}
{Dept_Code}

Key 1: StudentID
Key 2: IDNumber

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Candidate Key - Primary Key

• If there is more than one key in a relationship, each of key is called a


Candidate Key.
• One of the candidate keys selected to express the relationship is
called the Primary Key.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Foreign Key
FOREIGN KEY
A field or set of fields in a relationship that uniquely indicates a row of the same or another
relationship.

The primary key of the


indicated table is used.

Purpose of usage
Linking a group of variables (record, tuple) with the
same or different relationships

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Foreign Key
Some situations that require the use of foreign keys:
➢ For Student and Department relations: In which department does the
student study?
➢ For Product and Machine relationships: On which machine was the product
manufactured?
➢ For Personnel and Department relations: In which department does the
personnel work?
➢ For Invoice and Customer relations: Which customer does the invoice belong
to?
➢ For Customer and Address relationships: What is the Customer's shipping
address?
➢ For Course and Department relations: Which department does the course
belong to?
➢ For Citizen and Citizen relations: Who is the Citizen Kane's father?

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Foreign Key

• The attribute named as


"courseid" in the student table
is a foreign key which the
attribute used to access
detailed information about the
course that the student is
studying.
• The course name which the
student is studying is accessed
from the course entity that
contains the foreign key value
named courseId in the student
entity in its primary key named
courseId.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Foreign Key
Maintaining Database Consistency on Foreign Keys.
StudentID Name Surname Dept_Code
Code Name
4326 John Smith Ind
Ind Industrial Engineering
7643 Mary Sue Comp
Comp Computer Engineering
3345 Jack Blue Chem
Chem Chemistry Engineering
7612 Jessy Lee Ind

8822 Angel Brown Civ ?


DELETE (As the record coded Ind)
UPDATE
• Should not be allowed OR, • Should not be allowed OR,
Adding incompatible record • The "Ind" value of Dept. Code of • The "Ind" value of Dept. Code of all
Should not be allowed. all records must be replace as records must be deleted OR,
IndEn OR, • The "Ind" value of Dept. Code of all
• The "Ind" value of Dept. Code of records must be replace with NULL
all records must be replace with value.
NULL value.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Domain
Attribute Domain

1
2 StudentID Name Surname Dept_Code
3 4326 John Smith Ind

7643 Mary Sue Comp

3345 3345 Jack Blue Chem
… 7612 Jessy Lee Ind

4326
..
Student(StudentID integer key, Name stirng[20],
.. Surname string[20], Dept_Code string [10]

The set of all values Domain: A set that contains all information of
matching the attribute. character type up 1 to 10 in length.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Database Schema

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Integrity Constraints
Q: When will it happen? Q: When is it checked?
A: While creating a relationship A: When changing instance relation.
(Insert, Update, Delete)

Integrity
Constraints

Domain Entity Referantial Key


Constraint Constratint Constraint Constraint

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Domain Constraint

• Domain constraint can be defined as the definition of a valid set of


values for an attribute.
• The data type of domain includes string, character, integer, time,
date, currency, etc. The value of the attribute must be available in the
corresponding domain.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Entity Constraint

• The entity constraint states that primary key value can't be null.
• This is because the primary key value is used to identify individual
rows in relation and if the primary key has a null value, then we can't
identify those rows.
• A table can contain a null value other than the primary key field.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Referential Constraint

• A referential constraint is specified


between two tables.
• In the Referential integrity
constraints, if a foreign key in
Table 1 refers to the Primary Key
of Table 2, then every value of the
Foreign Key in Table 1 must be null
or be available in Table 2.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Key Constraint

• Key Constraint: The rules that are to be followed while entering data
into columns of the database table.
• The key constraint ensure that the data entered in the columns by
the user falls within the criteria specified by the condition.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Key Constraint

• Types of key constraint in DBMS:

➢ UNIQUE : provides a unique/distinct values to specified columns.


➢ NOT NULL: ensures that the specified column doesn’t contain a
NULL value.
➢ DEFAULT: provides a default value to a column if none is specified.
➢ CHECK: checks for the predefined conditions before inserting the
data inside the table.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Classification of DBMS
1. Single User DBMS
2. Multi User DBMS
Based on deployment of computers
Based on number of user

1. Centralized DBMS
2. Distributed DBMS
Classification of DBMS
1. Homogeneously distributed DBMS
2. Heterogeneously distributed DBMS

Based on data model


1. DBMS using Relational Data Model
2. DBMS using OO Data Model
3. DBMS using Hierarchical Data Model
4. DBMS using Network Data Model

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Centralized DBMS
• The data integrity is maximized as the whole
database is stored at a single physical location.
This means that it is easier to coordinate the data
and it is as accurate and consistent as possible.
• Since all the data is in one place, there can be
stronger security measures around it. So, the
centralized database is much more secure.
• Since all the data is at one location, it takes more
time to search and access it. If the network is
slow, this process takes even more time.
• If there are no database recovery measures in
place and a system failure occurs, then all the
data in the database will be destroyed.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Distributed DBMS
• If there were a natural catastrophe such as a fire
or an earthquake, all the data would not be
destroyed as it is stored at different locations.
• It is cheaper to create a network of systems
containing a part of the database. This database
can also be easily increased or decreased.
• The distributed database is quite complex and it is
difficult to make sure that a user gets a uniform
view of the database because it is spread across
multiple locations.
• It is difficult to provide security in a distributed
database as the database needs to be secured at
all the locations it is stored. Moreover, the
infrastructure connecting all the nodes in a
distributed database also needs to be secured.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Client Server Architecture

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Two Tier Architecture

• The two-tier is based on Client


Server architecture. The two-tier
architecture is like client server
application.
• The direct communication takes
place between client and server.
• There is no intermediate between
client and server.
• Because of tight coupling a 2 tiered
application will run faster.

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Three Tier Architecture

• Three-tier architecture typically


comprise a presentation tier,
a business or data access tier,
and a data tier. Three layers in
the three tier architecture are as
follows:
1) Client layer
2) Business layer
3) Data layer

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


Three Tier Architecture
• Advantages
➢High performance, lightweight persistent
objects
➢Scalability – Each tier can scale
horizontally
➢Performance – Because the Presentation
tier can cache requests, network
utilization is minimized, and the load is
reduced on the Application and Data
tiers.
➢High degree of flexibility in deployment
platform and configuration

• Disadvantages
➢Increase the Complexity/Effort

Gazi University Industrial Engineering – Database Management Systems Lecture Notes


DBMS - End of Lesson

Any Questions

You might also like