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

Lecture5 6 - Database Architecture Environment

The document outlines the learning objectives for Unit-3 of a Database Systems course, focusing on the three-level database architecture: external, conceptual, and internal levels. It explains the significance of data independence, the distinction between Data Definition Language (DDL) and Data Manipulation Language (DML), and introduces various data models. Additionally, it emphasizes the importance of conceptual modeling in database design.

Uploaded by

f2023266730
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)
8 views

Lecture5 6 - Database Architecture Environment

The document outlines the learning objectives for Unit-3 of a Database Systems course, focusing on the three-level database architecture: external, conceptual, and internal levels. It explains the significance of data independence, the distinction between Data Definition Language (DDL) and Data Manipulation Language (DML), and introduces various data models. Additionally, it emphasizes the importance of conceptual modeling in database design.

Uploaded by

f2023266730
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/ 27

Welcome to CC-2141

Database Systems

Department of Computer Science


School of Systems & Technology - SST
Lecture 5 & 6
What we will learn in Unit-3

▪ The purpose and origin of the three-level database architecture.


▪ The contents of the external, conceptual, and internal levels.
▪ The purpose of the external/conceptual and the conceptual/internal mappings.
▪ The meaning of logical and physical data independence.
▪ The distinction between a Data Definition Language (DDL) and a Data
Manipulation Language (DML).
▪ A classification of data models.
▪ The purpose and importance of conceptual modeling.

2
The Three-Level ANSI-SPARC Architecture

3
1-External Level

• The users’ view of the database.

• This level describes that part of the database that is relevant to each
user.

• The external level consists of a number of different external views of


the database.

• Each user has a view of the “real world” represented in a form that is
familiar for that user.

• The external view includes only those entities, attributes, and relationships
in the “real world” that the user is interested in.

4
2-Conceptual Level

• This level describes what data is stored in the database and the
relationships among the data.

• The conceptual level represents:

• all entities, their attributes, and their relationships;

• the constraints on the data;

• semantic information about the data;

• security and integrity information.

5
3-Internal Level

• The physical representation of the database on the computer.

• This level describes how the data is stored in the database

• The internal level is concerned with such things as:

• storage space allocation for data and indexes;

• record descriptions for storage (with stored sizes for data items);

• record placement;

• data compression and data encryption techniques.

6
Example – Difference between 3 levels

7
Objectives of Three-Level Architecture

➢ A standard for database systems

➢ A user’s view is immune to changes made in other views

➢ Users should not need to know physical database storage details

➢ DBA should be able to change conceptual structure of database


without affecting all users

➢ Internal structure of database should be unaffected by changes to


physical aspects of storage
8
Database Schema

➢ Greek word (skhēma), which means shape

➢ The overall description of the database is called the database schema

➢ Skeleton structure of the database that defines the objects in the database

➢ A database generally stores its schema in a data dictionary

➢ In a relational database, the schema defines the schema objects e.g.,


table, fields, views, indexes, packages, procedures, functions, triggers,
sequences, synonyms, materialized views etc.

➢ Non-schema objects may include: users, roles, contexts etc.

9
Contd…

➢ There are three different types of schema in the database and these are defined
according to the levels of abstraction of the three-level architecture

➢ At the highest level, we have multiple external schemas (also called subschemas)
that correspond to different views of the data.

➢ At the conceptual level, we have the conceptual schema, which describes all the
entities, attributes, and relationships together with integrity constraints.

➢ At the lowest level of abstraction we have the internal schema, which is a


complete description of the internal model, containing the definitions of stored records,
the methods of representation, the data fields, and the indexes and storage structures
used.

➢ There is only one conceptual schema and one internal schema per database.

10
Data Independence

❖ A major objective for the three-level architecture is to provide


data independence,

❖ which means that upper levels are unaffected by changes to lower


levels.

❖ There are two kinds of data independence: logical and physical.

11
Logical data independence

➢ Changes to the conceptual schema, such as the addition or removal of


new entities, attributes, or relationships, should be possible without
having to change existing external schemas or having to rewrite
application programs.

➢ Clearly, the users for whom the changes have been made need to be
aware of them, but what is important is that other users should not be.

12
Physical data independence

➢ Changes to the internal schema, such as using different file


organizations or storage structures, using different storage devices,
modifying indexes or hashing algorithms, should be possible without
having to change the conceptual or external schemas.

➢ From the users’ point of view, the only effect that may be noticed is a
change in performance.

13
Database Languages

A data sublanguage consists of two parts:

➢ a Data Definition Language (DDL)

➢ a Data Manipulation Language (DML).

➢ The DDL is used to specify the database schema and

➢ The DML is used to both read and update the database.

14
DDL & DML The Data Manipulation Language (DML)

• A language that provides a set of


operations to support the basic data
The Data Definition Language (DDL) manipulation operations on the data held
in the database.
• A language that allows the DBA or user
to describe and name the entities, • Data manipulation operations usually
attributes, and relationships required include the following:
for the application, together with any
• insertion of new data into the database;
associated integrity and security
• modification of data stored in the database;
constraints.
• retrieval of data contained in the database;

• deletion of data from the database.

15
Data Models and Conceptual Modeling

• What is a Data model?


• An integrated collection of concepts for describing and manipulating data,
relationships between data, and constraints on the data in an organization.

• A model is a representation of real-world objects and events, and their


associations.

• It is an abstraction that concentrates on the essential, inherent aspects of an


organization and ignores the accidental properties.

• A data model represents the organization itself.

• It should provide the basic concepts and notations that will allow database designers
and end-users to communicate unambiguously and accurately their understanding of the
organizational data.
16
Components of a Data Model

A data model can be thought of as comprising three components:

(1) a structural part, consisting of a set of rules according to which databases


can be constructed;

(2) a manipulative part, defining the types of operation that are allowed on the
data (this includes the operations that are used for updating or retrieving data
from the database and for changing the structure of the database);

(3) a set of integrity constraints, which ensures that the data is accurate.

17
3 Broad categories of data models

1. Object-Based Data Models

2. Record-Based Data Models

3. Physical Data Models

18
1-Object-Based Data Models

• Object-based data models use concepts such as entities, attributes,


and relationships.

• An entity is a distinct object (a person, place, thing, concept, event) in


the organization that is to be represented in the database.

• An attribute is a property that describes some aspect of the object that


we wish to record, and

• a relationship is an association between entities.

• The ER model has emerged as one of the main techniques for database
design
19
2-Record-Based Data Models

• In a record-based model, the database consists of a number of fixed-


format records, possibly of differing types.

• Each record type defines a fixed number of fields, typically of a fixed


length.

• There are three principal types of record-based logical data model:

• the relational data model,

• the network data model, and

• the hierarchical data model.

20
2.1-The relational data model

• The relational data model is based


on the concept of mathematical
relations.

• In the relational model, data and


relationships are represented as
tables, each of which has a number
of columns with a unique name

21
2.2-Network data model

In the network model, data is represented


as collections of records, and relationships
are represented by sets.

22
2.3-Hierarchical data model

• The hierarchical model is a


restricted type of network
model.

• Again, data is represented as


collections of records and
relationships are represented
by sets.

23
3-Physical Data Models

• Physical data models describe how


data is stored in the computer,
representing information such as
record structures, record orderings,
and access paths.

24
Conceptual Modeling

• Conceptual modeling or conceptual database


design is the process of constructing a model of
the information use in an enterprise that is
independent of implementation details, such as
the target DBMS, application programs,
programming languages, or any other physical
considerations.

• This model is called a conceptual data model.

25
Functions of a DBMS

26
Thankyou
Any Queries?

27

You might also like