Download presentation
Presentation is loading. Please wait.
Published byLenard Kennedy Modified over 9 years ago
1
Microsoft Access Big City Store Sales Database CUSTOMERS First Last Address City State Zip PRODUCTS Product Supplier Description Units Cost Price SALES Customer Product Date Quantity
2
Microsoft Access Big City Store Sales Database CUSTOMERS First Last Address City State Zip PRODUCTS Product Supplier Description Units Cost Price Jack bought: 2 Hats 4 Pairs of Socks 3 Pairs of Shoes Shoes bought by: Jack Johnson Jill Jones Jerry Jacks
3
Microsoft Access Big City Store Sales Database CUSTOMERS First Last Address City State Zip PRODUCTS Product Supplier Description Units Cost Price Many to Many Relationship
4
Microsoft Access Big City Store Sales Database CUSTOMERS First Last Address City State Zip PRODUCTS Product Supplier Description Units Cost Price SALES Customer Product Date Quantity Main Table Junction Table Main Table
5
Microsoft Access Big City Store Sales Database CUSTOMERS First Last Address City State Zip PRODUCTS Product Supplier Description Units Cost Price SALES Customer Product Date Quantity 1 One Customer can have many sales 1 One Product can be sold many times To set these relationships, the main tables must have primary keys.
6
Microsoft Access CUSTOMERS FirstLastStreet AddressCitySTZip JackJohnson123 South Main StGainesvilleFL32608 JillJones28000 SW 583 AveGainesvilleFL32597 JerryJacks2701 Wilson RoadGainesvilleFL32655 JohnJinks3243 SE 4th TerraceGainesvilleFL32684
7
Microsoft Access PRODUCTS ProductSupplierDescriptionUnitsCostPrice HatsHats, IncFeltEach$5.50$ 6.00 SocksSocks LimitedWoolPair$2.25$ 3.50 ShoesShoes Are UsWoodenPair$9.99$12.15 PursesBag for AllSilkEach$8.45$ 9.15
8
Microsoft Access SALES CustomerProductDateQty BIG CITY STORE SALES INVOICE Date Customer Name Customer Address Customer City, ST Zip ProductDescriptionQtyPriceTotal Name Address City State ZipProduct Supplier Description Units Cost PriceQtyDate
9
Microsoft Access SALES FirstLastStreet AddressCitySTZipProductSupplierAddressCitySTZipDateQty JackJohnson123 South Main StGainesvilleFL32608HatsHats, IncPO Box 123WaldoFL3265801/24/021 Jack bought a Hat on 1/24/02
10
Microsoft Access CUSTOMERS Cust #FirstLastStreet AddressCitySTZip C1JackJohnson123 South Main StGainesvilleFL32608 C2JillJones28000 SW 583 AveGainesvilleFL32597 C3JerryJacks2701 Wilson RoadGainesvilleFL32655 C4JohnJinks3243 SE 4th TerraceGainesvilleFL32684 PRIMARY KEY No Duplicates
11
Microsoft Access SALES CustomerProductDateQty Name Address City State ZipProduct Supplier Description Units Cost PriceQtyDate Cust# FOREIGN KEY Duplicates allowed Primary Key in Another Table
12
Microsoft Access CUSTOMERS Cust #FirstLastStreet AddressCitySTZip C1JackJohnson123 South Main StGainesvilleFL32608 C2JillJones28000 SW 583 AveGainesvilleFL32597 C3JerryJacks2701 Wilson RoadGainesvilleFL32655 C4JohnJinks3243 SE 4th TerraceGainesvilleFL32684 SALES CustomerProductDateQty Product Supplier Description Units Cost PriceQtyDate Cust#
13
Microsoft Access PRODUCTS Prod #ProductSupplierDescriptionUnitsCostPrice P1HatsHats, IncFeltEach$5.50$ 6.00 P2SocksSocks LimitedWoolPair$2.25$ 3.50 P3ShoesShoes Are UsWoodenPair$9.99$12.15 P4PursesBag for AllSilkEach$8.45$ 9.15 PRIMARY KEY No Duplicates
14
Microsoft Access SALES CustomerProductDateQty Product Supplier Description Units Cost PriceQtyDate Cust# Prod# FOREIGN KEY Duplicates allowed
15
Microsoft Access SALES QtyDateCust#Prod# What do we use for a Primary Key here? One way would be to have an auto number: CustomerProductDateQty QtyDateCust#Prod# SaleCustomerProductDateQty Sale#
16
Microsoft Access SALES QtyDateCust#Prod# What do we use for a Primary Key here? Another would be to have multiple key: CustomerProductDateQty QtyDateCust#Prod# CustomerProductDateQty This would assume that a customer would not purchase the same product twice in one day.
17
Microsoft Access Jack bought Hats Sales Customers C1 - Jack C2 - Jill C3 - Jerry C4 - John Products P1 - Hats P2 - Socks P3 - Shoes P4 - Purses C1, P1, Date, Qty Jill bought Purses C2, P4, Date, Qty Jill bought Shoes C2, P3, Date, Qty John bought Socks C4, P2, Date, Qty
18
Microsoft Access Big City Store Sales Database CUSTOMERS Cust# First Last Address City State Zip PRODUCTS Prod# Product Supplier Description Units Cost Price SALES Customer Product Date Quantity 11
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.