Your SlideShare is downloading. ×
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Chapter 1
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Chapter 1

1,412

Published on

PB204 Database Application Jabatan Perdagangan Politeknik Seberang Perai

PB204 Database Application Jabatan Perdagangan Politeknik Seberang Perai

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

No Downloads
Views
Total Views
1,412
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
25
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. PB204 Jabatan Perdagangan POLITEKNIK SEBERANG PERAI DATABASE APPLICATION
  • 2. INTRODUCTION TO DATABASE SYSTEM 1.0
  • 3. Concept of Database System
    • How are data and information related?
      • Data is raw facts
      • Information is data that is organized and meaningful
      • Computers process data into information
    • What is data integrity?
        • Degree to which data is correct
            • Garbage in, garbage out (GIGO) —computer phrase that
            • means you cannot create correct information from
            • incorrect data
    Garbage in Garbage out Data integrity is lost
  • 4. Data and Information
    • What are the qualities of valuable information?
    Useful Accessible Organized Timely Verifiable Accurate Cost-effective
  • 5. Data and Information (cont.)
    • The Hierarchy of Data
      • Database contains files, file contains records, record
      • contains fields, field contains characters
    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. Data and Information (cont.)
    • What is a field?
        • Combination of one or more characters
        • Smallest unit of data user accesses
          • Field size defines the maximum number of characters a field can contain
          • Field name uniquely identifies each field
          • Data type specifies kind of data field contains
    Students class file Data types Matric No Text Name Text Date Of Birth text
  • 7. Data and Information (cont.)
    • What are common data types?
    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. Data and Information (cont.)
    • What is a record?
    Group of related fields Key field , or primary key , uniquely identifies each record
  • 9. Data and Information (cont.)
    • What is a data file?
        • Collection of related records stored on disk
    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. Data and Information (cont.)
    • What is file maintenance?
        • Procedures that keep data current
        • Changing records
        • Adding records
        • Deleting records
  • 11. Data and Information (cont.)
    • Why do you add records?
        • Add new record when you obtain new data
    • Why do you change records?
        • Correct inaccurate data
        • Update old data
    • Why do you delete records?
        • When record no longer is needed
        • Some programs remove record immediately, others flag record
  • 12. Data and Information (cont.)
    • What is validation?
        • Process of comparing data with a set of rules to find out if data is correct
        • Reduce data entry errors and enhance data integrity before program writes data on disk
  • 13. Data and Information (cont.)
    • What are the types of validity checks?
        • Consistency Check tests for logical relationship between two or more fields
        • Range Check determines whether number is within specified range
        • Completeness Check verifies that a required field contains data
        • Check Digit number(s) or character(s) appended to or inserted into a primary key value to confirm accuracy of primary key value
        • Alphabetic/ Numeric Check ensures correct type of data entered
  • 14. Data and Information (Cont.)
    • What is a database ?
    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. Purpose of Database Systems
    • What is a database ?
        • Many programs and users can share data in database
        • Secures data so only authorized users can access certain data
    • What are the strengths of the database approach?
    Reduced data redundancy Improved data integrity Shared data Easier access Reduced development time
  • 16. Purpose of Database Systems (cont.)
    • Drawbacks of using file systems to store data:
      • Data redundancy and inconsistency
        • Multiple file formats, duplication of information in different files
      • Difficulty in accessing data
        • Need to write a new program to carry out each new task
      • Data isolation — multiple files and formats
      • Integrity problems
        • Integrity constraints (e.g. account balance > 0) become “buried” in program code rather than being stated explicitly
        • Hard to add new constraints or change existing ones
  • 17. Purpose of Database Systems (Cont.)
    • Drawbacks of using file systems to store data (cont.)
      • Atomicity of updates
        • Failures may leave database in an inconsistent state with partial updates carried out
        • Example: Transfer of funds from one account to another should either complete or not happen at all
      • Concurrent access by multiple users
        • Concurrent accessed needed for performance
        • Uncontrolled concurrent accesses can lead to inconsistencies
          • Example: Two people reading a balance and updating it at the same time
      • Security problems
        • Hard to provide user access to some, but not all, data
    • Database systems offer solutions to all the above problems
  • 18. Database Management System (DBMS)
    • DBMS contains information about a particular enterprise
      • Collection of interrelated data
      • Set of programs to access the data
      • An environment that is both convenient and efficient to use
    • Database Applications:
      • Banking: all transactions
      • Airlines: reservations, schedules
      • Universities: registration, grades
      • Sales: customers, products, purchases
      • Online retailers: order tracking, customized recommendations
      • Manufacturing: production, inventory, orders, supply chain
      • Human resources: employee records, salaries, tax deductions
  • 19. Database Management System (DBMS) (Cont.)
    • Databases touch all aspects of our lives
    • DBMS used to maintain, query large datasets
    • Benefits include recovery from system crashes, concurrent access, quick application development, data integrity and security
    • Levels of abstraction give data independence
    • A DBMS typically has a layered architecture
  • 20. Database Management System (DBMS) (Cont.)
    • A typical DBMS has a layered architecture
    • The figure does not show the concurrency control and recovery component
    • This is one of the several possible architectures. Each system has its own variations
    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. Database Management System (DBMS) (Cont.)
    • What are popular database management systems (DBMSs)?
    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. Database Management System (DBMS) (Cont.)
    • What are guidelines for developing a database?
    1. Determine the purpose of the database 4. Determine the relationships among the tables
      • Design tables on paper first
      • Each table should contain data about one subject
      • Be sure every record has a unique primary key
      • Use separate fields for logically distinct items
      • Do not create fields for information that can be derived from entries in other fields
      • Allow enough space for each field
      • Set default values for frequently entered data
    3. Design the records and fields for each table 2. Design the tables
  • 23. End Of Chapter 1

×