Вы находитесь на странице: 1из 43

Lecture #1

By Mohsin Riaz

Three Level Architecture

External Level\View Logical Level \ View Internal Level \ view


Conceptual/Internal Mapping External/Conceptual Mapping Physical Data Independent Logical Data Independent

Mapping

Data Independent

Basic of Modern Database architecture Database can be view at three level Model refer to structure of database not to data store Permanent structure of Database is know as Intension of database or Database Schema Data store at given level is know as Extension of database or Database instance

Intension of database should not change Small changes may required many changes Extension of database performed after the intension of database Store data Its perform according to the rule define Schema are used to store definitions of structure of database Three level architecture defines different schema stores at different level to isolate the detail of different levels from one another

Consists of different external view of database Each external view is the view of a particular user about the system Interested in one part of the system Different views may have different representation of same data Some view might include virtual / calculated Virtual data is not store in database but created when its need External level is described in External schema Also called subschema Refer to different view

Middle level Its describe the data stored in database Its contain the definition of data to be store in database Rules and information about the structure and type of data Represent the following
All entities, their attributes and their relationship Constraint on the data Semantic information about data Security and integrity information

Support each external view DBA design a conceptual model to fulfill the present and future requirement of an organization If change in external view conceptual view accommodate Only of one schema in one database

Responsible to store data on storage media Describe the physical representation on computer Internal and Physical level normally same DBMS partially decide the way data is stored on the disk Decision of DBMS is based on the specifications of DBA DBMS performs storage space utilization to consume minimum space Data compression and encryption

Data manage by OS at Physical level Internal level is describe in internal schema Definition of stored record, methods of representation, data field and indexes Only of one schema in one database

Is a process of converting one level to another level Data at one level is related to the data at another level Two levels of Mapping

Conceptual/ Internal Mapping External/Conceptual Mapping

Defines the correspondence between Conceptual view and stored data How conceptual record and fields are represented at internal level
If the structure of stored database is changed then Conceptual/ Internal Mapping must be change accordingly so conceptual schema can remain consistent Responsibility of DBA

Defines the correspondence between Particular external view and Conceptual view

Separation of data and application program is called data independence Most Important advantage of Three level architecture Dont effect on low to upper layer Enable the user to change the structure of database without changing in application program Two types of Data independence

Physical Data Independence Logical Data Independence

Enable the user to change the internal level without changing in conceptual level If Physical Structure is changes, DBMS is aware of these changes, But still provide the same logical View Application program and user interactions based on logical view of data are not altered Change may perform at physical Level

Changing file organization or storage structure Using different storage devices Modifying index Modify the hash algorithm Changing in access method

Enables the user to change the conceptual level without changing in External Level Some Additional Information may be added to the database by changing the logical Structure Change may perform at Logical Level

Addition or Removal of Entities relationship Adding a file to database Adding new field in file Changing the type of field

Representation of real world objects, events and their association is called a model Model helps the user to understand the complexity of the real world environment A collection of concept and manipulating data, relationship between data and constraint on data is called data model

Structural Part:

It consists of set of rules


Defines the types of operations that performed on data Ensure the accuracy of data in database

Manipulative Part

Set of Integrity Rules

Used as communication tool for database designer, application programmer and end user to interact with each other Enables the user to understand the organization Necessary to design good database Very important to know structures, manipulating languages and integrity facilities Enables the user to understand the facilities and functionality provides by DBMS

Objects-Based Data Models

Use the concept like entities, attributes and relationship Some Types are the Following
Entity Relationship Object-Oriented

File-Based Models

Hierarchical Model Network Model Relational Model

Physical Data Models

Used the concept like entities, attributes and relationship Entity is a person, place or event for which data is collected and maintained in database Attribute is the characteristic for an entity Relationship is an association between two or more entities

Basically used to describe external and conceptual levels Can also used to describe internal level to some extent Used to develop and specify the logical structure Provide some options to implementation of the design Database consists of different records May different types Each type defines a fixed number of fields

Three types of record based models

The Hierarchical Model The Network Model The Relational Model

Records have parent-child relationship IMS introduced by IBM in 1968 Still used DBMS on IBM mainframes

Representation of data as hierarchical Trees

Parent-Child relationship Record type R1 is parent of R2 Root is most important record type Depend on root
Each child have one parent

Each sub-Module has only one super module

Represents a set of Related Records

There can be one or more record occurrences for a given record type Writes on Database, Only one occurrences of record Retrieved from database, Only one occurrences of record

Simple Structure

Database is a simple Hierarchical Tree Parent and child records are stored close to each other Parent-child relationship stored as pointers from one record to other Depend on root Most Important record type

High Performance

Predefined Relationship between Record Types


Difficult to re-organize More complex real life requirements

Developed to overcome the problem Modified the Hierarchical model Multiple parent-child relationship These relationship are know as sets

Data Record Types are represented as Network Each Sub-Module can have one or more super module Represent a set of related records Complex Structure Relationship are predefine Difficult to re-organize More complex real life requirements

To handle large volumes of data Applied the mathematics to solve problems


Data integrity Data Redundancy Data Independent

Data is store in relation A table in database has a unique name that identifies its contents Intersection of row and columns

Relation

Data is store in relation Relation is another term used for table


Every relation or table consists of many tuples Record or rows Is a named column of a relation Is a collection of all possible values of one or more attributes

Tuple

Attributes

Domain

Degree

No of Attributes
No of Tuples

Cardinality

Data Processing
Most important functions of DBMS Creations, Storage and arrangement of data Also provides access to data stored

User-Accessible Catalog
Is an object contain all information about the database. Includes schema information, user information and user rights

Transaction Support
Collection of all steps to complete a process Must Ensure complete all process or none of them

Concurrency Support Recovery Services Data Communication Support Integrity Services

Integrity means accurate and reliability of data DBMS also provides different levels of Authorization

Authorization services

Preliminary Investigation

First phase of SCLC To identify deficiencies and requirements Whether the system to be developed is feasible or not Feasibility is determine on the following parameters
Whether current technical resources or technology in

the developers organization or in the Market Whether the system cost is effective economically How effectively the user will operate the system

Requirement Analysis

Current system is studied in detailed to find out how its works and where the improvements are required Detail study of various operations performed by the system and relationship within and outside the system Analyst and user work closely Requirement specification

System Design
Design a new system to satisfy the these requirements Design phase states how a system will meet the requirements identified during system analysis Some activities performed during design phase are as following

Identification of data entry forms along with data

elements Identification of reports and outputs of a new system Identification of data elements and table for database Procedures for driving the output from given input

Software Development

Actual Coding of program is done Tested using Dummy data After programs are tested individually, system is tested as a whole During the testing phase, all software modules are integrated and tested to ensure that they are running according to the specification

System Testing

System Implementation

Developed system is install for user User are trained to operate the system Data files needed by the system are constructed
Any changes occurs in the user environment May be modify for its effectives use

System Maintenance

Вам также может понравиться