Lecture 03 Cse3103 Database Fall 2023

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

©NAZMUS SAKIB 1

Instances and Schemas


• Schema– describe the overall design of the database.
• Physical schema– Overall physical structure of the database.
• Logical Schema – Overall logical structure of the database
• Example: The database consists of information about a set of
customers and address and the relationship between them.

• Sub Schema– Describe the different views of the database.

3
Instances

4
Instances and Schemas
• Instance – the actual Database Applications content of the database at a
particular point in time.
• Analogous to the value of a variable.

5
Instances and Schemas
Data Independence – Application that ensures the protection of data or
structure is stored.

• Physical Data Independence – the ability to modify


the physical schema without changing the logical
schema
• Applications depend on the logical schema
• In general, the interfaces between the various levels and
components should be well defined so that changes in
some parts do not seriously influence others.

• Logical Data Independence – the ability to modify


the logical schema without changing the View Level.

6
Database Users & DBA Activities
• Application Programmer
• Sophisticated User
• Specialized User
• Naïve User

Database
7
Data Definition Language (DDL)
• Specification notation 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 about data)
• Database schema
• Integrity constraints
• Primary key (ID uniquely identifies instructors)
• Authorization
• Who can access what

8
Data Manipulation Language (DML)
• Language for accessing and manipulating the data organized by the
appropriate data model
• DML also known as query language (Procedural &Declarative)

• Two classes of languages


• Pure – used for proving properties about computational power and for
optimization
• Relational Algebra
• Tuple relational calculus
• Domain relational calculus
• Commercial – used in commercial systems
• SQL is the most widely used commercial language

9
Database Architecture: Centralized Database

10
Database Architecture: Client Server Database

11
Database Architecture: Parallel Database

12
Database Architecture: Distributed Database

13
©NAZMUS SAKIB 14

You might also like