PB204 Jabatan Perdagangan POLITEKNIK SEBERANG PERAI DATABASE  APPLICATION
INTRODUCTION TO DATABASE SYSTEM  1.0
Concept of Database System <ul><li>How are data and information related? </li></ul><ul><ul><li>Data is raw facts </li></ul...
Data and Information <ul><li>What are the qualities of valuable information? </li></ul>Useful Accessible Organized Timely ...
Data and Information (cont.) <ul><li>The Hierarchy of Data </li></ul><ul><ul><li>Database contains files, file contains re...
Data and Information (cont.) <ul><li>What is a field? </li></ul><ul><ul><ul><li>Combination of one or more characters </li...
Data and Information (cont.) <ul><li>What are common data types? </li></ul>Yes/No (also called Boolean)—only the values Ye...
Data and Information (cont.) <ul><li>What is a record? </li></ul>Group of  related fields Key field , or  primary key ,  u...
Data and Information (cont.) <ul><li>What is a data file? </li></ul><ul><ul><ul><li>Collection of related records stored o...
Data and Information (cont.) <ul><li>What is file maintenance? </li></ul><ul><ul><ul><li>Procedures that keep data current...
Data and Information (cont.) <ul><li>Why do you add records? </li></ul><ul><ul><ul><li>Add new record when you obtain new ...
Data and Information (cont.) <ul><li>What is validation? </li></ul><ul><ul><ul><li>Process of comparing data with a set of...
Data and Information (cont.) <ul><li>What are the types of validity checks? </li></ul><ul><ul><ul><li>Consistency Check   ...
Data and Information (Cont.) <ul><li>What is a  database ? </li></ul>Database software  allows you to Collection of data  ...
Purpose of Database Systems <ul><li>What is a  database ? </li></ul><ul><ul><ul><li>Many programs and users can share data...
Purpose of Database Systems (cont.) <ul><li>Drawbacks of using file systems to store data: </li></ul><ul><ul><li>Data redu...
Purpose of Database Systems (Cont.) <ul><li>Drawbacks of using file systems to store data (cont.) </li></ul><ul><ul><li>At...
Database Management System (DBMS) <ul><li>DBMS contains information about a particular enterprise </li></ul><ul><ul><li>Co...
Database Management System (DBMS) (Cont.) <ul><li>Databases touch all aspects of our lives </li></ul><ul><li>DBMS used to ...
Database Management System (DBMS) (Cont.) <ul><li>A typical DBMS has a layered architecture </li></ul><ul><li>The figure d...
Database Management System (DBMS) (Cont.) <ul><li>What are popular database management systems (DBMSs)? </li></ul>Personal...
Database Management System (DBMS) (Cont.) <ul><li>What are guidelines for developing a database? </li></ul>1.  Determine t...
End Of Chapter 1
Upcoming SlideShare
Loading in …5
×

Chapter 1

1,956 views

Published on

PB204 Database Application Jabatan Perdagangan Politeknik Seberang Perai

Published in: Education, Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,956
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
35
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Chapter 1

  1. 1. PB204 Jabatan Perdagangan POLITEKNIK SEBERANG PERAI DATABASE APPLICATION
  2. 2. INTRODUCTION TO DATABASE SYSTEM 1.0
  3. 3. Concept of Database System <ul><li>How are data and information related? </li></ul><ul><ul><li>Data is raw facts </li></ul></ul><ul><ul><li>Information is data that is organized and meaningful </li></ul></ul><ul><ul><li>Computers process data into information </li></ul></ul><ul><li>What is data integrity? </li></ul><ul><ul><ul><li>Degree to which data is correct </li></ul></ul></ul><ul><ul><ul><ul><ul><li>Garbage in, garbage out (GIGO) —computer phrase that </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>means you cannot create correct information from </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>incorrect data </li></ul></ul></ul></ul></ul>Garbage in Garbage out Data integrity is lost
  4. 4. Data and Information <ul><li>What are the qualities of valuable information? </li></ul>Useful Accessible Organized Timely Verifiable Accurate Cost-effective
  5. 5. Data and Information (cont.) <ul><li>The Hierarchy of Data </li></ul><ul><ul><li>Database contains files, file contains records, record </li></ul></ul><ul><ul><li>contains fields, field contains characters </li></ul></ul>Commerce Department Database Student Class File field Names records fields maximum characters in student matric no field Characteristics of Matric No Field Matric No Name Date Of Birth 10DPM10F1101 AZRI BIN ALI 30.4.1992 10DPM10F1102 FATIMAH BT ABDULLAH 18.6.1992 10DPM10F1103 FARISHA BT ZAHID 28.8.1992 Field size 12 format Input mask Caption Matric No Default value Validation rule Validation text required Yes Allow zero length No Indexed Yes (No Duplicate)
  6. 6. Data and Information (cont.) <ul><li>What is a field? </li></ul><ul><ul><ul><li>Combination of one or more characters </li></ul></ul></ul><ul><ul><ul><li>Smallest unit of data user accesses </li></ul></ul></ul><ul><ul><ul><ul><li>Field size defines the maximum number of characters a field can contain </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Field name uniquely identifies each field </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Data type specifies kind of data field contains </li></ul></ul></ul></ul>Students class file Data types Matric No Text Name Text Date Of Birth text
  7. 7. Data and Information (cont.) <ul><li>What are common data types? </li></ul>Yes/No (also called Boolean)—only the values Yes or No (or True or False) Hyperlink Web address that links to document or Web page Object also called BLOB for binary large object)—photograph, audio, video, or document created in other application such as word processing or spreadsheet Currency dollar and cent amounts or numbers containing decimal values Date month, day, year, and sometimes time Memo lengthy text entries Text (also called alphanumeric)—letters, numbers, or special characters Numeric numbers only AutoNumber unique number automatically assigned to each new record
  8. 8. Data and Information (cont.) <ul><li>What is a record? </li></ul>Group of related fields Key field , or primary key , uniquely identifies each record
  9. 9. Data and Information (cont.) <ul><li>What is a data file? </li></ul><ul><ul><ul><li>Collection of related records stored on disk </li></ul></ul></ul>fields Key field records NO. PEND NAMA PELAJAR NO. HP PELAJAR NAMA SYARIKAT KOD SYARIKAT 10DAT09F1017 SOO HUI YING 0164697289 LIANG & CO P1531 10DAT09F1019 LAU XIN HUI 0124318638 TAN YEN WOOI & CO_01 P1532 10DAT09F1021 HONG CHING SHING 0164702233 THAM & CO P1533 10DAT09F1022 TAN IE VON 0166925719 CHUAHBOON CONSULTING SDN BHD P1534
  10. 10. Data and Information (cont.) <ul><li>What is file maintenance? </li></ul><ul><ul><ul><li>Procedures that keep data current </li></ul></ul></ul><ul><ul><ul><li>Changing records </li></ul></ul></ul><ul><ul><ul><li>Adding records </li></ul></ul></ul><ul><ul><ul><li>Deleting records </li></ul></ul></ul>
  11. 11. Data and Information (cont.) <ul><li>Why do you add records? </li></ul><ul><ul><ul><li>Add new record when you obtain new data </li></ul></ul></ul><ul><li>Why do you change records? </li></ul><ul><ul><ul><li>Correct inaccurate data </li></ul></ul></ul><ul><ul><ul><li>Update old data </li></ul></ul></ul><ul><li>Why do you delete records? </li></ul><ul><ul><ul><li>When record no longer is needed </li></ul></ul></ul><ul><ul><ul><li>Some programs remove record immediately, others flag record </li></ul></ul></ul>
  12. 12. Data and Information (cont.) <ul><li>What is validation? </li></ul><ul><ul><ul><li>Process of comparing data with a set of rules to find out if data is correct </li></ul></ul></ul><ul><ul><ul><li>Reduce data entry errors and enhance data integrity before program writes data on disk </li></ul></ul></ul>
  13. 13. Data and Information (cont.) <ul><li>What are the types of validity checks? </li></ul><ul><ul><ul><li>Consistency Check tests for logical relationship between two or more fields </li></ul></ul></ul><ul><ul><ul><li>Range Check determines whether number is within specified range </li></ul></ul></ul><ul><ul><ul><li>Completeness Check verifies that a required field contains data </li></ul></ul></ul><ul><ul><ul><li>Check Digit number(s) or character(s) appended to or inserted into a primary key value to confirm accuracy of primary key value </li></ul></ul></ul><ul><ul><ul><li>Alphabetic/ Numeric Check ensures correct type of data entered </li></ul></ul></ul>
  14. 14. Data and Information (Cont.) <ul><li>What is a database ? </li></ul>Database software allows you to Collection of data organized so you can access, retrieve, and use it Database software also called database management system (DBMS) Add, change, and delete data Create database Sort and retrieve data Create forms and reports
  15. 15. Purpose of Database Systems <ul><li>What is a database ? </li></ul><ul><ul><ul><li>Many programs and users can share data in database </li></ul></ul></ul><ul><ul><ul><li>Secures data so only authorized users can access certain data </li></ul></ul></ul><ul><li>What are the strengths of the database approach? </li></ul>Reduced data redundancy Improved data integrity Shared data Easier access Reduced development time
  16. 16. Purpose of Database Systems (cont.) <ul><li>Drawbacks of using file systems to store data: </li></ul><ul><ul><li>Data redundancy and inconsistency </li></ul></ul><ul><ul><ul><li>Multiple file formats, duplication of information in different files </li></ul></ul></ul><ul><ul><li>Difficulty in accessing data </li></ul></ul><ul><ul><ul><li>Need to write a new program to carry out each new task </li></ul></ul></ul><ul><ul><li>Data isolation — multiple files and formats </li></ul></ul><ul><ul><li>Integrity problems </li></ul></ul><ul><ul><ul><li>Integrity constraints (e.g. account balance > 0) become “buried” in program code rather than being stated explicitly </li></ul></ul></ul><ul><ul><ul><li>Hard to add new constraints or change existing ones </li></ul></ul></ul>
  17. 17. Purpose of Database Systems (Cont.) <ul><li>Drawbacks of using file systems to store data (cont.) </li></ul><ul><ul><li>Atomicity of updates </li></ul></ul><ul><ul><ul><li>Failures may leave database in an inconsistent state with partial updates carried out </li></ul></ul></ul><ul><ul><ul><li>Example: Transfer of funds from one account to another should either complete or not happen at all </li></ul></ul></ul><ul><ul><li>Concurrent access by multiple users </li></ul></ul><ul><ul><ul><li>Concurrent accessed needed for performance </li></ul></ul></ul><ul><ul><ul><li>Uncontrolled concurrent accesses can lead to inconsistencies </li></ul></ul></ul><ul><ul><ul><ul><li>Example: Two people reading a balance and updating it at the same time </li></ul></ul></ul></ul><ul><ul><li>Security problems </li></ul></ul><ul><ul><ul><li>Hard to provide user access to some, but not all, data </li></ul></ul></ul><ul><li>Database systems offer solutions to all the above problems </li></ul>
  18. 18. Database Management System (DBMS) <ul><li>DBMS contains information about a particular enterprise </li></ul><ul><ul><li>Collection of interrelated data </li></ul></ul><ul><ul><li>Set of programs to access the data </li></ul></ul><ul><ul><li>An environment that is both convenient and efficient to use </li></ul></ul><ul><li>Database Applications: </li></ul><ul><ul><li>Banking: all transactions </li></ul></ul><ul><ul><li>Airlines: reservations, schedules </li></ul></ul><ul><ul><li>Universities: registration, grades </li></ul></ul><ul><ul><li>Sales: customers, products, purchases </li></ul></ul><ul><ul><li>Online retailers: order tracking, customized recommendations </li></ul></ul><ul><ul><li>Manufacturing: production, inventory, orders, supply chain </li></ul></ul><ul><ul><li>Human resources: employee records, salaries, tax deductions </li></ul></ul>
  19. 19. Database Management System (DBMS) (Cont.) <ul><li>Databases touch all aspects of our lives </li></ul><ul><li>DBMS used to maintain, query large datasets </li></ul><ul><li>Benefits include recovery from system crashes, concurrent access, quick application development, data integrity and security </li></ul><ul><li>Levels of abstraction give data independence </li></ul><ul><li>A DBMS typically has a layered architecture </li></ul>
  20. 20. Database Management System (DBMS) (Cont.) <ul><li>A typical DBMS has a layered architecture </li></ul><ul><li>The figure does not show the concurrency control and recovery component </li></ul><ul><li>This is one of the several possible architectures. Each system has its own variations </li></ul>Query Optimization and Execution Relational Operators Files and Access Methods Buffer Management Disk Space Management DB These layers must consider concurrency control and recovery
  21. 21. Database Management System (DBMS) (Cont.) <ul><li>What are popular database management systems (DBMSs)? </li></ul>Personal computer, midrange server, mainframe IBM Corporation DB2 Personal computer, midrange server, mainframe IBM Corporation Informix Server Microsoft Corporation SQL Server Personal computer, midrange server, PDA Sybase Inc. Sybase Personal computer, midrange server, mainframe, PDA Oracle Corporation Oracle Personal computer, midrange server, mainframe Computer Associates International, Inc. Ingres Personal computer, server, PDA Microsoft Corporation Access Computer Type Manufacturer Database
  22. 22. Database Management System (DBMS) (Cont.) <ul><li>What are guidelines for developing a database? </li></ul>1. Determine the purpose of the database 4. Determine the relationships among the tables <ul><ul><li>Design tables on paper first </li></ul></ul><ul><ul><li>Each table should contain data about one subject </li></ul></ul><ul><ul><li>Be sure every record has a unique primary key </li></ul></ul><ul><ul><li>Use separate fields for logically distinct items </li></ul></ul><ul><ul><li>Do not create fields for information that can be derived from entries in other fields </li></ul></ul><ul><ul><li>Allow enough space for each field </li></ul></ul><ul><ul><li>Set default values for frequently entered data </li></ul></ul>3. Design the records and fields for each table 2. Design the tables
  23. 23. End Of Chapter 1

×