Dbms Unit II
Dbms Unit II
Dbms Unit II
Database architecture describes how a database management system (DBMS) will be integrated
with your application. When designing a database architecture, you will make decisions that will how
your applications are created.
Data architecture_
One_tier architecture
Two_tier architecture
- **Advantages**:
- **Disadvantages**:
- **Advantages**:
- **Disadvantages**:
- **Description**: In a three-tier architecture, there is an additional layer (middle tier) that acts
as an intermediary between the client and the database server. This architecture is common in
web applications and enterprise systems. Most modern web applications use a three-tier
architecture. In this architecture, the clients connect to a back end, which in turn connects to the
database. Using this approach has many benefits:
Security: Keeping the database connection open to a single back end reduces the risks of
being hacked.
Scalability: Because each layer operates independently, it is easier to scale parts of the
application.
Faster deployment: Having multiple tiers makes it easier to have a separation of concerns
and to follow cloud-native best practices, including better continuous delivery processes.
- **Components**:
- **Data Layer (Database Tier)**: The database server where data is stored,
retrieved, and managed.
- **Advantages**:
- Security: Improved security; the middle tier can provide a layer of security
between the client and database.
- **Disadvantages**:
- Complexity: More complex to develop and maintain due to the additional
layer.
Database Schema
A database schema is the skeleton structure that represents the logical view of
the entire database. It defines how the data is organized and how the relations
among them are associated. It formulates all the constraints that are to be
applied on the data.
A database schema defines its entities and the relationship among them. It
contains a descriptive detail of the database, which can be depicted by means
of schema diagrams. It’s the database designers who design the schema to help
programmers understand the database and make it useful.
Subschema
Subschema is a sub part of a schema and inherits same properties of schema.
Subschema describes different view of the database. Subschema is an application
programmer’s or user view of data item types and records type.
For example: Suppose a table employee, programmer has access of all columns of table
employee but user has access of only two or three columns of table employee.
Subschema describes different view of the database.
Database Instance
called database instance. Database changes every time when information is inserted
and deleted to/from database. A database schema is variable declarations in a program.
Variable has particular value at a given instant. Then, the value of variable at particular
instant is called database instance.
Data Independence
o Data independence can be explained using the three-schema
architecture.
o 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:
One to One
In many, many cardinalities mapping, there can be one or more than one entity
that can associate with one or more than one entity of set 2. In the same way
from the end of set 2, one or more than one entity can make a relation with one
or more than one entity of set 1.
It is represented by M: N or N: M
Types of Databases
There are various types of databases used for storing different varieties of data:
1) Centralized Database
It is the type of database that stores data at a centralized database system. It
comforts the users to access the stored data from different locations through
several applications. These applications contain the authentication process to let
users access data securely
2) Distributed Database
a centralized database system, in distributed systems, data is distributed
among different database systems of an organization. These database
systems are connected via communication links. Such links help the end-
users to access the data easily
3) Relational Database
This database is based on the relational data model, which stores data in
the form of rows(tuple) and columns(attributes), and together forms a
table(relation). Each table in the database carries a key that makes the
data unique from others.
Object-oriented Databases
The type of database that uses the object-based data model approach for
storing data in the database system. The data is represented and stored as
objects which are similar to the objects used in the object-oriented programming
language.
Hierarchical Databases
It is the type of database that stores data in the form of parent-children
relationship nodes. Here, it organizes data in a tree-like structure.
Data get stored in the form of records that are connected via links. Each child
record in the tree will contain only one parent. On the other hand, each parent
record can have multiple child records.
8) Network Databases
It is the database that typically follows the network data model. Here, the
representation of data is in the form of nodes connected via links between them.
Unlike the hierarchical database, it allows each record to have multiple children
and parent nodes to form a generalized graph structure.
9) Personal Database
Collecting and storing data on the user's system defines a Personal Database.
This database is basically designed for a single user