Session 2

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

SESSION 2

DATABASE MANAGEMENT SYSTEM Multiuser and Concurrent Access


DATABASE - organized collection of data,  DBMS supports multiuser environment and
generally stored and accessed electronically from a allows them to access and manipulate data
computer system. in parallel.
 Though there are restrictions on
DATABASE SYSTEM - Composed of 5 major
transactions when users attempt to handle
parts:
the same data item, but users are always
Hardware, Software (DBMS), People, Procedures
unaware of them.
and Data.
Multiple views

 DBMS offers multiple views for different


users.
 A user who is in the Sales department will
have a different view of database than a
person working in the Production
department.
 This feature enables the users to have a
concentrate view of the database according
to their requirements.
Security

 Features like multiple views offer security to


some extent where users are unable to
access data of other users and
departments.
 DBMS offers methods to impose constraints
while entering data into the database and
CHARACTERISTICS OF DBMS retrieving the same at a later stage.
Real-world entity  DBMS offers many different levels of
security features, which enables multiple
 A modern DBMS is more realistic and uses users to have different views with different
real-world entities to design its architecture. features.
 It uses the behavior and attributes too.
POPULAR DBMS
Relation-based tables
Server DBMS
 DBMS allows entities and relations among - Oracle
them to form tables. - SQL Server
 A user can understand the architecture of a - DB2
database just by looking at the table names. - MySQL, Firebird, PostgreSQL, (Significant open-
source DBMS)
Less redundancy
Desktop DBMS
 DBMS follows the rules of normalization, - Microsoft Access
which splits a relation when any of its - FoxPro, Paradox, Approach, FileMaker Pro
attributes is having redundancy in values.
 Normalization is a mathematically rich and USERS
scientific process that reduces data
redundancy.
Consistency

 Consistency is a state where every relation


in a database remains consistent.
 There exist methods and techniques, which
can detect attempt of leaving database in
inconsistent state.
Query Language Administrators

 DBMS is equipped with query language,  Administrators maintain the DBMS and are
which makes it more efficient to retrieve and responsible for administrating the database.
manipulate data.  They are responsible to look after its usage
 A user can apply as many and as different and by whom it should be used.
filtering options as required to retrieve a set  They create ccess profiles for users and
of data apply limitations to maintain isolation and
force security.
 Administrators also look after DBMS
resources like system license, required
tools, and other software and hardware
related maintenance.
2 TIER STRUCTURE
- The Database system is present at the
Designers
server machine and the DBMS application is
 Designers are the group of people who present at the client machine, these two machines
actually work on the designing part of the are connected with each other through a reliable
database. network.
 They keep a close watch on what data - Whenever client machine makes a request
should be kept and in what format. to access the database present at server using a
 They identify and design the whole set of query language, the server perform the request on
entities, relations, constraints, and views. the database and returns the result back to the
End Users client.
- The application connection interface such
 End users are those who actually reap the
as JDBC, ODBC are used for the interaction
benefits of having a DBMS.
between server and client.
 End users can range from simple viewers
who pay attention to the logs or market
rates to sophisticated users such as
business analysts.

DBMS & SCHEMA ARCHITECHTURE


DBMS ARCHITECHTURE
- The design of a DBMS depends on its
architecture. It can be centralized or decentralized
or hierarchical.
- DBMS architecture depends upon how 3 TIER STRUCTURE
users are connected to the database to get their
request done. - A 3-tier architecture separates its tiers from each
other based on the complexity of the users and
- The architecture of DBMS depends on the how they use the data present in the database.
computer system on which it runs
- It is the most widely used architecture to design a
DBMS.

1 TIER STRUCTURE
- It is where the Client, Server, and Database all
reside on the same machine.
- In this architecture, the database is directly
available to the user. It means the user can
directly sit on the DBMS and uses it.
- The 1-Tier architecture is used for development of - This DBMS architecture contains an application
the local application, where programmers can layer between the user and the DBMS, which is
directly communicate with the database for the responsible for communicating the user's request
quick response. to the DBMS system and send the response from
- But such architecture is rarely used in production. the DBMS to the user.

- Anytime you install a DB in your system and


access it to practice SQL queries it is 1 tier
architecture
EXAMPLE
- The term "schema" refers to the organization of - Let’s say we are storing customer
data as a blueprint of how the database is information in a customer table.
constructed
- At physical level these records can be
THREE SCHEMA ARCHITECHTURE described as blocks of storage (bytes, gigabytes,
terabytes etc.) in memory. These details are often
hidden from the programmers.
- At the logical level these records can be
described as fields and attributes along with their
data types, their relationship among each other can
be logically implemented.
- The programmers generally work at this
level because they are aware of such things about
database systems.
- At view level, user just interact with system
with the help of GUI and enter the details at the
screen, they are not aware of how the data is
stored and what data is stored; such details are
hidden from them.
SCHEMA VS INSTANCE
- Database schema is the skeleton of
database. It is designed when the database doesn't
exist at all. Once the database is operational, it is
very difficult to make any changes to it. A database
schema does not contain any data or information.
- The data stored in database at a particular
moment of time is called instance of database.
Database schema defines the variable declarations
in tables that belong to a particular database; the
value of these variables at a moment of time is
called the instance of that database.
- For example, let’s say we have a single
table student in the database, today the table has
EXTERNAL(VIEW) LEVEL
100 records, so today the instance of the database
- Several users can view their desired data has 100 records.
from this level which is internally fetched from
- Let’s say we are going to add another 100
database with the help of conceptual and internal
records in this table by tomorrow so the instance of
level mapping.
database tomorrow will have 200 records in table.
- The user doesn’t need to know the
- In short, at a particular moment the data
database schema details such as data structure,
stored in database is called the instance, that
table definition etc. user is only concerned about
changes over time when we add or delete data
data which is what returned back to the view level
from the database.
after it has been fetched from database
DATA INDEPENDENCE
- External level is the “top level” of the Three
Level of Schema Architecture.
CONCEPTUAL(LOGICAL) LEVEL
- It is also called logical level. The whole design of
the database such as relationship among data,
schema of data etc. are described in this level.
-Database constraints and security are also
implemented in this level of architecture. This level
is maintained by DBA (database administrator).
INTERNAL(PHYSICAL) LEVEL Data independence refers characteristic of being
able to modify the schema at one level of the
This level is also known as physical level. This level
database system without altering the schema at the
describes how the data is actually stored in the
next higher level.
storage devices. This level is also responsible for
allocating space to the data. This is the lowest level
of the architecture.
TYPES OF DATA INDEPENDENCE:
- Logical Data Independence
- Physical 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.
Example: The name field in the conceptual view is
stored as first name, middle name and last name
whereas in external view, it remains to be a single
name field.
PHYSICAL DATA INDEPENDENCE
- 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.
- The location of the database, if changed
from C drive to D drive will not affect the conceptual
view or external view as the commands are
independent of the location of the database

You might also like