Download
discovering computers n.
Skip this Video
Loading SlideShow in 5 Seconds..
Discovering Computers PowerPoint Presentation
Download Presentation
Discovering Computers

Discovering Computers

191 Views Download Presentation
Download Presentation

Discovering Computers

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Discovering Computers CHAPTER 10 DATABASE MANAGEMENT

  2. Chapter 10 Database Management Next Discuss the functions common to most DBMSs Identify the qualities of valuable information Explain why data is important to an organization Describe characteristics of relational, object-oriented, and multidimensional databases Discuss the terms bit, byte, character, field, record, file, database Explain how Web databases work Identify file maintenance techniques Discuss the responsibilities of database analysts and administrators Differentiate between a file processing system approach and the database approach

  3. Data and Information Next How are data and information related? • Data is raw facts • Information is data that is organizedand meaningful Step 2. The computer extracts the member data from disk. • Computers process data into information receipt processing Step 1. The member data, including a photograph, is entered and stored on the hard disk. data stored on disk Step 3. The receipt is created and printed. p. 10.02 Fig. 10-1

  4. Data and Information Createdatabase Createforms, reports, queries Add, change, and delete data Sort and retrieve data What is a database? Collection of data organized so you can access, retrieve, and use it Database softwareallows you to Database software also called database management system (DBMS) p. 10.03

  5. Database Schema

  6. Database Terminology http://www.geekgirls.com/database_dictionary.htm Data Dictionary Example http://2007.ispace.ci.fsu.edu/~bce05c/ir/images/datadictionary.jpg

  7. Data and Information Next What is data integrity? Garbage in • Degree to which data is correct • Garbage in, garbage out (GIGO)—computer phrase that means you cannot create correct information from incorrect data Garbage out Data integrity is lost p. 10.03

  8. Data and Information Next What are the qualities of valuable information? Accurate Verifiable Timely Organized Accessible Useful Cost-effective p. 10.04

  9. The Hierarchy of Data What is the hierarchy of data ? • Bit - Most elemental unit of data ( 0 or 1) • Byte – 8 bits make up a byte e.g. 11001001 • Character – Another name for a byte • Note: A Unicode character is 2 bytes (16 bits) • Example: The letter ‘A’ is \u0041 in Unicode • Field – a group of related characters • Record – a group of related fields • File – a group of related records • Database – One or more files p. 10.05 Fig. 10-2

  10. The Hierarchy of Data Next What is a data hierarchy? • Database contains files, file contains records, record contains fields, field contains characters p. 10.05 Fig. 10-2

  11. The Hierarchy of Data: Fields Next What is a field? • Combination of one or more characters • Smallest unit of data user accesses • Field sizedefines the maximum number of characters a field can contain • Field name uniquely identifies each field • Data type specifies kind of data field contains p. 10.05 Fig. 10-3

  12. Common Data Types Text (also called alphanumeric)—letters, numbers, or special characters Numeric numbers only AutoNumber unique number automatically assigned to each new record Currency dollar and cent amounts or numbers containing decimal values Date month, day, year, and sometimes time Memo lengthy text entries Yes/No (also called BLOB for binary large object)—photograph, audio, video, or document created in other application such as word processing or spreadsheet 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 Next What are common data types? p. 10.06

  13. Database Record & Primary Keys Next What is a record? (a group of related fields) Group of related fields Key field, or primary key, uniquely identifies each record p. 10.06

  14. What is a record? A group of related fields The Hierarchy of Data field names maximum characters in Rating field records key fieldA field that uniquely identifies each record in a file Also called a primary key Next p. 13.5 Fig. 13-2

  15. What is a data file? Also called a file (a table in relational databases such as MS-Access) A collection of related records stored on a disk Each record in the file contains the same fields Each field contains different data The Hierarchy of Data: Data File fields Next records Sample Customer File p. 13.5 Fig. 13-3

  16. The Hierarchy of Data: Data File or Table Member ID First Name Last Name Address City State 2295 Donna Vandenberg 1029 Wolf Avenue Montgomery AL 2928 Shannon Murray 33099 Clark Street Montgomery AL 3376 Adrian Valesquez 15 Duluth Street Prattville AL 3928 Jonah Weinberg P.O. Box 45 Clanton AL 4872 Marcus Green 22 Fifth Avenue Auburn AL records key field fields Next What is a data file? • Collection of related records stored on disk p. 10.07

  17. Maintaining Data: File Maintenance Adding records Changing records Deleting records Next What is file maintenance? • Procedures that keep data current • Add, change and delete data (A, C & D ) p. 10.08

  18. Maintaining Data: Adding Records Next Why do you add records? • Add new record when you obtain new data p. 10.08 Fig. 10-5

  19. Maintaining Data: Changing Records Next Why do you change records? • Correct inaccurate data • Update old data p. 10.09 Fig. 10-6

  20. Maintaining Data: Deleting Records Next Why do you delete records? • When record no longer is needed • Some programs remove record immediately, others flag record p. 10.10 Fig. 10-7

  21. How is data deleted? The clerk starts the Customer Maintenance program The clerk displays the customer record on the screen The clerk confirms the correct customer record displays The clerk clicks the Delete Record button Maintaining Data A record can be flagged, or marked, so the program will not process it again Next p. 13.8 Fig. 13-6

  22. Maintaining Data: Validation SAMPLE VALID AND INVALID DATA Validity Check Field Being Checked Valid Data Invalid Data Alphabetic Check First Name Jonathan Jon77than NumericCheck Postal Code 22192 22APD Range Check Max Fee $39.95 $69.50 Consistency Check Date HiredBirth Date 10-20-200711-27-1987 12-15-197911-27-2009 Completeness Check Last Name Montoya (missing) 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 p. 10.10 Fig. 10-8

  23. What are the types of validity checks? Maintaining Data: Validity Checks Alphabetic check Ensures that you enter only alphabetic data into a field Numeric check Ensures that you enter only numeric data into a field Completeness check Verifies a required field contains data Consistency check Tests if the data in two or more associated fields is logical Range check Determines whether a number is within a specified range Check digit Confirms the accuracy of a primary key value Next p. 13.9

  24. What is an example of a completeness check? If you do not fill in a required field, an error message usually displays stating which required fields you left blank Maintaining Data: Completeness Check Next p. 13.10 Fig. 13-8

  25. A number(s) or character(s) that is appended to or inserted into a primary key value Used to confirm the accuracy of a primary key value When the primary key is entered, the program applies the check digit formula to determine if the primary key is valid What is a check digit? Maintaining Data: Check Digits Initial primary key: 13679 Calculate total of digits: 1 + 3 + 6 + 7 + 9 = 26 Calculate total of digits again: 2 + 6 = 8 Check digit = 8 Resulting primary key: 136798 Next p. 13.10

  26. Summing Digits in a Number public static int sumDigits(long num ) // Method in Java program code { int temp = (int)Math.abs(num); int sum = 0; while (temp != 0) { int remainder = temp%10; // Use modulus or remainder operator sum += remainder; temp = temp/10; } return sum; } // End of method sumDigits

  27. What is a file processing system? Each department or area within an organization has its own set of files Records in one file often do not relate to the records in any other file File Processing .vs. Databases Next p. 13.11 Fig. 13-9

  28. What are the weaknesses of a file processing system? File Processing .vs. Databases Data redundancy The files often store the same fields in multiple files Wastes resources such as storage space and people’s time Requires a larger storage capacity Compromises data integrity Isolated data It is often difficult to access data stored in many files across several departments Sharing data from multiple, separate files is often a complicated procedure Next p. 13.11

  29. File Processing versus Databases Next What is the database approach (at Gold’s Gym) ? • Many programs and users can share data in database • Secures data so only authorized users can access certain data p. 10.12 Fig. 10-9

  30. What is the database approach? Many programs and users can share the data in the database Secures the data so only authorized users can access certain data items File Processing versus Databases Back end The application that supports the front end Front end A program that typically has a more user-friendly interface than the DBMS Next p. 13.12 Fig. 13-10

  31. What are the strengths of the database approach? File Processing versus Databases Reduced data redundancy Improved data integrity Shared data Reduced development time Easier Access Next p. 13.13

  32. How do a database application and a file processing application differ in the way they might store data? File Processing versus Databases File processing example Database Example Next p. 13.13 Fig. 13-11

  33. Blockbuster Video: Bankruptcy • We all knew it was inevitable, but the news that Blockbuster has filed for chapter 11 bankruptcy protection still feels like the bittersweet end of an era. The company did attempt to implement some changes to keep pace with shifting media platforms and market demands. They eliminated late fees, and developed an online/mail in service to compliment their brick and mortar stores in an attempt to compete with Netflix. The changes were, unfortunately, a case of too little too late.

  34. File Processing versus Databases Next How do a database application and a file processing application differ in the way they store data? File Processing Example Database Example p. 10.13 Fig. 10-10

  35. Database Relationships in MS-Access

  36. Database Relationships in MS-Access

  37. DBMS: Software that allows you to create, access, and manage a database Available for many sizes and types of computers (See below) Other Data Base Management Systems: Various Database Management Systems Next p. 13.14 Fig. 13-12

  38. DBMS: Data Dictionary Next What is a data dictionary? • Contains data about each file in database and each field within those files (Sometimes called “metadata” or data about data) p. 10.14 Fig. 10-12

  39. What is a default value for a field? A value that the DBMS initially displays in a field Data dictionary allows you to specify a default value for a field DBMS: Default Values Fields Next p. 13.15

  40. DBMS Queries Next Step 1. Select the fields you want to display in the resulting query. What is a query? • Request for specific data from a database • Query language consists of simple, English-like statements that allow users to specify data to display, print, or store Step 2. Assign a name to the query, so you can open it later. Step 3. View query on the screen. p. 10.16 Fig. 10-13

  41. MS-Access Database Queries

  42. Cross Table (CrossTab) Query

  43. Access Database Split Form

  44. Access Filter Query (MS-Access 2007)

  45. Database Report (MS-Access 2007)

  46. Database Management Systems: QBE Next What is a query by example (QBE)? (Filter by Form) • Program retrieves records that match criteria entered in form fields • Has a graphical user interface that assists users with retrieving data Query by example screen criteria Query results p. 10.17 Fig. 10-14

  47. Database Management Systems: Forms Next What is a form? • Window on screen that provides areas for entering or changing data in database • Used to retrieve and maintain data in a database • Form that sends data across network or Internet is called e-form, short for electronic form p. 10.17 Fig. 10-15

  48. Database Management Systems: Reports Next What is a report generator? • Allows user to design a report on screen, retrieve data into report design, then display or print reports • Also called report writer p. 10.18 Fig. 10-16

  49. Database Management Systems: Security Next What is data security? Access privileges define activities that specific user or group of users can perform DBMS provides means to ensure only authorized users can access data Read-only privileges user can view data, but cannot change it Full-update privileges user can view and change data p. 10.18

  50. Database Management Systems: Backups Next What are backup and log? before image • Backup is a copy of the entire database • Log is a listing of activities that change database contents • DBMS places three items in the log: • Before image • Actual change • After image change after image p. 10.19 Fig. 10-17