A Guide to SQL, Eighth Edition 1 Chapter One Introduction to Premiere Products, Henry Books, and Alexamara Marina Group.

Slides:



Advertisements
Similar presentations
Multiple Table Queries
Advertisements

Concepts of Database Management Seventh Edition Chapter 3 The Relational Model 2: SQL.
Introduction to Access. What is Access? Database tool Creates a database Good data query (lookup and analysis) ability Good entry forms Good reports Multi-user.
SQL – Part II Yong Choi School of Business CSU, Bakersfield.
Concepts of Database Management Sixth Edition
SQL – Part II Yong Choi School of Business CSU, Bakersfield.
1 1 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 1 Introduction to Database Management.
A Guide to SQL, Seventh Edition. Objectives Understand the concepts and terminology associated with relational databases Create and run SQL commands in.
A Guide to SQL, Seventh Edition. Objectives Introduce Premiere Products, a company whose database is used as the basis for many of the examples throughout.
A Guide to MySQL 7. 2 Objectives Understand, define, and drop views Recognize the benefits of using views Use a view to update data Grant and revoke users’
Concepts of Database Management Seventh Edition Chapter 1 Introduction to Database Management.
A Guide to SQL, Seventh Edition. Objectives Understand, create, and drop views Recognize the benefits of using views Grant and revoke user’s database.
SQL (Standard Query Language) Yong Choi School of Business CSU, Bakersfield.
Chapter 3: SQL – Part I Yong Choi School of Business CSU, Bakersfield.
SQL – Part I Yong Choi School of Business CSU, Bakersfield.
Database Fundamentals
MS Access Tutorial MGMT 683 J. Rees. Introduction MS Access is a relational database management system (RDBMS) Other PC-based RDMBS include: –MS FoxPro.
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
Objective 5.01: Understand database tables used in business Database Fundamentals.
Concepts of Database Management Seventh Edition Chapter 1 Introduction to Database Management.
Food Recall System Pre Code System Design Layout Version 1.0.
Introduction to SQL Yong Choi School of Business CSU, Bakersfield.
Concepts of Database Management Seventh Edition
Concepts of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
A Guide to SQL, Eighth Edition 1 Chapter One Introduction to Premiere Products, Henry Books, and Alexamara Marina Group.
Chapter 1 Introduction to Premiere Products and Henry Books
Concepts of Database Management Eighth Edition
A Guide to SQL, Eighth Edition Chapter Two Database Design Fundamentals.
SQL – Part II Yong Choi School of Business CSU, Bakersfield.
Concepts of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
Concepts of Database Management Seventh Edition Chapter 4 Keys and Relationship.
Database & Data Warehouse Assignments
1 A Guide to MySQL 2 Database Design Fundamentals.
Database Technology and Church Management MSCM 8630 IT for Church Management Dr. Wagner October 9, 2008.
With Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Intermediate.
1 Single Table Queries. 2 Objectives  SELECT, WHERE  AND / OR / NOT conditions  Computed columns  LIKE, IN, BETWEEN operators  ORDER BY, GROUP BY,
Database & Data Warehouse Assignments BCIS 4660 – Dr. Nick Evangelopoulos Spring 2012.
1 A Guide to MySQL 2 Database Design Fundamentals.
ACCESS CHAPTER 5 FORMS AND REPORTS Learning Objectives: Build a simple form Add a label, text box, and list controls to a form Create a multi-table form.
# 1# 1 CS 105 Databases Introduction What is a database? What is a front-end? What does open source mean? How do you pronounce SQL? CS 105 Spring 2010.
A Guide to MySQL. 2 Objectives Introduce Premiere Products, a company whose database is used as the basis for many of the examples throughout the text.
1 Reports. 2 Objectives  Use concatenation in a query  Change column headings and formats  Add a title to a report  Group data in a report  Include.
Database Management Systems.  Database management system (DBMS)  Store large collections of data  Organize the data  Becomes a data storage system.
1 CSE 2337 Introduction to Data Management Textbook: Chapter 1.
Basic HTML HTML document consists of text markup tags interspersed in the text Example: Example 1 Example 1 Here goes the text This is a second paragraph.
1 Multiple Table Queries. 2 Objectives  Retrieve data from more than one table by joining tables  Using IN and EXISTS to query multiple tables  Nested.
SQL – Part I Yong Choi School of Business CSU, Bakersfield.
Concepts of Database Management Seventh Edition Chapter 1 Introduction to Database Management.
Database Objective Demonstrate basic database concepts and functions.
Chapter 8 Embedded SQL.
Database Fundamentals Objective 5.01: Understand database tables used in business.
Concepts of Database Management Seventh Edition Chapter 4 Keys and Relationship.
Database & Data Warehouse Assignments BCIS 4660 – Dr. Nick Evangelopoulos Spring 2012.
A Guide to SQL, Sixth Edition 1 Chapter 7 Reports.
A Guide to MySQL.
A Guide to SQL, Seventh Edition
A Guide to SQL, Eighth Edition
Database Fundamentals
A Guide to SQL, Eighth Edition
Database Fundamentals
Database Fundamentals
Creating Database Reports
Yong Choi School of Business CSU, Bakersfield
Yong Choi School of Business CSU, Bakersfield
A Guide to SQL, Ninth Edition
A Guide to SQL, Eighth Edition
Yong Choi School of Business CSU, Bakersfield
A Guide to SQL, Eighth Edition
Database Fundamentals
Presentation transcript:

A Guide to SQL, Eighth Edition 1 Chapter One Introduction to Premiere Products, Henry Books, and Alexamara Marina Group

A Guide to SQL, Eighth Edition 2 Objectives Introduce Premiere Products, a company whose database is used as the basis for many of the examples throughout the text

A Guide to SQL, Eighth Edition 3 What is a Database? Database: a structure containing categories of information and relationships between these categories Categories: sales reps, customers, orders, and parts Relationships between categories: sales rep- to-customer and customer-to-orders

A Guide to SQL, Eighth Edition 4 The Premiere Products Database Premiere Products is a distributor of appliances, housewares, and sporting goods Manual system no longer feasible for managing customer, order, and inventory data Database management system will allow for current, accurate data with useful reports

A Guide to SQL, Eighth Edition 5 Required Data for Sales Reps Number Last name First name Address Total commission Commission rate

A Guide to SQL, Eighth Edition 6 Required Data for Customer Customer number Name Address Current balance Credit limit Sales rep number

A Guide to SQL, Eighth Edition 7 Required Data for Parts Part number Description Number of units on hand Item class Number of the warehouse where the item is stored Unit price for each part in inventory

A Guide to SQL, Eighth Edition 8

9 Components of a Sample Order Heading (top of the order form) –Order number and date –Customer number, name, address –Sales rep number and name Body (center of the order form) –One or more order lines or line items Footer (bottom of the order form) –Order total

A Guide to SQL, Eighth Edition 10 Components of a Line Item Part number Part description Number of units for the part ordered Quoted price for the part Total, or extension, the result of multiplying the number ordered by the quoted price

A Guide to SQL, Eighth Edition 11 Items Stored for Each Order Order number Date of the order Customer number Customer name, address, and sales rep information are stored with the customer information Sales rep name is stored with sales rep information

A Guide to SQL, Eighth Edition 12 Items Stored for Each Order (continued) Order number, part number, number of units ordered Quoted price Part description is stored with information on parts Order total is not stored but is calculated each time order is displayed or printed

A Guide to SQL, Eighth Edition 13 Sample Rep Table

A Guide to SQL, Eighth Edition 14 Rep Table Example Three sales reps in the table identified by number –Sales rep number: 20 –Name: Valerie Kaiser –Address: 624 Randall, Grove, FL, –Total commission: $20, –Commission rate: 5% (0.05)

A Guide to SQL, Eighth Edition 15 Sample Customer Table

A Guide to SQL, Eighth Edition 16 Customer Table Example Ten customers are identified by number –Number: 148 –Name: Al’s Appliance and Sport –Address: 2837 Greenway, Fillmore, FL, –Current balance: $6, –Credit limit: $7, –Sales rep: 20 (Valerie Kaiser)

A Guide to SQL, Eighth Edition 17 Sample Part Table

A Guide to SQL, Eighth Edition 18 Part Table Example Ten parts are listed by part number –Part number: AT94 –Description: Iron –Units on hand: 50 –Item class: HW (housewares) –Warehouse: 3 –Price: $24.95

A Guide to SQL, Eighth Edition 19 Sample Orders Table

A Guide to SQL, Eighth Edition 20 Orders Table Example Seven orders listed by order number –Order number: –Order date: 10/20/2010 –Customer: 148 (Al’s Appliance and Sport)

A Guide to SQL, Eighth Edition 21 Sample Order_Line Table

A Guide to SQL, Eighth Edition 22 Order_Line Table Example Nine order line items listed by order number –Order number: –Part number: AT94 (iron) –Number ordered: 11 –Quoted price: $21.95

A Guide to SQL, Eighth Edition 23 Alternative Orders Table Structure

A Guide to SQL, Eighth Edition 24 Alternative Order Table Example –Displays identical data in one table –Each table row contains all of the order lines for each order –Fifth row, order has two order lines Part BV06, Qty 2, Quoted price $ each Part CD52, Qty 4, Quoted price $ each

A Guide to SQL, Eighth Edition 25 Issues with Alternative Order Table Difficult to track information between columns Other issues –How much room is allowed for multiple entries? –What if an order has more order lines than you have allowed room for? –For a given part, how do you determine which orders contain order lines for that part?

A Guide to SQL, Eighth Edition 26 Benefits of Order_Line Table Table is less complicated when separated No multiple entries Number of order lines is not limited Finding every order for a given part is simple

A Guide to SQL, Eighth Edition 27 Summary Premiere Products –Requires rep, customer, parts, orders, and order lines