1.2 Adc
1.2 Adc
MSIT-2K23
◗ Database, DBMS- database system
◗ File based approach-for data management
Last
Session ◗ Problems in FBA
◗ Solution provided by database Oriented
Approach
◗ Application areas of DB
◗ Basic Terminologies/Concepts
▹ Data Abstraction
▹ Schema and Instances
L e c tu re
Overview ▹ Data Independence
▹ DDL and DML
▹ Database Architecture
Data Abstraction
Data Abstraction
◗ Hides low level details (complexity) from the end
user.
◗ Pres ents an abs tract view of the data.
◗ Three levels of abstractions are provided for
database systems users:
◗ Physical level
◗ Logical level
◗ View levels
◗ Physical level: describes how a record (e.g.,
Levels of Data
customer) is stored.
Abstraction ◗ Logical level: describes data stored in database,
and the relationships among the data.
type instructor = record
ID : s tring;
name : s tring;
dept_name : s tring;
salary : integer;
end;
◗ View level: application programs hide details of
data types. Views can also hide information (such
as an employee’s salary) for security purposes.
L e v e l s of D a t a A b s t r a c t i o n - D a t a b a s e
Architectural View
S c h e m a a n d In s t a n c e s
◗ Schema – the logical structure of the
database
Example: The database consists of information about a
set of customers and accounts and the relationship
between them
Analogous to type information of a variable in a program
Physical schema: database design at the physical level
Logical schema: database design at the logical level
Logical Schema
Physical Data Independence
Physical Schema
D D L and DML
Database Languages-DDL
◗ Two types of languages-Data Definition Language
(DDL) & Data Manipulation language (DML).
◗ DDL-Specify notations for defining the database
schema:
Example: create table instructor (
ID char(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2))
◗ DDL compiler generates a set of table templates
stored in a data dictionary.
◗ Data dictionary contains metadata (i.e.,
Data Dictionary
data about data)
Database schema
Integrity constraints (date field format)
Primary key (ID uniquely identifies the data
record)
Referential integrity (references constraint
in SQL)
e.g. dept_name value in any instructor
tuple must appear in department relation
Authorization
Database Languages-DML
Procedural vs. Non-Procedural
Examples
SQL-Our Focus
D a ta b a s e A rc h it e c tu re
Database Design
Different Architectural Styles
◗ The architecture of a databas e system is
greatly influenced by the underlying computer
system on which the database is running:
▹ Centralized
▹ Client-server
■ Two-tier architecture
■ Three-tier architectures
▹ Parallel (multi-processor)
▹ Distributed
Centralized
Client Server
Client Server
Two-tier vs. Three-Tier
Front End
Front End
► Application Layer: As per the gmail login page example, once user
clicks on the login button, the authentication process and any other
manipulation would be run in this layer. Application layer interacts with
Database layer and sends required information to the Presentation
layer.