• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Ch. 5 - Database Processing
 

Ch. 5 - Database Processing

on

  • 8,343 views

 

Statistics

Views

Total Views
8,343
Views on SlideShare
8,343
Embed Views
0

Actions

Likes
0
Downloads
56
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Ch. 5 - Database Processing Ch. 5 - Database Processing Presentation Transcript

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