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

File Processing and Database Management System

Data

DATABASE ENVIRONMENT Models

Schemas

LESSON 2

Objectives:

• Understand three-level database architecture.


• Contents of external, conceptual, and internal levels
• Purpose of external/conceptual and conceptual/internal mappings.
• Define logical and physical data independence.
• Distinction between Data Definition Language and Data Manipulation Languages.
• Classification of data models.
(ANSI-SPARC) THREE LEVEL ARCHITECTURE

- American National
Standard Institute on
System Planning and
Requirement
Committee

Figure. The Three level


Architecture
• External Level
• Users’ view of the database.
• Describes that part of database that is relevant to a particular user.

• Conceptual Level
• Community view of the database.
• Describes what data is stored in database and relationships among the data.

• Internal Level
• Describes the physical storage structure of the database.
• Describes how the data is stored in the database.
DATA INDEPENDENCE

- Capacity of changing schema at one level without affecting the other

• Logical Data Independence


• Refers to immunity of external schemas to changes in conceptual schema.
• Conceptual schema changes (e.g. addition/removal of entities).
• Should not require changes to external schema or rewrites of application programs.

• Physical Data Independence


• Refers to immunity of conceptual schema to changes in the internal schema.
• Internal schema changes (e.g. using different file organizations, storage structures/devices).
• Should not require change to conceptual or external schemas.
DATABASE LANGUAGES

• Data Definition Language (DDL)


• Allows the DBA or user to describe and name entities, attributes, and
relationships required for the application
• plus any associated integrity and security constraints.

• Data Manipulation Language (DML)


• Provides basic data manipulation operations on data held in the database.
• The retrieval of information stored in the database
• The insertion of new information into the database
• The deletion of information from the database
• The modification of information stored in the database
DATA MODELS

- a collection of conceptual tools for describing data, data relationships, data semantics, and consistency
constraints. Its purpose is to represent data in an understandable way.

- Data Model comprises:


- a structural part;
- a manipulative part;
- possibly a set of integrity rules.

- Categories of data models include:


- Object-based
▪ Entity-Relationship model
- Record-based
▪ Relational Data Model
▪ Network Data Model
▪ Hierarchical Data Model
HIERARCHICAL DATA MODEL
NETWORK DATA MODEL
RELATIONAL DATA MODEL
REVIEW AND SUMMARY

• Three-level database architecture.


• Contents of external, conceptual, and internal levels
• Purpose of external/conceptual and conceptual/internal mappings.
• Defined logical and physical data independence.
• Distinction between Data Definition Language and Data Manipulation Languages.
• Classified the data models.
STEPS TO VIEW DBMS UI:

1. Open XAMMP Control Panel


2. Open browser (Chrome, firefox, and etc)
3. In the address bar, enter localhost/phpmyadmin
4. Explore the UI. Take note of the ff.
• Database
• SQL
• Export – Backup
• Import – Restore
• Create database
• Delete database
STEPS IN CREATING TABLE:

1. Create database
2. Create table
3. Insert data
4. Create back-up
5. Delete database
6. Step 1
7. Restore database

You might also like