Top Banner
© InfoGem Introduction to Database Database system is a computer based record keeping system. It is a system whose overall purpose is to record and maintain information. The information concerned can be anything that is deemed important to the organization. In another words, database is collection of stored operational data which can be used and shared by different applications and users of any enterprise. This enterprise could be scientific, commercail, educational, etc.
21

© InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

Jan 02, 2016

Download

Documents

Anabel Perkins
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Introduction to Database

Database system is a computer based record keeping system.

It is a system whose overall purpose is to record and maintain information. The information concerned can be anything that is deemed important to the organization.

In another words, database is collection of stored operational data which can be used and shared by different applications and users of any enterprise. This enterprise could be scientific, commercail, educational, etc.

Page 2: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Why Database

Database system provides the enterprise with centralized control of its operational data, which is one of its most valuable assets.

This is totally oposite of the situation that is happening in many organizations today, where typically each application has its own private files and a lot of times its own private tapes and disk packs too. This makes the operational data widely dispered and difficult to control.

Page 3: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Advantage of centralized database

Redundancy can be reduced Inconsistency can be avoided Data can be shared Standards can be enfored Security restrictions can be applied Integrity can be maintained Conflicting requirements can be balanced

Page 4: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Data independence Data indepencence is an objective in database development Most present day applications are data dependent. This is

the way in which the data is organized in secondary storage and is accessed. Both are dictated by the requirements of the application. This is undesirable because:

» Different applications will need defferent view of the same data.

» Data Base Adminstrator (DBA) must have the freedom to change the storage structure or access strategy or both in response to changing requirements without the necessity of modifying existing application.

Page 5: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Data independence

Data independence could be defined as that, applications concerned with data, not depend on storage structure or access strategy of data.

With data independence database is able to grow without affecting existing applications (another major reason).

Page 6: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

ANSI database system architecture

External Level

. . .

Conceptual LevelCmmunity user view

External Level(Individual user view)

Internal Level(phisical storage view

Page 7: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

ANSI database system architecture

External Level

. . .

Conceptual LevelCmmunity user view

External Level(Individual user view)

Internal Level(phisical storage view

A1 A2 A3 An

mapping External/conceptual

mapping conceptual/internal

DatabaseManagementSystem(DBMS)

DataDictionary

Conceptual Schema

ExternalSchema

ExternalSchema

Internal schema

DBA

Page 8: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Database architecture-terms

Schema: defines a database and sub-schema defines a portion of the database.

Schema and mapping built and maintained by the database adminstrator.

Conceptual schema is known as data model Internal level is concerned with the in which the

data is actually stored. Users are:

» application programmers» ad hoc users» external users

Page 9: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Database architecture-terms

Each user communicates with the database via a language referred as data sub-language (DSL), which is the subset of the language concerned with the retrieval and storage of information in the database.

Mapping defines the correspondence between data models and external/internal schema.

DBMS is the software that handles all access to the database and also is responsible for applying the authorization checks and validation procedures.

DBMS is a bridge between users and data.

Page 10: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Data Base Adminstrator DBA is responsible for supervising the overall DBS. DBA’s responsibilities:

» Deceiding the information content of the DBS

» Decide about the storage structure and access strategy

» Interface between users and DBS:

– Insure the availability of data for users

– Assist users for their inquiries

– In cooperation with users set up the external schema

» Define authorization check and validation procedures.

» Define the strategy for back up and recovry process.

» monitoring the performance and respond to changing requirements.

Page 11: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Data Dictionary

Data dictionary is the most important tool for DBA. Data dictionary is a database on its own right. It defines all data and their relationship, “ data anot

data” or information about meta data.

Page 12: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Disadvantage of Database Systems

Database is more vulnerble to destruction thru:» machine malfunction» personal error» Deliberate human tampring

Cost: the cost of required hardware, DB development, and DB maintenance is high.

Complexity: Due to its complexity, the user should understand it well enough to use it effecienty and effectively.

Page 13: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Database models

Almost all of the database systems developed over the past two decades are relational.

Almost all of the database research is also based on relational related ideas.

Relational database is a system in which:» the data is perseived by the user as tables» the operators at user’s disposal are operators which

generate a new table from old We can categorize systems by the data

structures and operators they present to the users.

Page 14: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Database Models - Product - Vendor

The four major data model categories are:» Relational DB2 IBMSQL/DS

Ingress Relational Technology

Oracle Oracle corp.

Access Microsoft » Network DMS100 Unysis

IDMS Cullinet» Heirarchical IMS IBM

System 2000 Intel» Object oriented Postgress Relational Technology

Starburst IBM

Gemstone

Orion

Page 15: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Relational Database

Relational database is a collection of tables Formally a table is called a relation Database is a structure that can hold

information about tables, rows, and columns

Page 16: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Relational Database

Relational Relational Traditional

Model DBMS File System

Relation Table File

Tuple Row Record

Attribute Column Field

Primary Key (PK) Primary Key (PK) Search Key

Relationship (FK) Relationship (FK) Not Used

Page 17: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Relational Database

Primary Key (PK): An attribute which can uniquely identify each record (tuple) of a relation (table).

Foreign Key (FK): An attribute which is a regular attribute in one table but a primary key in another table.

Page 18: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

Example of a Relational

Database

SalesNO Name Rate City Dept#

10 James 10 Dallas A21112 Black 15 Denver F65448 Black 8 WashDC A211

SalePrimary Key (PK)

Relation Name

Tuple (record)

Attribute

Page 19: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

SalesNO Name Rate City Dept#

10 James 10 Dallas A21112 Black 15 Denver F65448 Black 8 WashDC A211

Sale

CustID Name Balance City SaleNo

132 Black 2000.00 Dallas 10135 Tom 129.89 Denver 12198 Tom (132.90) Dallas 10

Customer

SalesNO is PK in Sales table

Example of a Relational Database

Page 20: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

SalesNO Name Rate City Dept#

10 James 10 Dallas A21112 Black 15 Denver F65448 Black 8 WashDC A211

Sale

CustID Name Balance City SaleNo

132 Black 2000.00 Dallas 10135 Tom 129.89 Denver 12198 Tom (132.90) Dallas 10

Customer

SalesNO is PK in Sales table and FK in Customer table

Example of a Relational Database

Page 21: © InfoGem Introduction to Database l Database system is a computer based record keeping system. l It is a system whose overall purpose is to record and.

© InfoGem

OrderLine

ONO Oline# Part# Qty Part#

102 1 12.00 10 EX454102 2 129.89 1 DE012199 1 32.90 3 DC810

ONO DATE CustID SalesNO

102 11/2/94 132 10199 2/15/95 135 12 92 10/4/94 102 53

Order

CustID Name Balance City SaleNo

132 Black 2000.00 Dallas 10135 Tom 129.89 Denver 12198 Tom (132.90) Dallas 10

Customer

SalesNO Name Rate City Dept#

10 James 10 Dallas A21112 Black 15 Denver F65448 Black 8 WashDC A211

Sale

Example: Order Entry Database