Sei sulla pagina 1di 14

Bit 1 or 0 Byte/character

A group of 8 bits
Field A group of characters Record A collection of related fields File A collection of related records

A-Z, 0-9, %,#

N+A+M+E

NAME+ID+TEL

1DAC student file

Database TARC DB: student file + A collection of related files employee file + payment file + result file

Separate data files are created and stored for Traditional approach each application program

Secondary storage

Inventory Control Program Order Entry Program Customer Billing Program

Inventory File Order Entry File Billing File

Student -File S_ID S001 S002 Name Ivy Liew Ian Lee Address Gender Tel. KL Female 012-12345667 PJ Male 016-2345678

S003

Max Teh

KL

Male

017-9876543

Traditional Approach Some data may be duplicated (required extra storage space)
Exam_File S_ID S001 S002 S003 Name Ivy Liew Ian Lee Max Teh Address KL PJ KL Gender Female Male Male Tel 012-12345667 016-2345678 017-9876543 Subject ITS ITS ITS
5

Grade A B A

Pool of related data is shared Database by multiple approach application programs

Secondary storage

Inventory Control Program Order Entry Program Customer Billing Program DBMS Inventory File / Order Entry File / Billing File

Student -File S_ID S001 S002 S003 Name Ivy Liew Ian Lee Max Teh Address Gender Tel. KL Female 012-12345667 PJ Male 016-2345678 KL Male 017-9876543

Database Approach Reduce duplication of data (store only once)


S_ID S001 S002 S003 Exam_File Subject Grade ITS ITS ITS A B A

Relational database
2D tables, consists of rows & columns

1) Row = record = tuple = data entity 2) Column = attribute 3) Domain = field name = domain description 4) Primary key => field(s) uniquely identifies the record

5) Common field => exists in both files to make a relationship between them

Student_File primary key

Relation Domain (column description ) Tuple

Student ID

Name

Address

DOB

A0001 A0002 A0003

Amber Chia Andy Lau Peter Pan

Malaysia Hong Kong UK

12/3/80 31/8/64 3/1/85

(Record)

R1 R2

Attributes (Columns) Name attribute, Address attribute, DOB attribute

Master file

Containing permanent records that are generally updated periodically

Types of data files


Transaction file

Temporary holding file that holds all changes to be made to the master file

DBMS
programs that provide users with tools to add, delete, access, and analyze data stored in one location

interface between the database and its users and other application programs

Data Dictionary File Retrieval and Maintenance Data Security Backup and Security

A repository contains data about each file in the database and each field within those files

Use Query language to retrieve or select data from a database

Allowed database administrators (DA) to specify different access privileges for different users of a DBMS

restore the database to a usable form in case it is damaged or destroyed

Reduced data redundancy Improved data integrity

Data is organized by the DBMS and stored only once Reduce duplication data
No separate files contain copies of the same piece of data Reduce duplicates & inconsistencies in updating. Thus, improve data integrity

Better & easier access to data and information


Shared data

simple commands can be

given to get the required information

The data in a database is shared by the entire organization

Potrebbero piacerti anche