S

S

  • NA
  • 381
  • 97.7k

Simple one for a DBA

Apr 6 2012 5:12 AM
Hi

I am designing and implementing an E-Commerce solution and needed a pointer on table constraints

I have the following tables

Category

CategoryId PK
CategoryName 
Description
Version

CustomerEntity

CustomerId PK
CustomerName
City
Country
Version

Product

ProductId
CategoryId 
ProductName
UnitPrice
UnitsInStock
Version

Order

OrderId
CustomerId
OrderDate
Version

OrderDetails

OrderId
ProductId
UnitPrice
Quantity
Version

Given the above I would like to implement a shopping cart table but do not know what columns to have nor what tables to reference with a Foreign Key?

Thanks

Answers (5)