0
Database Processing Chapter 5
<ul><li>Q1:  What is the purpose of a database? </li></ul><ul><li>Q2:  What does a database contain? </li></ul><ul><li>Q3:...
<ul><li>Dee selected  Movable Type  application program </li></ul><ul><li>Needs database program to store blog </li></ul><...
<ul><li>Purpose: To organize and keep track of things </li></ul><ul><li>Spreadsheets do that too </li></ul><ul><ul><li>Kee...
<ul><li>A self-describing collection of integrated records </li></ul><ul><li>Hierarchy of data elements </li></ul><ul><ul>...
Student Table (a.k.a., File) 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
<ul><li>Database have multiple tables (one for each theme) </li></ul><ul><li>Values in one table may relate to rows/record...
Example of Relationships  Among Three Tables 5- Figure 5-6
<ul><li>Database is self-describing </li></ul><ul><ul><li>Contains descriptions of its data </li></ul></ul><ul><li>Metadat...
Access Metadata Report 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
<ul><li>Database management system ( DBMS ) </li></ul><ul><ul><li>Program that creates, processes, and administers  databa...
Components of a Database Application System 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
<ul><li>DBMS is used to create tables, relationships in databases </li></ul><ul><li>Applications use a DBMS to read, inser...
Creating the Database and Its Structure 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
<ul><li>DBMS perform four basic operations </li></ul><ul><ul><li>Read data </li></ul></ul><ul><ul><li>Insert data </li></u...
<ul><li>DBMS security features are used to set up user accounts, passwords, permissions, processing limits </li></ul><ul><...
<ul><li>Collection of forms, reports, queries, and application programs that process a database </li></ul><ul><li>Database...
Use of Multiple Database Applications 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
<ul><li>Forms </li></ul><ul><ul><li>Used to read, insert, modify, and delete data </li></ul></ul><ul><li>Reports </li></ul...
<ul><li>Application programs  </li></ul><ul><ul><li>Process logic specific to a business need </li></ul></ul><ul><ul><li>M...
Example of a Query 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Four Application Programs on a Web Server Computer 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
<ul><li>Lost-update problem </li></ul><ul><ul><li>Occurs when an update made by one transaction is lost due to an update m...
<ul><li>Preventing Lost Update problems using: </li></ul><ul><li>Locking  </li></ul><ul><ul><li>Used to ensure that a tran...
<ul><li>Enterprise DBMS </li></ul><ul><ul><li>Processes large organizational and workgroup databases </li></ul></ul><ul><u...
Personal Database System 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
<ul><li>Helps to: </li></ul><ul><li>Know what a DBMS is and what roles it can play </li></ul><ul><li>Understand the diagra...
Role of DBMS for Dee’s Blog 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
<ul><li>“ Take away our customer database,... it would take us 8 years to get back...”  At considerable cost </li></ul><ul...
<ul><li>Kelly was employed maintaining servers and backing up database </li></ul><ul><ul><li>Made unauthorized copy of dat...
<ul><li>Where did Kelly go wrong? </li></ul><ul><li>Was it illegal, unethical, or okay for Kelly to copy the database and ...
<ul><li>Databases take time to build </li></ul><ul><li>Complicated to operate </li></ul><ul><ul><li>May require use of mul...
<ul><li>Q1: What is the purpose of a database? </li></ul><ul><li>Q2: What does a database contain? </li></ul><ul><li>Q3: W...
<ul><li>Q1 What is the purpose of a database? </li></ul><ul><li>State the purpose of a database. Explain the circumstances...
<ul><li>Define the term database. Explain the hierarchy of data and the name three elements of a data-base. Define metadat...
<ul><li>Name and describe the components of a database application. Explain the need for application programs. For multi-u...
<ul><li>Define two broad categories of DBMS and explain their differences. </li></ul>Q5: What is the difference between an...
5- All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in an...
Upcoming SlideShare
Loading in...5
×

Ch. 5 - Database Processing

8,275

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
8,275
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
64
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Ch. 5 - Database Processing"

  1. 1. Database Processing Chapter 5
  2. 2. <ul><li>Q1: What is the purpose of a database? </li></ul><ul><li>Q2: What does a database contain? </li></ul><ul><li>Q3: What is a DBMS and what does it do? </li></ul><ul><li>Q4: What is a database application? </li></ul><ul><li>Q5: What is the difference between an enterprise DBMS and a personal DBMS? </li></ul><ul><li>How does the knowledge in this chapter help Dee and you? </li></ul>Study Questions 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  3. 3. <ul><li>Dee selected Movable Type application program </li></ul><ul><li>Needs database program to store blog </li></ul><ul><ul><li>Consultant suggested MySQL </li></ul></ul><ul><ul><li>Network standardized on Oracle </li></ul></ul><ul><ul><ul><li>May not be able to run Movable Type </li></ul></ul></ul><ul><ul><ul><li>Will require revision of labor estimates </li></ul></ul></ul><ul><ul><li>IT resists installing MySQL </li></ul></ul><ul><li>Watch video </li></ul>This Could Happen to You 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  4. 4. <ul><li>Purpose: To organize and keep track of things </li></ul><ul><li>Spreadsheets do that too </li></ul><ul><ul><li>Keeping lists of only a single theme per worksheet </li></ul></ul><ul><ul><ul><li>Example: Student test scores in a course </li></ul></ul></ul><ul><ul><li>Linking and managing multiple worksheets is a real pain </li></ul></ul><ul><li>Databases </li></ul><ul><ul><li>Keep lists that involve multiple themes </li></ul></ul><ul><ul><li>Examples: Student grades, grades for all courses in a department, courses offered in all departments, faculty records, and so on </li></ul></ul><ul><li>Watch video </li></ul>Q1: What Is the Purpose of a Database? 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  5. 5. <ul><li>A self-describing collection of integrated records </li></ul><ul><li>Hierarchy of data elements </li></ul><ul><ul><li>Bytes /data are grouped into columns/fields </li></ul></ul><ul><ul><li>Columns grouped into rows/records </li></ul></ul><ul><ul><li>Rows are grouped into tables/files </li></ul></ul><ul><li>Collection of tables plus relationships among rows </li></ul><ul><ul><li>Also includes “ metadata ” </li></ul></ul><ul><ul><ul><li>Describes the structure of the database and its data </li></ul></ul></ul><ul><li>A database is a structured collection of records stored in a computer system so that a computer program or person using a query language can consult it to answer queries . </li></ul>Q2: What Does a Database Contain? 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  6. 6. Student Table (a.k.a., File) 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  7. 7. <ul><li>Database have multiple tables (one for each theme) </li></ul><ul><li>Values in one table may relate to rows/records in other tables </li></ul><ul><li>Keys </li></ul><ul><ul><li>A column(s) that identify unique row in table </li></ul></ul><ul><ul><li>Each table has a key </li></ul></ul><ul><li>Foreign keys </li></ul><ul><ul><li>Are keys of a different table than the one in which they reside </li></ul></ul><ul><li>Relational database s </li></ul><ul><ul><li>Databases use tables, keys, and foreign keys to create relationships </li></ul></ul>Relationships Among Records 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  8. 8. Example of Relationships Among Three Tables 5- Figure 5-6
  9. 9. <ul><li>Database is self-describing </li></ul><ul><ul><li>Contains descriptions of its data </li></ul></ul><ul><li>Metadata </li></ul><ul><ul><li>Data that describe data </li></ul></ul><ul><ul><li>Makes databases more useful </li></ul></ul><ul><ul><li>Makes databases easier to use </li></ul></ul><ul><li>Describes data by: </li></ul><ul><ul><li>Data type – text, number, date, etc. </li></ul></ul><ul><ul><li>Field name </li></ul></ul><ul><ul><li>Field properties </li></ul></ul>Metadata 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  10. 10. Access Metadata Report 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  11. 11. <ul><li>Database management system ( DBMS ) </li></ul><ul><ul><li>Program that creates, processes, and administers databases </li></ul></ul><ul><ul><li>Usually licensed from vendors </li></ul></ul><ul><ul><li>Examples: Microsoft Access, Oracle, MySQL, DB2 </li></ul></ul><ul><li>DBMS and database are two different things </li></ul><ul><ul><li>Database is a structured collection of records or data stored in a computer system so a computer program or person using a query language can consult it to answer queries. </li></ul></ul><ul><ul><li>Database management system (DBMS) is a computer program used to manage and query a database </li></ul></ul>Q3: What Is a DBMS and What Does It Do? 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  12. 12. Components of a Database Application System 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  13. 13. <ul><li>DBMS is used to create tables, relationships in databases </li></ul><ul><li>Applications use a DBMS to read, insert, modify, and delete data </li></ul><ul><ul><li>Structured Query Language (SQL) </li></ul></ul><ul><ul><ul><li>International standard language for querying databases </li></ul></ul></ul><ul><ul><ul><li>Allows users to interactively interrogate the database, analyze its data and update it according to the users privileges on data </li></ul></ul></ul><ul><ul><ul><li>Also controls the security of the database </li></ul></ul></ul>Database Management Systems 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  14. 14. Creating the Database and Its Structure 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  15. 15. <ul><li>DBMS perform four basic operations </li></ul><ul><ul><li>Read data </li></ul></ul><ul><ul><li>Insert data </li></ul></ul><ul><ul><li>Modify data </li></ul></ul><ul><ul><li>Delete data </li></ul></ul><ul><li>Structured Query Language (Example) </li></ul><ul><ul><li>INSERT INTO Student </li></ul></ul><ul><ul><li>([Student Number], [Student Name], HW1, HW2, MidTerm) </li></ul></ul><ul><ul><li>VALUES </li></ul></ul><ul><ul><li>(1000, ‘Franklin, Benjamin’, 90, 95, 100) </li></ul></ul>Processing the Database 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  16. 16. <ul><li>DBMS security features are used to set up user accounts, passwords, permissions, processing limits </li></ul><ul><ul><li>Permissions – data access rights for specific users or groups of users </li></ul></ul><ul><li>Database backup and replication, adding structures, removing unneeded data </li></ul>Administering the Database 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  17. 17. <ul><li>Collection of forms, reports, queries, and application programs that process a database </li></ul><ul><li>Databases can have multiple applications </li></ul><ul><li>Applications can have multiple users </li></ul>Q4: What Is a Database Application? 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  18. 18. Use of Multiple Database Applications 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  19. 19. <ul><li>Forms </li></ul><ul><ul><li>Used to read, insert, modify, and delete data </li></ul></ul><ul><li>Reports </li></ul><ul><ul><li>Show data in structured context </li></ul></ul><ul><ul><li>May compute values such as Totals, within a report </li></ul></ul><ul><li>Queries </li></ul><ul><ul><li>Are a means of getting answers from database data </li></ul></ul>Forms, Reports, and Queries 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  20. 20. <ul><li>Application programs </li></ul><ul><ul><li>Process logic specific to a business need </li></ul></ul><ul><ul><li>May enable database processing over Internet to: </li></ul></ul><ul><ul><ul><li>Serve as intermediary between Web server and database </li></ul></ul></ul><ul><ul><ul><li>Respond to events, </li></ul></ul></ul><ul><ul><ul><li>Asks DBMS to read, insert, modify, delete data </li></ul></ul></ul>Database Application Programs 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  21. 21. Example of a Query 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  22. 22. Four Application Programs on a Web Server Computer 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  23. 23. <ul><li>Lost-update problem </li></ul><ul><ul><li>Occurs when an update made by one transaction is lost due to an update made by another transaction. </li></ul></ul><ul><li>Process A reads a customer a record from a file containing account information, including customer's account balance and phone number. </li></ul><ul><li>Process B now reads same record from same file, now B has its own copy . </li></ul><ul><li>Process A changes account balance in its copy of customer record and writes record back to the file. </li></ul><ul><li>Process B—which still has the original value off account balance in its copy of the customer record—updates customer's phone number and writes customer record back to the file. </li></ul><ul><li>Process B has now written the old account balance value to the file, causing the changes made by process A to be written over or lost . </li></ul>Multiuser Processing Considerations 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  24. 24. <ul><li>Preventing Lost Update problems using: </li></ul><ul><li>Locking </li></ul><ul><ul><li>Used to ensure that a transaction does not interfere with any other transaction. Locking prevents the problem of lost update, uncommitted data, and inconsistent data. </li></ul></ul><ul><ul><li>By preventing another user or process to open a record that is currenty being used by another user or process. </li></ul></ul>Multiuser Processing Considerations (cont’d) 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  25. 25. <ul><li>Enterprise DBMS </li></ul><ul><ul><li>Processes large organizational and workgroup databases </li></ul></ul><ul><ul><li>Supports many users (thousands plus) </li></ul></ul><ul><ul><li>Examples: DB2, SQL Server, Oracle, DB2 </li></ul></ul><ul><li>Personal DBMS </li></ul><ul><ul><li>Designed for smaller, simpler database applications </li></ul></ul><ul><ul><li>Supports fewer than 100 users (mostly 1-10 users) </li></ul></ul><ul><ul><li>Examples: Access, dBase, FoxPro, Paradox, R-Base </li></ul></ul>Q5: What Is the Difference Between an Enterprise DBMS and a Personal DBMS? 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  26. 26. Personal Database System 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  27. 27. <ul><li>Helps to: </li></ul><ul><li>Know what a DBMS is and what roles it can play </li></ul><ul><li>Understand the diagram (next slide) about role of the DBMS for her blog </li></ul><ul><ul><li>Note system will be isolated from rest of databases </li></ul></ul><ul><ul><li>Uses MySQL as a functional part of her application </li></ul></ul><ul><li>Explain what she wants, and that it is no threat or exception to Oracle standard </li></ul><ul><li>Maybe avoid hiring a consultant </li></ul><ul><li>Video </li></ul>How Does the Knowledge in This Chapter Help Dee and You? 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  28. 28. Role of DBMS for Dee’s Blog 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  29. 29. <ul><li>“ Take away our customer database,... it would take us 8 years to get back...” At considerable cost </li></ul><ul><li>Database contains everything your customers do </li></ul><ul><li>Business disruption costs? </li></ul><ul><li>Value of “targeted solicitation” </li></ul><ul><ul><li>Political candidates raised $500,000 in a day with accurate targeted solicitation </li></ul></ul><ul><ul><li>mybarackobama.com </li></ul></ul>MIS in Use: How Much Is a Database Worth? 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  30. 30. <ul><li>Kelly was employed maintaining servers and backing up database </li></ul><ul><ul><li>Made unauthorized copy of database to practice with </li></ul></ul><ul><ul><ul><li>Queried SQL Server metadata </li></ul></ul></ul><ul><ul><ul><li>Discovered tables with order data, customers, salespeople </li></ul></ul></ul><ul><ul><ul><li>Uncovered anomalies: one data entry clerk gave discounts to a buyer that no other clerks gave discounts to </li></ul></ul></ul><ul><ul><li>Mentioned it to a clerk </li></ul></ul><ul><ul><li>Was terminated for accessing the database </li></ul></ul>Ethics Guide: Nobody Said I Shouldn’t 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  31. 31. <ul><li>Where did Kelly go wrong? </li></ul><ul><li>Was it illegal, unethical, or okay for Kelly to copy the database and take it home? </li></ul><ul><li>How could Kelly have handled his discovery of anomaly and protected himself? </li></ul><ul><li>Does Kelly have any legal recourse over being fired? </li></ul><ul><li>How can a business protect its databases from unauthorized use or duplication? </li></ul>Ethics Guide: Nobody Said I Shouldn’t (cont’d) 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  32. 32. <ul><li>Databases take time to build </li></ul><ul><li>Complicated to operate </li></ul><ul><ul><li>May require use of multiple applications </li></ul></ul><ul><li>Need IS people to create it and keep it running </li></ul><ul><li>Will share data that you may not want to expose </li></ul><ul><li>Spreadsheets may be a better option in some cases </li></ul><ul><li>Is the car salesman’s arguments against keeping his business data in a database valid? </li></ul><ul><li>Would it be better for his employer if all their salespeople did? </li></ul>Guide: No, Thanks, I’ll Use a Spreadsheet 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  33. 33. <ul><li>Q1: What is the purpose of a database? </li></ul><ul><li>Q2: What does a database contain? </li></ul><ul><li>Q3: What is a DBMS, and what does it do? </li></ul><ul><li>Q4: What is a database application? </li></ul><ul><li>Q5: What is the difference between an </li></ul><ul><li>enterprise DBMS and a personal </li></ul><ul><li>DBMS? </li></ul><ul><li>How does the knowledge in this chapter help Dee and you? </li></ul>Active Review 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  34. 34. <ul><li>Q1 What is the purpose of a database? </li></ul><ul><li>State the purpose of a database. Explain the circumstances in which a database is preferred to a spreadsheet. Describe the key difference between Figures 5-1 and 5-2. </li></ul><ul><li>Define the term database. Explain the hierarchy of data and the name three elements of a data-base. Define metadata. Using the example of Student and Office_Visit tables, show how relationships among rows are represented in a database. Define the terms key, foreign key, and relational database. </li></ul><ul><li>Q2 What does a database contain? </li></ul><ul><li>Explain why a database, by itself, is not very useful to business users. Name the components of a database application system and sketch their relationship. Explain the acronym DBMS and name its functions. List five popular DBMS products. Explain the difference between a DBMS and a database. Summarize the functions of a DBMS. Define SQL. Describe the major functions of database administration. </li></ul>ACTIVE REVIEW 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  35. 35. <ul><li>Define the term database. Explain the hierarchy of data and the name three elements of a data-base. Define metadata. Using the example of Student and Office_Visit tables, show how relationships among rows are represented in a database. Define the terms key, foreign key, and relational database. </li></ul>Q3. What is a DBMS, and what does it do ? 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  36. 36. <ul><li>Name and describe the components of a database application. Explain the need for application programs. For multi-user processing, describe one way in which one user’s work can interfere with another’s. Explain why multi-user database processing involves more than just connecting another computer to the network. </li></ul>Q4: What is a database application? 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  37. 37. <ul><li>Define two broad categories of DBMS and explain their differences. </li></ul>Q5: What is the difference between an enterprise DBMS and a personal DBMS? 5- Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
  38. 38. 5- All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Copyright © 2010 Pearson Education, Inc.   Publishing as Prentice Hall
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×