Monday, March 30, 2009

Modeling a System

Model
=>pattern, plan, representation (especially in miniature), or description designed to show the main object or workings of an object, system, or concept

Four major types of models
=>Narrative (based on words);
=>Physical (tangible);
=>Schematic (graphic representation);
=>Mathematical (arithmetic representation)

Data Models
=>Abstract model that describes how data is represented and accessed

=>An integrated collection of concepts for describing and manipulating data, relationships between data and constraints on data in an organization

=>Data modeling: a method used to define and analyze data requirements needed to support the business processes of an organization

Wednesday, March 25, 2009

The Three-Level ANSI-SPARC Architecture

The American National Standards Institute (ANSI) Standards Planning and Requirements Committee (SPARC)=>Recognized the need for a three-level approach with a system catalog
Provides a basis for understanding some of the functionality of a DBMS.

Objectives of Three-Level Architecture
The objective of the three-level architecture is to separate the users’ view(s) of the database from the way that it is physically represented. This is desirable since:

-It allows independent customised user views: Each user should be able to access the same data, but have a different customised view of the data. These should be independent: changes to one view should not affect others.

-It hides the physical storage details from users: Users should not have to deal with physical database storage details. They should be allowed to work with the data itself, without concern for how it is physically stored.

-The DBA should be able to change the database storage structures without affecting the users’ views: From time to time rationalisations or other changes to the structure of an organisation’s data will be required.

-The internal structure of the database should be unaffected by changes to the physical aspects of the storage: For example, a changeover to a new disk.

-The DBA should be able to change the conceptual or global structure of the database without affecting the users: This should be possible while still maintaining the desired individual users’ views.

Sunday, March 22, 2009

Limitations of File-Based Approach

Separation and isolation of data
-Difficult to access data that is available (eg. from two files – Student that achieved good academic result and active in extra curriculum activities)

Duplication of data
-Cost time and money to enter data more than once
-Additional storage space is needed - cost
-Inconsistencies of data

Data dependence
-File structure is defined in the program code.
-Changes to an existing structure are difficult to make

Incompatible file formats
-Programs are written in different languages, and so cannot easily access each other’s files.

Fixed Queries/Proliferation of application programs
-Programs are written to satisfy particular functions.
-Any new requirement needs a new program.

Traditional File-Based Systems

-An early attempt to computerize the manual filing system

-Definition
Collection of application programs that perform services for the end users (e.g. reports).
Each program defines and manages its own data.

-Works well while the number of items to be stored is small. However, it is breaks down when we have to cross-reference or process the information in the files.

File-Based Processing
-Figure shows each department accessing their own files through application programs written specially for them
-Each set of departmental application programs handles data entry, file maintenance, and the generation of a fixed set of specific reports.
-The physical structure & storage of the data files and records are defined in the application code

Examples of Database Applications

Purchases from the supermarket
http://www.tesco.com/
Purchases using your credit card
http://www.amazon.com/
Booking a holiday at the travel agents
http://www.expedia.com/
Using the local library
http://www.psz.utm.my/
Property management
http://www.rightmove.co.uk/
Banking transaction
http://www.maybank2u.com.my/

Introduction to Databases

-The database is now such an integral part of our day-to-day life that often we are not aware we are using one.
-We will use some terminology in this chapter :
database :a collection of related data
DBMS (database management system) : the software that manages & controls access to the database
database application : a program that interacts with the database at some point in its execution
database system : a collection of application programs that interact with the database along with the DBMS and database itself