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.

Slides:



Advertisements
Similar presentations
Multiple Table Queries
Advertisements

Concepts of Database Management Seventh Edition Chapter 3 The Relational Model 2: SQL.
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.
1 LBSC 690: Week 9 SQL, Web Forms. 2 Discussion Points Websites that are really databases Deep vs. Surface Web.
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.
Chapter 3: SQL – Part I Yong Choi School of Business CSU, Bakersfield.
What do you know? In your own words briefly describe what you know about databases? – Where are they used? – What are they used for? – How do they look?
SQL – Part I Yong Choi School of Business CSU, Bakersfield.
Database Fundamentals
Chapter 12 Information Systems. Spreadsheets Databases 12-2.
1 Database Requirements and Design. 2 DATA PEOPLE PROCEDURES HARDWARE SOFTWARE The Product: a working system.
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.
Relational Database Concepts. Let’s start with a simple example of a database application Assume that you want to keep track of your clients’ names, addresses,
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.
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
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 DESIGN USING MICROSOFT ACCESS. What is a Database?  DMS Database management system  Database Collection of data organized in a manner that.
1 A Guide to MySQL 2 Database Design Fundamentals.
Access 2013 Microsoft Access 2013 is a database application that is ideal for gathering and understanding data that’s been collected on just about anything.
SQL – Part I Yong Choi School of Business CSU, Bakersfield.
Database & Data Warehouse Assignments BCIS 4660 – Dr. Nick Evangelopoulos Spring 2012.
Chapter 17 Creating a Database.
1 A Guide to MySQL 2 Database Design Fundamentals.
# 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.
Technology In Action Chapter 11 1 Databases and… Databases and their uses Database components Types of databases Database management systems Relational.
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.
SQL – Part I Yong Choi School of Business CSU, Bakersfield.
Concepts of Database Management Seventh Edition Chapter 1 Introduction to Database Management.
MS-Access XP Lesson 4. Modifying Queries 1.Select query in queries 2.Click design button or Right click on query and click design view 3.Change query.
Access Lessons 1, 2 and 3 ©2009 M and K Solutions, LLC – All Rights Reserved.
Database Fundamentals Objective 5.01: Understand database tables used in business.
QUERY CONSTRUCTION CS1100: Data, Databases, and Queries CS1100Microsoft Access1.
Concepts of Database Management Seventh Edition Chapter 4 Keys and Relationship.
Database & Data Warehouse Assignments BCIS 4660 – Dr. Nick Evangelopoulos Spring 2012.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
A Guide to SQL, Eighth Edition 1 Chapter One Introduction to Premiere Products, Henry Books, and Alexamara Marina Group.
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
Yong Choi School of Business CSU, Bakersfield
A Guide to SQL, Ninth Edition
Yong Choi School of Business CSU, Bakersfield
Introduction to Database Programs
Database Fundamentals
SALES RECEIPT Downloaded from
Introduction to Database Programs
A Guide to SQL, Eighth Edition
Introduction to MS ACCESS
Database Fundamentals
Presentation transcript:

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 Introduce Henry Books, a company whose database is used as a case that runs throughout the text Introduce Alexamara Marina Group, a company whose database is used as an additional case that runs throughout the text Introduce MySQL, a database management system

A Guide to MySQL 3 What Is a Database? Database: structure containing categories of information and relationships between these categories Examples of categories: sales reps, customers, orders, and parts Relationships between categories: sales rep to customer and customer to orders

A Guide to MySQL 4 The Premiere Products Database Premiere Products: distributor of appliances, house wares, and sporting goods Manual systems no longer suitable for managing customer, order, and inventory data Database management system will allow for current, accurate data and provide useful reports

A Guide to MySQL 5 Required Data for Sales Reps Number Last name First name Address Total commission Commission rate

A Guide to MySQL 6 Required Data for Customer Customer number Name Address Current balance Credit limit Sales rep number

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

A Guide to MySQL 8

9 Components of a Sample Order Heading (top): company name; order number and date; customer number, name, address; sales rep number and name Body (center): one or more order lines or line items Footer (bottom): order total

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

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

A Guide to MySQL 12 Items Stored for Each Order Order number, part number, number of units ordered, and quoted price Part description is stored with information about parts Order total is not stored but calculated each time order is displayed or printed

A Guide to MySQL 13 Sample Rep Table

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

A Guide to MySQL 15 Sample Customer Table

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

A Guide to MySQL 17

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

A Guide to MySQL 19 Sample Order Table

A Guide to MySQL 20 Order Table Example Seven orders listed by order number –Order number: –Order date: 10/20/2007 –Customer: 148 (Al’s Appliance and Sport)

A Guide to MySQL 21 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 MySQL 22

A Guide to MySQL 23 Alternate Order Table Example Displays identical data in one table Each table row contains all 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 MySQL 24 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 MySQL 25 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 MySQL 26 Henry Books Database Ray Henry owns Henry Books, a bookstore chain Data is to be stored in a database Needs forms and reports to work with the data In running chain of bookstores, gathers variety of information on branches, publishers, authors, books

A Guide to MySQL 27 Data for Branch Table Number Name Location Number of employees

A Guide to MySQL 28 Data for Publisher Table Publisher code Publisher name City

A Guide to MySQL 29

A Guide to MySQL 30 Data for Author Table Author number Last name First name

A Guide to MySQL 31 Data for Book Table Book code Title Publisher code Type of book Price Is it a paperback?

A Guide to MySQL 32

A Guide to MySQL 33 Data for Wrote Table Book code Author number Sequence (for books with multiple authors)

A Guide to MySQL 34 Data for Inventory Table Book code Branch number Quantity on hand

A Guide to MySQL 35

A Guide to MySQL 36 The Alexamara Marina Group Database Alexamara Marina Group offers in-water storage to boat owners Owns two marinas: East and Central Provides boat repair and maintenance services Uses database to store information for managing operations

A Guide to MySQL 37 Data for Marina Table Marina number Name Full address (street; city; state; zip code)

A Guide to MySQL 38 Data for Owner Table Owner number Last name First name Full address (street; city; state; zip code)

A Guide to MySQL 39 Data for Marina_Slip Table Slip ID, marina number, slip number Length Rental fee Boat name and boat type Owner number

A Guide to MySQL 40

A Guide to MySQL 41 Service Data Maintenance service category information is stored in the SERVICE_CATEGORY table Information on the services requested is stored in the SERVICE_REQUEST table SERVICE_REQUEST stores service category, slip information, description and status, estimated hours, hours spent, and next service date

A Guide to MySQL 42

A Guide to MySQL 43 MySQL Database management system (DBMS) is software that lets you: –Create a database –Add, change, delete, sort, and view the data in a database Created in 1990s in Sweden Open source software: software whose source code is freely and publicly available

A Guide to MySQL 44 MySQL (continued) SQL (Structured Query Language): language for manipulating and retrieving database data Version 4.1 used in text Windows XP operating system for informationhttp:// for downloadshttp://dev.mysql.com/downloads/

A Guide to MySQL 45 Summary Premiere Products: requires sales rep, customer, parts, orders and order lines Henry Books: requires branch, publisher, author, book, and inventory Alexamara Marina Group: requires marina, owners, slips, service categories and service requests MySQL: an open-source DBMS