Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.”...

34
Database Processing Chapter 5

Transcript of Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.”...

Page 1: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

Database Processing

Chapter 5

Page 2: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-2

"No, Drew, You Don’t Know Anything About Report Writing.”

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

• GearUp needs operating data to analyze for cost-cutting decisions

• Need to extract and combine data from customer order, shipping system, and accounts payable systems

• Will use Access to create reports

Page 3: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-3

Study Questions

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Q1: What is the purpose of a database?

Q2: What is a database?

Q3: What is a database management system (DBMS)?

Q4: How do database applications make databases more useful?

Q5: What is a NoSQL DBMS?

Q6: How does the knowledge in this chapter help you?

Page 4: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-4

Q1: What Is the Purpose of a Database?

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

• Organize and keep track of things• Keep track of multiple themes• General rule:

Single theme store in a spreadsheet Multiple themes require a database

Page 5: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-5

A List of Student Grades Presented in a Spreadsheet – Single Theme

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Page 6: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-6

Student Data Form With Multiple Themes

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Page 7: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-7

Q2: What Is a Database?

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Page 8: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-8

Hierarchy of Data Elements

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Page 9: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-9

Components of a Database

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Page 10: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-10

Example of Relationships Among Rows?

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Page 11: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-11

Metadata: Data that Describes Data

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Page 12: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-12

Experiencing MIS InClass Exercise 5: How Much Is a Database Worth?

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

• Data has resale value• Data on everything customers do • Use to target customer for offerings they

care about, avoid those they don’t • Costly and difficult to replace data collected

over many years

Page 13: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-13

Q3: What Is a Database Management System (DBMS)?

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Database Application System Components

Page 14: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-14

Creating the Database and Its Structure: Adding a New Column to a Table

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Page 15: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-15

Processing the Database

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Four DBMS operations

1. Read

2. Insert

3. Modify

4. Delete data

Page 16: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-16

Structured Query Language (SQL)

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

• SQL (see-quell)

• International standard • Used by most popular DBMS

Page 17: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-17

SQL Statement Inserts a New RowInto Student Table

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

• INSERT INTO Student

([Student Number], [Student Name], HW1, HW2, MidTerm)

• VALUES (1000, ‘Franklin, Benjamin’, 90, 95, 100);

Page 18: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-18

Summary of Database Administration Tasks

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Page 19: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-19

Summary of Database Administration Tasks (cont'd)

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Page 20: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-20

Q4: How Do Database Applications Make Databases More Useful?

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Applications used at GearUp

Page 21: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-21

What Are Forms, Reports, and Queries?

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Page 22: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-22

Why Are Database Application Programs Needed?

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

• Process logic specific for a business need

• Processing via Internet

Page 23: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-23

Multi-User Processing Lost-Update Problem

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Page 24: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-24

Enterprise DBMS vs. Personal DBMS

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

• Personal DBMS for smaller databases used by 1 to 100 users.

Page 25: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-25

Q5: What is a NoSQL DBMS?

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

NOSQL DBMS (NotRelational DBMS– Supports very high transaction rates – Relatively simple data structures– Replicated on many servers in the cloud

• Examples– Dynamo (Amazon)– Bigtable (Google)– Cassandra (Facebook)

Page 26: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-26

Will NoSQL Replace Relational DBMS Products?

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

• Conversion very expensive and disruptive

• Very technical, limited to those with a deep background in computer science

• Requires years of training to use

• Organization may choose NoSQL products for specialized applications

Page 27: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-27

NoSQL’s Impact on the DBMS Product Market

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

• Database software market experienced viable new entrants

• More reliance on open source community

• Will DBMS vendors lose some of their market to NOSQL products and vendors?

• Will they become less of a seller of services supporting open source software?

Page 28: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-28

Q6: How Does the Knowledge in this Chapter Help You?

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

• Provides–Some rudimentary knowledge of Access–Awareness that it is common for end-

users to receive extracts of operational data to create queries and reports

• Will help you in your career

Page 29: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-29

Ethics Guide: Nobody Said I Shouldn’t

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

1. Chris made copy of backup database, took it home

2. Queried sysTables to find table and field names

3. Found data on orders, customers, salespeople4. Discovered peculiar sales discounts5. Mentioned it to Jason (the sales clerk)6. Chris fired next business day

Page 30: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-30

Ethics Guide: Nobody Said I Shouldn’t (cont’d)

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

• Where did Chris go wrong?• Was it illegal, unethical, or okay for Chris to

copy the database and take it home?• How could Chris have handled his discovery

of the anomaly and protected himself?• Does Chris have any legal recourse over

being fired?• How can a business protect its databases

from unauthorized use or duplication?

Page 31: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-31

Guide: No, Thanks, I’ll Use a Spreadsheet

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

• Databases take time to build

• Complicated to operate

• Need IS people to create and keep them running

• Salesman doesn’t want to share data

• Spreadsheets sometimes better option, especially if data needs are simple

Page 32: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-32

Active Review

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

Q1: What is the purpose of a database?

Q2: What is a database?

Q3: What is a database management system (DBMS)?

Q4: How do database applications make databases more useful?

Q5: What is a NoSQL DBMS?

Q6: How does the knowledge in this chapter help you?

Page 33: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-33

Case Study 5: Fail Away with Dynamo, Bigtable, and Cassandra

C o p y r i g h t © 2 0 1 4 P e a r s o n E d u c a t i o n , I n c . P u b l i s h i n g a s P r e n t i c e H a l l

• Current relational DBMS products not designed for large, multi-server systems

• NoSQL databases – Dynamo, Bigtable, Cassandra

• Amazon: Dynamo

• Google: Bigtable processes petabytes of data on hundreds of thousands of servers

• Both designed to be elastic

• Cassandra used by Facebook, Twitter, Digg, Reddit

Page 34: Database Processing Chapter 5. 5-2 "No, Drew, You Don’t Know Anything About Report Writing.” Copyright © 2014 Pearson Education, Inc. Publishing as Prentice.

5-34