Download - About the Presentations

Transcript
  • A Guide to SQL, Eighth Edition*About the PresentationsThe presentations cover the objectives found in the opening of each chapterAll chapter objectives are listed in the beginning of each presentationYou may customize the presentations to fit your class needsSome figures from the chapters are included; a complete set of images from the book can be found on the Instructor Resources disc

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*A Guide to SQL, Eighth EditionChapter OneIntroduction to Premiere Products, Henry Books, and Alexamara Marina Group

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*ObjectivesIntroduce Premiere Products, a company whose database is used as the basis for many of the examples throughout the textIntroduce Henry Books, a company whose database is used as a case that runs throughout the textIntroduce Alexamara Marina Group, a company whose database is used as an additional case that runs throughout the text

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*What is a Database?Database: a structure containing categories of information and relationships between these categoriesCategories: sales reps, customers, orders, and partsRelationships between categories: sales rep-to-customer and customer-to-orders

    A Guide to SQL, Eighth Edition

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

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Required Data for Sales RepsNumberLast nameFirst nameAddressTotal commissionCommission rate

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Required Data for CustomerCustomer numberNameAddressCurrent balanceCredit limit Sales rep number

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Required Data for PartsPart numberDescriptionNumber of units on handItem classNumber of the warehouse where the item is storedUnit price for each part in inventory

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Components of a Sample OrderHeading (top of the order form)Order number and dateCustomer number, name, addressSales rep number and nameBody (center of the order form)One or more order lines or line itemsFooter (bottom of the order form)Order total

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Components of a Line ItemPart numberPart descriptionNumber of units for the part orderedQuoted price for the partTotal, or extension, the result of multiplying the number ordered by the quoted price

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Items Stored for Each OrderOrder numberDate of the orderCustomer numberCustomer name, address, and sales rep information are stored with the customer informationSales rep name is stored with sales rep information

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Items Stored for Each Order (continued)Order number, part number, number of units orderedQuoted pricePart description is stored with information on partsOrder total is not stored but is calculated each time order is displayed or printed

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Sample Rep Table

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Rep Table ExampleThree sales reps in the table identified by numberSales rep number: 20Name: Valerie KaiserAddress: 624 Randall, Grove, FL, 33321Total commission: $20,542.50Commission rate: 5% (0.05)

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Sample Customer Table

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Customer Table ExampleTen customers are identified by numberNumber: 148Name: Als Appliance and SportAddress: 2837 Greenway, Fillmore, FL, 33336Current balance: $6,550.00Credit limit: $7,500.00Sales rep: 20 (Valerie Kaiser)

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Sample Part Table

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Part Table ExampleTen parts are listed by part numberPart number: AT94Description: IronUnits on hand: 50Item class: HW (housewares)Warehouse: 3Price: $24.95

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Sample Orders Table

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Orders Table ExampleSeven orders listed by order numberOrder number: 21608Order date: 10/20/2010Customer: 148 (Als Appliance and Sport)

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Sample Order_Line Table

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Order_Line Table ExampleNine order line items listed by order numberOrder number: 21608Part number: AT94 (iron)Number ordered: 11Quoted price: $21.95

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Alternative Orders Table Structure

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Alternative Order Table ExampleDisplays identical data in one tableEach table row contains all of the order lines for each orderFifth row, order 21617 has two order linesPart BV06, Qty 2, Quoted price $794.95 eachPart CD52, Qty 4, Quoted price $150.00 each

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Issues with Alternative Order TableDifficult to track information between columnsOther issuesHow 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

  • A Guide to SQL, Eighth Edition*Benefits of Order_Line TableTable is less complicated when separatedNo multiple entriesNumber of order lines is not limitedFinding every order for a given part is simple

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Henry Books DatabaseRay Henry owns Henry Books, a bookstore chainData is to be stored in a databaseNeeds forms and reports to work with the dataGathers a variety of information on branches, publishers, authors, and books

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Data for Branch TableNumberNameLocationNumber of employees

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Sample Branch Table

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Data for Publisher TablePublisher CodeNameCity

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Sample Publisher Table

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Data for Author TableAuthor numberLast nameFirst name

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Sample Author Table

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Data for Book TableBook codeTitlePublisherType of bookPriceIs it a paperback?

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Sample Book Table

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Data for Wrote TableThis table relates books and authorsBook codeAuthor numberSequence, for books with multiple authors

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Data for Inventory TableThis table indicates the number of copies currently on hand at a particular branchBook codeBranch numberOn hand quantity

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Sample Wrote and Inventory TablesWrote tableInventory table

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Alexamara Marina DatabaseAlexamara Marina Group offers in-water storage to boat ownersHas two propertiesAlso provides boat repair and maintenance servicesUses database to store information for managing operations

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Data for Marina TableMarina numberNameStreet AddressCity, State, and Zip

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Data for Owner TableOwner numberLast and First namesStreet AddressCity, State, and Zip

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Sample Marina and Owner Tables

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Data for Marina_Slip TableSlip ID, Marina Number, Slip NumberLengthRental feeBoat name and Boat typeOwner number

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Sample Marina_Slip Table

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Service DataMaintenance service category information is stored in the SERVICE_CATEGORY tableInformation on the services requested is stored in the SERVICE_REQUEST tableStores service category, slip information, description and status, estimated hours, hours spent, and next service date

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Sample Service_Category Table

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*Sample Service_Request Table

    A Guide to SQL, Eighth Edition

  • A Guide to SQL, Eighth Edition*SummaryPremiere ProductsRequires rep, customer, parts, orders, and order linesHenry BooksRequires branch, publisher, author, book, and inventoryAlexamara Marina GroupRequires marina, owners, slips, service categories, and service requests

    A Guide to SQL, Eighth Edition

    *