Tutorial 10


Published on

1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Tutorial 10

  1. 1. Chapter 10 Database Management
  2. 2. Chapter 10 Objectives Discuss the functions common to most DBMSs Identify the qualities of valuable information Explain why data is important to an organization Discuss the terms character, field, record, and file Identify file maintenance techniques Differentiate between a file processing system approach and the database approach Describe characteristics of relational, object-oriented, and multidimensional databases Explain how Web databases work Discuss the responsibilities of database analysts and administrators Next
  3. 3. Data and Information <ul><li>How are data and information related? </li></ul>p. 10.02 Fig. 10-1 processing data stored on disk Step 1. The member data, including a photograph, is entered and stored on the hard disk. Step 2. The computer extracts the member data from disk. Step 3. The receipt is created and printed. <ul><li>Data is raw facts </li></ul><ul><li>Information is data that is organized and meaningful </li></ul>receipt <ul><li>Computers process data into information </li></ul>Next
  4. 4. Data and Information <ul><li>What is a database ? </li></ul>p. 10.03 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 Next Click to view animation
  5. 5. Data and Information <ul><li>What is data integrity ? </li></ul>p. 10.03 <ul><ul><li>Degree to which data is correct </li></ul></ul><ul><ul><ul><li>Garbage in, garbage out (GIGO) —computer phrase that means you cannot create correct information from incorrect data </li></ul></ul></ul>Garbage out Garbage in Data integrity is lost Next
  6. 6. Data and Information <ul><li>What are the qualities of valuable information? </li></ul>Useful Accessible Organized p. 10.04 Timely Verifiable Accurate Cost-effective Next
  7. 7. The Hierarchy of Data <ul><li>What is a hierarchy ? </li></ul>p. 10.05 Fig. 10-2 <ul><ul><li>Database contains files, file contains records, record contains fields, field contains characters </li></ul></ul>Next
  8. 8. The Hierarchy of Data <ul><li>What is a field ? </li></ul>p. 10.05 Fig. 10-3 <ul><ul><li>Combination of one or more characters </li></ul></ul><ul><ul><li>Smallest unit of data user accesses </li></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><li>Field name uniquely identifies each field </li></ul></ul></ul><ul><ul><ul><li>Data type specifies kind of data field contains </li></ul></ul></ul>Next
  9. 9. The Hierarchy of Data <ul><li>What are common data types? </li></ul>p. 10.06 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 Yes/No (also called BLOB for binary large object)—photograph, audio, video, or document created in other application such as word processing or spreadsheet Next 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
  10. 10. The Hierarchy of Data <ul><li>What is a record ? </li></ul>p. 10.06 Group of related fields Key field , or primary key , uniquely identifies each record Next
  11. 11. The Hierarchy of Data <ul><li>What is a data file ? </li></ul>p. 10.07 <ul><ul><li>Collection of related records stored on disk </li></ul></ul>Next key field records fields 22 Fifth Avenue P.O. Box 45 15 Duluth Street 33099 Clark Street 1029 Wolf Avenue Address Auburn Clanton Prattville Montgomery Montgomery City AL Weinberg Jonah 3928 AL Marcus 4872 AL Valesquez Adrian 3376 AL Murray Shannon 2928 AL Vandenberg Donna 2295 State Last Name First Name Member ID Green
  12. 12. Maintaining Data <ul><li>What is file maintenance ? </li></ul>p. 10.08 <ul><ul><li>Procedures that keep data current </li></ul></ul>Next <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>
  13. 13. Maintaining Data <ul><li>Why do you add records? </li></ul>p. 10.08 Fig. 10-5 <ul><ul><li>Add new record when you obtain new data </li></ul></ul>Next
  14. 14. Maintaining Data <ul><li>Why do you change records? </li></ul>p. 10.09 Fig. 10-6 <ul><ul><li>Correct inaccurate data </li></ul></ul><ul><ul><li>Update old data </li></ul></ul>Next
  15. 15. Maintaining Data <ul><li>Why do you delete records? </li></ul>p. 10.10 Fig. 10-7 <ul><ul><li>When record no longer is needed </li></ul></ul><ul><ul><li>Some programs remove record immediately, others flag record </li></ul></ul>Next
  16. 16. Maintaining Data <ul><li>What is validation ? </li></ul>p. 10.10 Fig. 10-8 <ul><ul><li>Process of comparing data with a set of rules to find out if data is correct </li></ul></ul><ul><ul><li>Reduce data entry errors and enhance data integrity before program writes data on disk </li></ul></ul>Next SAMPLE VALID AND INVALID DATA 10-20-2004 10-13-2004 10-20-2004 10-27-2004 Date Joined Training Date Consistency Check Valesquez Last Name Completeness Check $95.25 $39.50 Monthly Fee Range Check 3rto9 36109 Postal Code Numeric Check Ad33n Adrian First Name Alphabetic Check Invalid Data Valid Data Field Being Checked Validity Check
  17. 17. Maintaining Data <ul><li>What are the types of validity checks ? </li></ul>p. 10.11 <ul><ul><ul><li>Consistency Check tests for logical relationship between two or more fields </li></ul></ul></ul>Next Click to view Web Link, then click Check Digits below Chapter 10 <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>
  18. 18. File Processing Versus Databases <ul><li>What is a file processing system ? </li></ul>p. 10.11 Each department or area within organization has own set of files May have weaknesses Records in one file may not relate to records in any other file Isolated data —data stored in separate files so it is difficult to access Next Data redundancy —same fields stored in multiple files
  19. 19. File Processing Versus Databases <ul><li>What is the database approach ? </li></ul>p. 10.12 Fig. 10-9 <ul><ul><li>Many programs and users can share data in database </li></ul></ul><ul><ul><li>Secures data so only authorized users can access certain data </li></ul></ul>Next
  20. 20. File Processing Versus Databases <ul><li>What are the strengths of the database approach? </li></ul>p. 10.13 Reduced data redundancy Improved data integrity Shared data Easier access Reduced development time Next
  21. 21. File Processing Versus Databases <ul><li>How do a database application and a file processing application differ in the way they store data? </li></ul>p. 10.13 Fig. 10-10 File Processing Example Database Example Next
  22. 22. Database Management Systems <ul><li>What are popular database management systems (DBMSs)? </li></ul>p. 10.14 Next Click to view Web Link, then click Database Management System below Chapter 10 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
  23. 23. Database Management Systems <ul><li>What is a data dictionary ? </li></ul>p. 10.14 Fig. 10-12 <ul><ul><li>Contains data about each file in database and each field within those files </li></ul></ul>Next Click to view Web Link, then click Data Dictionary below Chapter 10
  24. 24. Database Management Systems <ul><li>What is a query ? </li></ul>p. 10.16 Fig. 10-13 <ul><ul><li>Request for specific data from a database </li></ul></ul><ul><ul><li>Query language consists of simple, English-like statements that allow users to specify data to display, print, or store </li></ul></ul>Step 1. Select the fields you want to display in the resulting query. Step 2. Assign a name to the query, so you can open it later. Step 3. View query on the screen. Next
  25. 25. Database Management Systems <ul><li>What is a query by example (QBE) ? </li></ul>p. 10.17 Fig. 10-14 <ul><ul><li>Program retrieves records that match criteria entered in form fields </li></ul></ul>Query by example screen criteria Query results <ul><ul><li>Has a graphical user interface that assists users with retrieving data </li></ul></ul>Next
  26. 26. Database Management Systems <ul><li>What is a form ? </li></ul>p. 10.17 Fig. 10-15 <ul><ul><li>Window on screen that provides areas for entering or changing data in database </li></ul></ul><ul><ul><li>Used to retrieve and maintain data in a database </li></ul></ul><ul><ul><li>Form that sends data across network or Internet is called e-form , short for electronic form </li></ul></ul>Next
  27. 27. Database Management Systems <ul><li>What is a report generator ? </li></ul>p. 10.18 Fig. 10-16 <ul><ul><li>Allows user to design a report on screen, retrieve data into report design, then display or print reports </li></ul></ul><ul><ul><li>Also called report writer </li></ul></ul>Next
  28. 28. Database Management Systems <ul><li>What is data security ? </li></ul>p. 10.18 Read-only privileges user can view data, but cannot change it DBMS provides means to ensure only authorized users can access data Access privileges define activities that specific user or group of users can perform Full-update privileges user can view and change data Next
  29. 29. Database Management Systems <ul><li>What are backup and log ? </li></ul>p. 10.19 Fig. 10-17 <ul><ul><li>Backup is a copy of the entire database </li></ul></ul><ul><ul><li>Log is a listing of activities that change database contents </li></ul></ul><ul><ul><ul><li>DBMS places three items in log: before image, actual change, and after image </li></ul></ul></ul>before image change after image Next
  30. 30. Database Management Systems <ul><li>What is a recovery utility ? </li></ul>p. 10.20 <ul><li>Rollforward — DBMS uses log to re-enter changes made to data-base since last save or backup </li></ul><ul><ul><li>Also called forward recovery </li></ul></ul><ul><li>Rollback — DBMS uses log to undo any changes made to database during a certain period of time </li></ul><ul><ul><li>Also called backward recovery </li></ul></ul>Next Click to view Web Link, then click Backup and Recovery below Chapter 10 Uses logs and/or backups to restore database when it is damaged or destroyed
  31. 31. Relational, Object-Oriented, and Multidimensional Databases <ul><li>What is a data model ? </li></ul>p. 10.20 Fig. 10-18 <ul><ul><li>Rules and standards that define how database organizes data </li></ul></ul><ul><ul><li>Defines how users view organization of data </li></ul></ul><ul><ul><li>Three popular data models </li></ul></ul><ul><ul><ul><li>Relational </li></ul></ul></ul><ul><ul><ul><li>Object-oriented </li></ul></ul></ul><ul><ul><ul><li>Multidimensional </li></ul></ul></ul>DATA MODELS FOR POPULAR DBMSs Next
  32. 32. Relational, Object-Oriented, and Multidimensional Databases <ul><li>What is a relational database ? </li></ul>p. 10.20 Fig. 10-19 <ul><ul><li>Stores data in tables that consist of rows and columns </li></ul></ul><ul><ul><ul><li>Each row has primary key </li></ul></ul></ul><ul><ul><ul><li>Each column has unique name </li></ul></ul></ul><ul><ul><li>Stores data relationships </li></ul></ul><ul><ul><li>Uses specialized terminology </li></ul></ul>DATA TERMINOLOGY Next Click to view Web Link, then click Relational Databases below Chapter 10
  33. 33. Relational, Object-Oriented, and Multidimensional Databases <ul><li>What is a relationship ? </li></ul>p. 10.21 Fig. 10-20 <ul><ul><li>Connection within data </li></ul></ul>Next Click to view animation
  34. 34. Relational, Object-Oriented, and Multidimensional Databases <ul><li>What is Structured Query Language (SQL) ? </li></ul>p. 10.22 Fig. 10-21 <ul><ul><li>Allows you to manage, update, and retrieve data </li></ul></ul><ul><ul><li>Has special keywords and rules included in SQL statements </li></ul></ul>SQL statement SQL statement results Next Click to view Web Link, then click SQL below Chapter 10
  35. 35. Relational, Object-Oriented, and Multidimensional Databases <ul><li>What is an object-oriented database (OODB) ? </li></ul>p. 10.22 Object is item that contains data, as well as actions that read or process data <ul><ul><li>Can store more types of data </li></ul></ul><ul><ul><li>Can access data faster </li></ul></ul>Next Click to view Web Link, then click Object-Oriented Databases below Chapter 10 Advantages Often uses object query language (OQL) Stores data in objects
  36. 36. Relational, Object-Oriented, and Multidimensional Databases <ul><li>What are examples of applications appropriate for an object-oriented database? </li></ul>p. 10.22 Next Multimedia databases Store images, audio clips, and/or video clips Groupware databases Store documents such as schedules, calendars, manuals, memos, and reports Computer-aided design (CAD) databases Store data about engineering, architectural, and scientific designs Hypertext databases Contain text links to other documents Hypermedia databases Contain text, graphics, video, and sound Web databases Link to e-form on Web page
  37. 37. <ul><li>What is a multidimensional database ? </li></ul>Relational, Object-Oriented, and Multidimensional Databases p. 10.23 Next Click to view Web Link, then click Multidimensional Databases below Chapter 10 Stores data in dimensions Multiple dimensions, also called hypercube , allow users to analyze any view of data Can consolidate data much faster than relational database
  38. 38. Relational, Object-Oriented, and Multidimensional Databases <ul><li>What is a data warehouse ? </li></ul>p. 10.24 Next Click to view Web Link, then click Data Warehouses below Chapter 10 <ul><ul><ul><li>Data mart is smaller version of data warehouse </li></ul></ul></ul><ul><ul><ul><li>Uses multidimensional databases </li></ul></ul></ul><ul><ul><ul><li>Often uses a process called data mining to find patterns and relationships among data </li></ul></ul></ul><ul><ul><ul><li>Huge database system that stores and manages data required to analyze historical and current transactions </li></ul></ul></ul><ul><ul><ul><li>Quick and efficient way to access large amounts of data </li></ul></ul></ul>
  39. 39. Web Databases <ul><li>What is a Web database ? </li></ul>p. 10.24 Fig. 10-23 <ul><ul><li>Database you access through the Web by filling in a form on a Web page </li></ul></ul><ul><ul><li>Usually resides on a database server , a computer that stores and provides access to a database </li></ul></ul>Next Click to view video
  40. 40. Web Databases <ul><li>How might a search engine interact with a Web database? </li></ul>p. 10.25 Fig. 10-24 Step 1. Browser sends search text to Web server. Step 2. Web server sends search text through a CGI script to database. Database retrieves list of hits that contains search text and sends it through CGI script back to Web server. Step 3. Web server sends list of hits to browser. Next Click to view video
  41. 41. Database Administration <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>p. 10.26 <ul><ul><li>Be sure every field 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 fields for each table 2. Design the tables Next
  42. 42. Database Administration <ul><li>What is the role of the database analyst and administrator? </li></ul>p. 10.27 <ul><li>Focuses on meaning and usage of data </li></ul><ul><li>Decides proper placement of fields, defines relationships, and identifies users’ access privileges </li></ul><ul><li>Creates and maintains data dictionary, manages database security, monitors database performance, and checks backup and recovery procedures </li></ul>Next Click to view Web Link, then click Database Administrators below Chapter 10 Database analyst (DA) Database administrator (DBA)
  43. 43. Summary of Database Management Chapter 10 Complete How data and information are valuable assets to an organization Methods for maintaining high-quality data Assessing the quality of valuable information Advantages of organizing data in a database Various types of databases Role of the database analysts and administrators