Data Isolation
Data Isolation
Data Isolation
data element: a single fact or piece of information Database Management System (DBMS)
A collection of programs that enables users to
data inconsistency: a situation where various copies create and maintain databases and control all
of the same data are conflicting access to them.
The primary goal of a DBMS is to provide an
data isolation: a property that determines when environment that is both convenient and
and how changes made by one operation become efficient for users to retrieve and store
visible to other concurrent users and systems information
Types of Data Models: set type: a limited type of one to many relationship
1. High-Level Conceptual Data Models
Provide concepts for presenting data in Data Modelling
ways that are close to the way people Steps in the process of database design:
perceive data. 1. Data Modelling
Example: o Considered to be a high-level and
o Entity relationship model abstract design phase, also referred to
Uses main concepts like entities, as conceptual design.
attributes and relationships. o The aim of this phase is to describe:
Entity – represents a real-world The data contained in the database
object such as an employee or a (e.g., entities: students, lecturers,
project. courses, subjects)
The relationships between data - Semantic information (e.g., business
items (e.g., students are supervised rules)
by lecturers; lecturers teach - Security and integrity information
courses) Consider a database as a collection of
The constraints on data (e.g., entities (objects) of various kinds
student number has exactly eight Are the basis for identification and high-
digits; a subject has four or six units level description of main data objects;
of credit only) they avoid details
2. The data items, the relationships and the Are database independent regardless of
constraints are all expressed using the the database you will be using
concepts provided by the high-level data o Internal models – the three best-known
model. models of this kind are the relational data
3. Database Design model, the network data model and the
o Two sub-steps: hierarchical data model. These internal
Database logical design – defines a models:
database in a data model of a Consider a database as a collection of
specific DBMS. fixed-size records
Database physical design – which Are closer to the physical level or file
defines the internal database structure
storage structure, file organization Are a representation of the database as
or indexing techniques. seen by the DBMS.
o These two sub-steps are database Require the designer to match the
implementation and operations/user conceptual model’s characteristics and
interfaces building steps. constraints to those of the selected
implementation model
Data Model Involve mapping the entities in the
Collection of concepts or notations for conceptual model to the tables in the
describing data, data relationships, data relational model
semantics and data constraints. o Physical models
Most data models also include a set of basic Are the physical representation of the
operations for manipulating data in the database
database. Have the lowest level of abstractions
Are how the data is stored; they deal
Degrees of Data Abstraction with
Models in order of decreasing level of - Run-time performance
abstraction: - Storage utilization and compression
o External models - File organization and access methods
Represent the user’s view of the - Data encryption
database Are the physical level – managed by the
Contain multiple different external operating system (OS)
views Provide concepts that describe the
Are closely related to the real world as details of how data are stored in the
perceived by each user computer’s memory
o Conceptual models
Provide flexible data-structuring Data Abstraction Layer
capabilities External Model
Present a “community view”: the logical o End user’s view of the data
structure of the entire database o Requires that the designer subdivide a set
Contain data stored in the database of requirements and constraints into
Show relationships among data functional modules that can be examined
including: within the framework of their external
- Constraints models (e.g., human resources versus
sales).
Conceptual Model Logical schema – conceptual design of
o First model created the database done on paper or a
o Independent of both software and whiteboard
hardware o Physical data independence
Internal Model The immunity of the internal model to
o Once a DBMS is selected, you can then changes in the physical model
implement it. The logical schema stays unchanged
o Here you create all the tables, constraints, even though changes are made to file
keys, rules, etc. organization or storage structures,
o Often referred to as the logical design storage devices or indexing strategy.
Physical Model Physical data independence deals with
o The way the data is stored on disk hiding the details of the storage
structure from user applications.
Schemas
Schema Key Terms:
o An overall description of a database conceptual model: the logical structure of the
o Usually represented by the entity entire database
relationship diagram (ERD)
conceptual schema: another term for logical
There are many subschemas that represent
schema
external models and thus display external views
of the data.
data independence: the immunity of user
Below is a list of items to consider during the
applications to changes made in the definition and
design process of a database.
organization of data
o External schemas: there are multiple
o Multiple subschemas: these display multiple
data model: a collection of concepts or notations
external views of the data
for describing data, data relationships, data
o Conceptual schema: there is only one. This
semantics and data constraints
schema includes data items, relationships
and constraints, all represented in an ERD.
data modelling: the first step in the process of
o Physical schema: there is only one
database design
Logical and Physical Data Independence database logical design: defines a database in a
Data Independence data model of a specific database management
o The immunity of user applications to system
changes made in the definition and
organization of data. database physical design: defines the internal
Data abstractions expose only those items that database storage structure, file organization or
are important or pertinent to the user. indexing techniques
Complexity is hidden from the database user.
Data independence and operation entity relationship diagram (ERD): a data model
independence together form the feature of describing the database showing tables, attributes
data abstraction. and relationships
There are two types of data independence:
o Logical data independence external model: represents the user’s view of the
The ability to change the logical database
schema, without changing the external
schema or user view external schema: user view
Changes to the logical schema (e.g.,
alterations to the structureof the internal model: a representation of the database as
database like adding a column or other seen by the DBMS
tables) should not affect the function of
the application (external views).
logical data independence: the ability to change THE DATABASE SYSTEM MASTER PLAN
the logical schema without changing the external Contents of the database system master plan
schema should include a statement of organizational
goals and objectives, an organization chart,
logical design: where you create all the tables, entity diagrams showing the major relationships
constraints, keys, rules, etc. among entities in the enterprise, modules or
subsystems to be implemented as part of the
logical schema: a conceptual design of the database database system, the costs and benefits
done on paper or a whiteboard, much like expected to be associated with the system, and
architectural drawings for a house a schedule for implementing each module.
1. Organizational Goals and Objectives
operating system (OS): manages the physical level Two aspects of the organizational
of the physical model environment should be considered in the
master plan:
physical data independence: the immunity of the o Organizational goals and objectives
internal model to changes in the physical model o The manner in which the enterprise is
structured
physical model: the physical representation of the Organizational goals and objectives are
database important to database system design; many
critical information needs may be derived
schema: an overall description of a database from them.
When possible, goals and objectives should
be stated in numeric terms, so that progress
James F. Courtney and David B. Paradice's toward those goals can be measured.
Database Systems for Management: "Chapter 2: Instead of saying that the goal is to increase
Elements of Database Systems" sales, for example, one might say that the
goal is to increase sales by 10 percent.
“Effective” System The database system should assist
A system that "does the right thing" by managers of the organization in measuring
providing the information necessary to run the the level of goal attainment and in steering
organization. the organization toward its goals.
Structure Thus the database system master plan
Parts of a system and how these parts interact. should begin with a brief statement of
Module organizational goals and objectives and how
Describe a major element of the overall the database system will measure progress
database system, not to a piece of toward goals.
programming code. 2. Organizational Structure
Database System Master Plan Second feature of the organizational
Lays out the ultimate structure and contents of environment that should be included in the
the database system--and does so before work master plan.
begins on the system itself. It is important to consider the structure of
Entity the organization because the database
Any object, tangible or intangible, about which system will surely be required to support
the organization wishes to store data. the flow of information between various
Have attributes, such as name, color, and price. units or divisions of the enterprise.
Navigation Path The information flow usually follows
Arrows pointing left or right to indicate the organizational channels between superior
route. and subordinate units.
Pointers For this reason, the database system is said
Arrows in databases indicating where the to be "superimposed" on the structure of
program should look on the system's storage the organization. It is convenient to include
devices to find certain records. an organizational chart and a brief
description of the function of each of the
organizational units in the database system It must also ensure that anticipated benefits
master plan. outweigh these costs.
3. Entity Charts The value of benefits of database systems is
Entities and their relationships are initially much more difficult to estimate than costs.
defined by working with users, who must be
able to specify their information needs. Techniques and Procedures in a Database
Represent the major entities and Environment
relationships among them to give an overall Database Design Techniques
view of the database structure. o The process of database design consists of
Relationships in the diagram are of three three major phases:
types: An information-requirements analysis
o One-to-one (abbreviated 1:1) phase
relationship A logical design phase
One instance of an entity of a given Physical design phase.
type is associated with only one Information-Requirements Analysis and User
member of another type Views
Single-headed arrows are used to o Information-requirements analysis
represent a "one" relationship in Involves working with users to define
the direction of the arrow. their information needs in detail.
o One-to-many (1:M) relationship Concerned with information as users
One instance of a given type of see it; that is, information is viewed in
entity is related to many instances terms of the way it appears in
of another type. documents, on terminal screens, or
Double-headed arrows are used to even in images in the user's mind.
represent "many" relationships. Representations of information and
data at this level are referred to as
o Many-to-many (M:M) relationship "user views."
Many entities of one type are Information-requirements analysis is
associated with many instances of the first and most important phase of
another type. the database design process. It is the
4. Entity Groups, Database System Modules, and most important phase because the
Schedules ultimate effectiveness of the system
The master plan should describe the major depends on how accurately the
pieces or modules of the system to be information requirements and user
developed, how these modules will fit views are specified initially.
together into an integrated structure, and a Specifications of user information
schedule for detailed design and requirements feed the entire design
development of each module. process and determine the ultimate
It may be possible to define these modules form and content of the database
based on the number and strength of the system.
relationships in the entity diagram. Poor specifications result in a system
5. Cost and Benefits that does not satisfy user needs and
Management of the organization should, may lead to costly redesign, or even to
and probably will, view the development of cancellation of the project.
a database system as an investment that Logical Design
must pay for itself; that is, the benefits o Once the various views have been defined
derived from using information provided by and specifications developed, they must be
the system must outweigh the cost of coordinated and organized into an
developing it. integrated, cohesive system. This process is
The organization must have a realistic referred to as logical design.
picture of the anticipated cost to make sure o Consists of three steps:
that funds are available to develop and Developing a data model for each user
operate the system. view
Integrating the entities, attributes, and o Relational approach
relationships into a composite logical Describes databases using tables with
schema that describes the database for special characteristics
that module in terms unrelated to the o Relations
software package being used Tables
Transforming the logical schema into a
software schema expressed in the Software
language of the chosen database Three different kinds of software involved in
management package. most database systems:
Physical Design o Database management packages
o The last step of the database design o Operating systems
process. o Applications programs
o Involves converting the software schema Applications programs gain access to the
into a form implementable with the database through the database management
organization's particular hardware, system. Most database management packages
operating system, and database use the basic access methods of the host
management system. operating system to perform the necessary
o Involves designing navigation paths, input-output operations on the data files
deciding which records to place in nearby themselves (some packages support their own
portions of the storage devices, access methods).
determining the size of physical records on Database Management Systems
storage devices and buffer areas in main Minimum components:
memory to hold records, and implementing o Data dictionary for cataloging all the data
integrity and security requirements. items in the system
o Data definition language for further
Other Database Techniques and Procedures describing the software schema and user
Many other procedures and techniques in views
addition to those for database design exist in a o One or more query languages suitable for
database environment. These include end-users as well as programmers
procedures for analyzing, implementing, and o Data manipulation language for use by
operating systems, designing and documenting programmers
programs, and training users. o Report generator language for efficient
Among the tasks involving these procedures are programming of management reports
collecting data to be entered into the system, o Features to support data integrity, security,
performing manual edit checks to ensure the privacy, and recovery
integrity of the data before it is entered, Data Dictionary
actually entering data, running programs o Used to maintain standard definitions of all
necessary to update the database and generate data items within the scope of the database
reports from it, logging changes to the system.
databases, making backup copies of the o The purpose of the data dictionary is to
database so that it can be reconstructed if
enforce standard definitions of the data
accidentally damaged or destroyed, and
resources of the organization.
assuring that security procedures are followed.
Definitions include a precise description
of the meaning of a data item name and
Databases
a precise description of how values of
Integrated, shared collections of files. each data item are stored in the
Databases are stored physically on the storage computer system.
devices of the organization's computer system. o Functions of a good data dictionary include:
The way the data is organized and stored on
Maintaining standard user definitions of
these devices is referred to as its physical
the precise meaning of data items and
organization.
standard computer definitions giving
People think of data in terms of its logical formats and data types
organization.
Maintaining cross-reference lists of data report generators. In many cases, these
items used by applications programs features make the programming much easier
and applications programs using a given than with the conventional file approach.
data item
Providing standard definitions of data Hardware
items to applications programs when
requested to do so.
o Passive dictionaries simply maintain user
and computer definitions of data items.
o Active dictionaries include an interface to
applications programs to support features
such as generating record and field (data
item) descriptions for application programs.
Data Definition Languages
o Used to translate the logical schema into a
software schema for the database
management package in use.
o Two languages defined by CODASYL
committees:
The schema DDL for specifying the
composite schema
The subschema DDL for specifying user
views or data subsets of the schema
o Structured Query Language (SQL)
Adopted as the industry standard for
relational languages.
Many relational packages use SQL,
which has features for describing the
relations of a relational database.
Query Languages
o Designed to give end-users direct access to
the database.
o One type of fourth-generation language
(4GL).
First generation is machine (binary)
language
The second is assembly language
The third is programming languages
such as C++, SQL, JAVA, or VISUALBASIC