Ch 5 Power Point Presentation

1,571 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
1,571
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
35
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Ch 5 Power Point Presentation

  1. 1. David Kroenke 09/22 – 4:30AM Using MIS 2e Chapter 5 Database Processing
  2. 2. Study Questions <ul><li>Q1 – What is the purpose of a database? </li></ul><ul><li>Q2 – What is a database? </li></ul><ul><li>Q3 – What are the components of a database application system? </li></ul><ul><li>Q4 – How do database applications make databases more useful? </li></ul><ul><li>Q5 – How are data models used for database development? </li></ul><ul><li>Q6 – How is a data model transformed into a database design? </li></ul><ul><li>Q7 – What is the user’s role in the development of databases? </li></ul><ul><li>Q8 – What are the responsibilities for database administration? </li></ul>
  3. 3. <ul><li>Q1 – What is the purpose of a database? </li></ul><ul><li>Q2 – What is a database? </li></ul><ul><li>Q3 – What are the components of a database application system? </li></ul><ul><li>Q4 – How do database applications make databases more useful? </li></ul><ul><li>Q5 – How are data models used for database development? </li></ul><ul><li>Q6 – How is a data model transformed into a database design? </li></ul><ul><li>Q7 – What is the user’s role in the development of databases? </li></ul><ul><li>Q8 – What are the responsibilities for database administration? </li></ul>
  4. 4. Q1 – What is the purpose of a database? <ul><li>No database designer knows the users’ needs ahead of time, so finding out what they need is the essential first step. </li></ul><ul><li>Database development is a collaborative process (iteration and feedback. You begin by asking users about their needs and building a prototype. Then you iteratively get feedback on the prototype, integrate the feedback into a new prototype, and get feedback again until the prototype is just right for the user. </li></ul><ul><li>Users cannot describe exactly what they want when you begin. They need to see something, relate it to their work, and then they respond with changes. You need to patiently ask, prototype, and check to uncover the true requirements. </li></ul><ul><li>The iterative process is essential. Users need to commit to it and to fully engage with the developers. </li></ul>
  5. 5. Q1 – What is the purpose of a database? <ul><li>If a developer says they will deliver a solution without first demonstrating an understanding of what is required (a prototype), get another developer . </li></ul><ul><li>An iterative process that shows small successes early in the process and builds from there is an excellent approach. </li></ul><ul><li>Take the time to collaborate with the developer . Do not be a slave to a schedule that was set in the beginning, when you knew the least about the problem. Do not let schedules force omissions and compromises that will hurt the project later. </li></ul><ul><li>Focus on producing useful results that users want . </li></ul><ul><li>As a database user, you play a crucial role in developing database applications for your business or organization. </li></ul>
  6. 6. Q1 – What is the purpose of a database? <ul><li>Think of a file as a list of records (like a single spreadsheet) with the same format about some entity. Think of a database as a collection of logically related lists (or spreadsheets). </li></ul><ul><li>Spreadsheets are good for tracking items with just one list (as shown below) versus a database that tracks things involving more than one list (as shown on the next slide). </li></ul>Fig 5-1 List of Student Grades, Presented in a Spreadsheet
  7. 7. Q1 – What is the purpose of a database? <ul><li>Fig 5-2 Student Data Shown in a Form, from a Database </li></ul>Different lists One database
  8. 8. <ul><li>Q1 – What is the purpose of a database? </li></ul><ul><li>Q2 – What is a database? </li></ul><ul><li>Q3 – What are the components of a database application system? </li></ul><ul><li>Q4 – How do database applications make databases more useful? </li></ul><ul><li>Q5 – How are data models used for database development? </li></ul><ul><li>Q6 – How is a data model transformed into a database design? </li></ul><ul><li>Q7 – What is the user's role in the development of databases? </li></ul><ul><li>Q8 – What are the responsibilities for database administration? </li></ul>
  9. 9. Q2 – What is a database? Table about the entity students Attributes of the entity students
  10. 10. Q2 – What is a database? <ul><li>Fig 5-4 Hierarchy of Data Elements </li></ul><ul><li>This figure shows the hierarchy of data elements working from the smallest at the bottom to the largest at the top. </li></ul>
  11. 11. Q2 – What is a database? <ul><li>An entity is an object, event or concept you want to track. </li></ul><ul><li>A database is a self-describing collection of integrated records about multiple, logically related entities. A concept abstracted from these logically related entities is yet another entity, which is the name of the database . For example, the Accounts Receivable database contains the master file and the transaction file . </li></ul><ul><li>Each set of identical records is in a file. A file is called a table in relational database terminology </li></ul>
  12. 12. Q2 – What is a database? <ul><li>Bytes , characters of data, are grouped into columns which are also called fields. </li></ul><ul><li>The fields are grouped into rows which are also called records . </li></ul><ul><li>A table is a group of similar rows or records which is also called a file . </li></ul><ul><li>A table or file tracks one entity or theme . </li></ul><ul><li>A database tracks multiple, logically related entities or themes. </li></ul>
  13. 13. Q2 – What is a database? <ul><li>Fig 5-5 Components of a Database </li></ul><ul><li>A database is more than just a group of tables. It includes tables or files plus the relationships among rows of different tables and special data called metadata that describes the database’s structure. </li></ul>Disk Drive
  14. 14. Q2 – What is a database? <ul><li>Fig 5-6 Example of Relationships Among Rows </li></ul><ul><li>This diagram shows how relationships among rows of different tables are implemented. </li></ul><ul><li>The Student Number value in the first row of the top table,1325, relates to the same Student Number value in a row in the second table. </li></ul><ul><li>Both that Student Number value and that of 4867 in the second table relate to those in the third . </li></ul>You have identical fields in different files. Rows in different files are related if these identical fields have the same values .
  15. 15. Q2 – What is a database? <ul><li>Keys are a column that identifies a unique row in a table. In the Student Table, the primary key is Student Number. </li></ul><ul><li>Every table must have a key . </li></ul><ul><li>A primary key , Student Number, can act as a foreign key in a different table, like the Office Visit Table. </li></ul><ul><li>A relational database </li></ul><ul><li>uses primary keys and </li></ul><ul><li>foreign keys in tables to </li></ul><ul><li>represent relationships. </li></ul>
  16. 16. Q2 – What is a database? <ul><li>Fig 5-7 Sample Metadata (in Access) </li></ul><ul><li>Metadata are data that describe data and makes databases easy to use. Metadata is always a part of a database. </li></ul><ul><li>The Field Name, Data Type, and Description at the top of this diagram are part of the database’s metadata. </li></ul><ul><li>The additional </li></ul><ul><li>field properties </li></ul><ul><li>at the bottom </li></ul><ul><li>are also </li></ul><ul><li>considered </li></ul><ul><li>metadata. </li></ul><ul><li>Databases are self- describing because of their metadata. </li></ul>
  17. 17. <ul><li>Q1 – What is the purpose of a database? </li></ul><ul><li>Q2 – What is a database? </li></ul><ul><li>Q3 – What are the components of a database application system? </li></ul><ul><li>Q4 – How do database applications make databases more useful? </li></ul><ul><li>Q5 – How are data models used for database development? </li></ul><ul><li>Q6 – How is a data model transformed into a database design? </li></ul><ul><li>Q7 – What is the user's role in the development of databases? </li></ul><ul><li>Q8 – What are the responsibilities for database administration? </li></ul>
  18. 18. Q3 – What are the components of a database application system? <ul><li>By itself, a database of data may be in correct form but it is not useful, except for queries, because there’s no way to process the data to produce reports. The database needs a database application system. </li></ul><ul><li>A database application system provides forms, formatted reports, preformatted queries, and application programs to process and convert the data into different formats to provide useful information to users. </li></ul>Fig 5-8 Components of a Database Application System
  19. 19. Q3 – What are the components of a database application system? <ul><li>A DBMS creates and administers a database and provides an interface for application programs to process the data. </li></ul><ul><li>Popular DBMS products include: </li></ul><ul><ul><ul><li>DB2 from IBM </li></ul></ul></ul><ul><ul><ul><li>Access from Microsoft (for personal computers) </li></ul></ul></ul><ul><ul><ul><li>SQL Server from Microsoft (for large computer systems) </li></ul></ul></ul><ul><ul><ul><li>Oracle from Oracle Corporation </li></ul></ul></ul><ul><ul><ul><li>MySQL, an open-source product that’s license-free </li></ul></ul></ul><ul><li>It’s easy to confuse a DBMS , which is a software program, with a database , which is a collection of tables, relationships and metadata. But, they are two different concepts. </li></ul>
  20. 20. Q3 – What are the components of a database application system? <ul><li>A DBMS is used to read, add, modify, and delete tables, fields, records, keys, relationships, and structures in a database. </li></ul><ul><li>This figure shows how the metadata in an existing table is modified to add a new field, column, labeled “Response?” </li></ul>Fig 5-9 Adding a New Column to a Table (in Access)
  21. 21. Q3 – What are the components of a database application system? <ul><li>The Structured Query Language (SQL), is an international standard language used by most major DBMS programs for processing databases. </li></ul><ul><li>A DBMS includes tools to help you administer a database. You can </li></ul><ul><ul><ul><li>Set up a security system that includes permissions and passwords. </li></ul></ul></ul><ul><ul><ul><li>Back up the data to prevent it from being lost or compromised. </li></ul></ul></ul><ul><ul><ul><li>Improve the performance of applications by adding structures. </li></ul></ul></ul><ul><ul><ul><li>Remove data that’s no longer needed. </li></ul></ul></ul>
  22. 22. <ul><li>Q1 – What is the purpose of a database? </li></ul><ul><li>Q2 – What is a database? </li></ul><ul><li>Q3 – What are the components of a database application system? </li></ul><ul><li>Q4 – How do database applications make databases more useful? </li></ul><ul><li>Q5 – How are data models used for database development? </li></ul><ul><li>Q6 – How is a data model transformed into a database design? </li></ul><ul><li>Q7 – What is the user's role in the development of databases? </li></ul><ul><li>Q8 – What are the responsibilities for database administration? </li></ul>
  23. 23. Q4 – How do database applications make databases more useful? <ul><li>A database application includes forms, reports, queries, and applications programs available to one or more users. </li></ul><ul><li>This figure shows three different applications stemming from a single DBMS and a single database. </li></ul>Fig 5-10 Use of Multiple Database Applications
  24. 24. Q4 – How do database applications make databases more useful? <ul><li>Data entry forms are used to read, insert, modify, and delete data. </li></ul><ul><li>Reports are used to show data in a structured context as the example to the right shows. </li></ul>Fig 5-11 Example of a Student Report
  25. 25. Q4 – How do database applications make databases more useful? <ul><li>Fig 5-12 (a) & (b) Sample Query and Results </li></ul><ul><li>A query form helps the user quickly find answers to questions. In this case, the words “barriers to entry” were found in Baker’s record. </li></ul>
  26. 26. Q4 – How do database applications make databases more useful? <ul><li>Database application programs process logic specific to a given business need. For example, a program could track backordered items and hold a customer order until the items are ready to ship. </li></ul><ul><li>Database application programs enable database processing over the Internet as the figure below shows. Users access the applications programs on a Web server, which in turn accesses a single DBMS and database. </li></ul>Fig 5-13 Four Application Programs on a Web Server Computer
  27. 27. Q4 – How do database applications make databases more useful? <ul><li>This figure depicts multi-user database processing . The system must be managed properly to avoid data conflicts which occur when multiple users attempt to update the same record at the same time. </li></ul>
  28. 28. Q4 – How do database applications make databases more useful? <ul><li>Here’s a comparison of an Enterprise DBMS versus a Personal DBMS. </li></ul><ul><ul><li>Enterprise DBMS </li></ul></ul><ul><ul><ul><li>Large organizational and workgroup databases </li></ul></ul></ul><ul><ul><ul><li>Thousands of users </li></ul></ul></ul><ul><ul><ul><li>Many different database applications </li></ul></ul></ul><ul><ul><ul><li>24/7 operations </li></ul></ul></ul><ul><ul><ul><li>DB2, SQL Server, Oracle </li></ul></ul></ul><ul><ul><li>Personal DBMS </li></ul></ul><ul><ul><ul><li>Smaller, simpler applications </li></ul></ul></ul><ul><ul><ul><li>Personal or small workgroup applications </li></ul></ul></ul><ul><ul><ul><li>Fewer than 100 users </li></ul></ul></ul><ul><ul><ul><li>Microsoft Access is both a DBMS and application development product as this figure depicts. </li></ul></ul></ul>Fig 5-14 Personal Database System
  29. 29. <ul><li>Q1 – What is the purpose of a database? </li></ul><ul><li>Q2 – What is a database? </li></ul><ul><li>Q3 – What are the components of a database application system? </li></ul><ul><li>Q4 – How do database applications make databases more useful? </li></ul><ul><li>Q5 – How are data models used for database development? </li></ul><ul><li>Q6 – How is a data model transformed into a database design? </li></ul><ul><li>Q7 – What is the user's role in the development of databases? </li></ul><ul><li>Q8 – What are the responsibilities for database administration? </li></ul>
  30. 30. Q5 – How are data models used for database development? <ul><li>User involvement is critical for database development for these reasons: </li></ul><ul><ul><li>A database’s design depends on how users view their business environment and how they do their jobs. </li></ul></ul><ul><ul><li>Database developers do not and cannot know what to include because they don’t work with the data everyday. They must rely on users to tell them what data are important and how they’re used. </li></ul></ul><ul><li>A data model is similar to blueprints for a house. It’s a logical representation of database data that describes data and their relationships. </li></ul>Fig 5-15 Database Development Process
  31. 31. Q5 – How are data models used for database development? Fig 5-15 Database Development Process <ul><li>Interviews with users lead to database requirements , which are summarized in a data model . </li></ul><ul><li>Once the users have approved (validated) the data model, it is transformed into a database design. </li></ul><ul><li>That design is then implemented into database structures . </li></ul>
  32. 32. Q5 – How are data models used for database development? <ul><li>An entity-relationship data model helps developers define things ( entities ) that will be stored in the database as they are building a data model. It also defines relationships among those entities. </li></ul><ul><li>Entities are things users want to track. It can be a physical object (inventory items) or an event (sales order). </li></ul><ul><li>Each entity has attributes that describe its characteristics. The entity “Order” has attributes like “OrderNumber” and “OrderDate”. </li></ul><ul><li>An identifier is an attribute whose value is associated with one and only one entity instance. “OrderNumber” is the identifier for the “Order” entity because there should only be one number for each order. </li></ul>
  33. 33. Q5 – How are data models used for database development? <ul><li>Fig 5-16 Student Data Model Entities </li></ul><ul><li>Student, Department, Advisor, Email, and Office_Visit are the entity names in this model. </li></ul><ul><li>The entity identifiers are StudentNumber, DeptName, and AdvisorName. Not all entities require an identifier. </li></ul>Entity Name Entity Identifier
  34. 34. Q5 – How are data models used for database development? <ul><li>Relationships join one entity to another entity </li></ul><ul><ul><li>One-to-one – 1:1 </li></ul></ul><ul><ul><li>One-to-many – 1:N </li></ul></ul><ul><ul><li>Many-to-many – N:M </li></ul></ul><ul><li>This diagram shows that each Department Entity can have multiple Adviser Entities in a one-to-many relationship. Adviser Entities can have a many-to-many relationship with Student Entities. </li></ul>
  35. 35. Q5 – How are data models used for database development? <ul><li>The line style between entities describes the type of relationship as shown in the entity-relationship diagram below. </li></ul><ul><li>This diagram depicts crow’s feet between the entities to describe the relationships. It shows a one-to-many ( 1:M ) relationship between Department and Adviser and a many-to-many ( N:M ) relationship between Adviser and Student entities. </li></ul>Fig 5-19 Sample Relationships – Version 1
  36. 36. Q5 – How are data models used for database development? <ul><li>Fig 5-19 Sample Relationships – Version 2 </li></ul><ul><li>The entity-relationship diagram below shows a many-to-many ( N:M ) relationship between Department and Adviser and a one-to-many ( 1:M ) relationship between Adviser and Student. </li></ul><ul><li>Because relationships among entities can vary, only the user can describe the entity-relationship. That’s why it’s so important for users to help design databases. </li></ul>
  37. 37. Q5 – How are data models used for database development? <ul><li>Fig 5-20 Sample Relationships Showing Maximum/Minimum Cardinality </li></ul><ul><li>Maximum cardinality represents the maximum number of entities that can be involved in a relationship. </li></ul><ul><li>Minimum cardinality represents the minimum number of entities that can be involved in a relationship. </li></ul><ul><li>The vertical bar below indicates that at least one entity is required between Department and Adviser and between Adviser and Student. </li></ul><ul><li>The oval below indicates that an entity is optional and doesn’t require a relationship. </li></ul>
  38. 38. <ul><li>Q1 – What is the purpose of a database? </li></ul><ul><li>Q2 – What is a database? </li></ul><ul><li>Q3 – What are the components of a database application system? </li></ul><ul><li>Q4 – How do database applications make databases more useful? </li></ul><ul><li>Q5 – How are data models used for database development? </li></ul><ul><li>Q6 – How is a data model transformed into a database design? </li></ul><ul><li>Q7 – What is the user's role in the development of databases? </li></ul><ul><li>Q8 – What are the responsibilities for database administration? </li></ul>
  39. 39. Q6 How is a data model transformed into a database design? <ul><li>Database design is the process of: </li></ul><ul><ul><li>Defining a data model </li></ul></ul><ul><ul><li>Converting the data model into tables </li></ul></ul><ul><ul><li>Defining relationships with foreign keys </li></ul></ul><ul><ul><li>Defining data constraints. </li></ul></ul>
  40. 40. Q6 How is a data model transformed into a database design? <ul><li>Fig 5-21 Poorly Designed Employee Table </li></ul><ul><li>Converting a poorly structured table into two or more well-structured tables is called normalization . </li></ul><ul><li>The table below is poorly designed because it includes the DeptName along with DeptNo as part of the Employee record, creating data redundancy . </li></ul><ul><li>It also creates data integrity </li></ul><ul><li>problems because </li></ul><ul><li>the DeptName is not </li></ul><ul><li>consistent throughout </li></ul><ul><li>the table after the </li></ul><ul><li>data were updated. </li></ul>
  41. 41. Q6 How is a data model transformed into a database design? <ul><li>Normalizing the tables by splitting the Department data into a separate table, as shown below, allows each table to describe a single topic or theme . The tables have been transformed into a normal form. </li></ul><ul><li>By eliminating the duplicate data , you eliminate data integrity problems . That’s called </li></ul><ul><li>normalizing for data </li></ul><ul><li>integrity . </li></ul><ul><li>Now, the department </li></ul><ul><ul><li>name only needs to </li></ul></ul><ul><ul><li>be updated in one place </li></ul></ul><ul><ul><li>in the normalized tables. </li></ul></ul>
  42. 42. Q6 How is a data model transformed into a database design? <ul><li>This chart shows the necessary steps to transform a data model into a relational database design. </li></ul>Fig 5-23 Transforming a Data Model into a Database Design <ul><li>Finally, you define the data constraints. </li></ul>
  43. 43. Q6 How is a data model transformed into a database design? <ul><li>The figures below and on the next slide depict the steps used to create a well structured database that will produce useful information. </li></ul><ul><li>The figure on the left represents the relationship between tables . The figure on the right shows a normalized table for each entity . </li></ul>From Figure 5-24 Representing a 1:N Relationship
  44. 44. Q6 How is a data model transformed into a database design? <ul><li>The figure below shows how relationships are represented using foreign keys . It’s the last step in transforming a data model into a database design. </li></ul>From Figure 5-24 Representing a 1:N Relationship
  45. 45. <ul><li>Q1 – What is the purpose of a database? </li></ul><ul><li>Q2 – What is a database? </li></ul><ul><li>Q3 – What are the components of a database application system? </li></ul><ul><li>Q4 – How do database applications make databases more useful? </li></ul><ul><li>Q5 – How are data models used for database development? </li></ul><ul><li>Q6 – How is a data model transformed into a database design? </li></ul><ul><li>Q7 – What is the user's role in the development of databases? </li></ul><ul><li>Q8 – What are the responsibilities for database administration? </li></ul>
  46. 46. Q7 – What is the user's role in the development of databases? <ul><li>Your role in the database development process is to decide what data should be included and how records should relate to one another. </li></ul><ul><li>The best time to change a database structure is during the data modeling stage. It’s easier and cheaper to change your mind before anything is actually built. The costs of correcting the database in time and money later on may be very high. </li></ul><ul><li>Each entity must contain all the data you need to do your job. </li></ul><ul><li>Each relationship must accurately reflect the appropriate view of your business. </li></ul><ul><li>You must be the final judge of how well the database will serve your needs. Do not go forward until the data model is accurate. </li></ul>
  47. 47. <ul><li>Q1 – What is the purpose of a database? </li></ul><ul><li>Q2 – What is a database? </li></ul><ul><li>Q3 – What are the components of a database application system? </li></ul><ul><li>Q4 – How do database applications make databases more useful? </li></ul><ul><li>Q5 – How are data models used for database development? </li></ul><ul><li>Q6 – How is a data model transformed into a database design? </li></ul><ul><li>Q7 – What is the user's role in the development of databases? </li></ul><ul><li>Q8 – What are the responsibilities for database administration? </li></ul>
  48. 48. Q8 – What are the responsibilities for database administration? <ul><li>Databases are the primary resource for information about the repetitive, recorded activities for most businesses. The database will constrain or enable your visibility into your business. </li></ul><ul><li>As databases touch more aspects of systems and business functions, the utility of a database increases as do potential problems . </li></ul><ul><li>Database administration manages the development, operation, and maintenance of databases. </li></ul><ul><li>Database administration must protect the database and maximize its availability for authorized use. </li></ul>
  49. 49. Q8 – What are the responsibilities for database administration? <ul><li>Fig 5-26 Summary of Database Administration Tasks </li></ul><ul><li>Database administration tasks are divided into four categories as shown below and on the next slide. </li></ul><ul><li>Development </li></ul><ul><li>Operation </li></ul><ul><li>Backup and recovery </li></ul><ul><li>Adaptation </li></ul>
  50. 50. Q8 – What are the responsibilities for database administration? <ul><li>Fig 5-26 Summary of Database Administration Tasks, continued </li></ul>

×