0% found this document useful (0 votes)
6 views

Basics of DBMS

Uploaded by

divyamverma90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Basics of DBMS

Uploaded by

divyamverma90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Basics of

DBMS
Instances & Schema
● The collection of information stored in the DB at a particular moment is called an
instance of DB.
● The overall design of the DB is called the DB schema.
● Schema is structural description of data. Schema doesn’t change frequently. Data may
change frequently.
● DB schema corresponds to the variable declarations (along with type) in a program.
● We have 3 types of Schemas: Physical, Logical, several view schemas called
subschemas.
● Logical schema is most important in terms of its effect on application programs, as
programmers construct apps by using logical schema.
● Physical data independence, physical schema change should not affect logical
schema/application programs.
Data Models
● Provides a way to describe the design of a DB at logical level.
● Data Model is the modeling of the data description, data semantics, and consistency
constraints of the data. It provides the conceptual tools for describing the design of a
database.
● E.g., ER model, Relational Model, object-oriented model, object-relational data
model etc.
Database Languages
● Data definition language (DDL) to specify the database schema. We specify
consistency constraints, which must be checked, every time DB is updated.
● Data manipulation language (DML) to express database queries and updates.
● Practically, both language features are present in a single DB language, e.g., SQL
language.
● Data manipulation involves
○ Retrieval of information stored in DB.
○ Insertion of new information into DB.
○ Deletion of information from the DB.
○ Updating existing information stored in DB.
● Query language, a part of DML to specify statement requesting the retrieval of
information.
How is Database accessed from Application
programs
a.Apps (written in host languages, C/C++, Java) interacts with DB.

b. E.g., Banking system’s module generating payrolls access DB by executing DML statements from

the host language.

c. API is provided to send DML/DDL statements to DB and retrieve the results.

i. Open Database Connectivity (ODBC), Microsoft “C”.

ii. Java Database Connectivity (JDBC), Java.


Database Administrator
a. A person who has central control of both the data and the programs that access those data.

b. Functions of DBA

i. Schema Definition

ii. Storage structure and access methods.

iii. Schema and physical organization modifications.

iv. Authorization control.

v. Routine maintenance

1. Periodic backups.

2. Security patches.

3. Any upgrades.
DBMS Application Architectures:
Client machines on which remote DB users work and server machines

on which DB system runs.

● T1 Architecture

The client, server & DB all present on the same machine.


T2 Architecture
App is partitioned into 2-components.
● Client machine, which invokes DB system functionality at server end through
query language statements.
● API standards like ODBC & JDBC are used to interact between client and
server.
T3 Architecture
App is partitioned into 3 logical components.
● Client machine is just a frontend and doesn’t contain any direct DB calls.
● Client machine communicates with App server, and App server
communicates with DB system to access data.
● Business logic, what action to take at that condition is in App server itself.
● T3 architecture are best for WWW Applications.
● Advantages:
○ 1. Scalability due to distributed application servers.
○ 2. Data integrity, App server acts as a middle layer between client and
DB, which minimize the chances of data corruption.
○ Security, client can’t directly access DB, hence it is more secure.
client

server

You might also like