guidance on the SQL syntax to create a new db, including tables
Oracle SQL
Any guidance on the SQL syntax to create a new db, including tables:
CUSTOMERS
CustomerID
Lname
Fname
Email
PURCHASES
PurchaseOrder#
CustomerID
PurchaseDate
Quantity [purchased]
ORDERCOST
PurchaseOrder#
PurchaseDate
GoodsID
Quantity
CostPer
CUSTOMERTYPE
PurchaseOrder#
Retail
Commercial
Domestic
International
There are a total of five clients.
Client1
Client2
Client3
Client4
Client5
Client1:
lname: Laoudy
fname: Penfield
email: s..7@gmail.com
CustomerID: 482431912
customertype: Commercial
purchases:
purchaseID: 131, purchased GoodsID: ABC quantity 1000 at $50.00 each
purchaseID: 132, purchased GoodsID: DEF, quantity 100 at $250.00 each
purchaseID: 133, purchased GoodsID: XYZ, quantity 50 at $750.00 each
Client2:
lname: Brown
fname: Jimmy
email: k..3@yahoo.com,
CustomerID: 121349313,
customertype: Retail
purchases:
purchaseID: 134, purchased GoodsID: ABC quantity 100 at $50.00 each
purchaseID: 135, purchased GoodsID: DEF, quantity 10 at $250.00 each
purchaseID: 136, purchased GoodsID: XYZ, quantity 5 at $750.00 each
Client3:
lname: Klide
fname: Bonnie
email: b..1@hotmail.com
CustomerID: 121349314,
customertype: Domestic
purchases:
purchaseID: 137, purchased GoodsID: ABC quantity 100 at $50.00 each
purchaseID: 138, purchased GoodsID: DEF, quantity 10 at $250.00 each
purchaseID: 139, purchased GoodsID: XYZ, quantity 5 at $750.00 each
Client4:
lname: Choade
fname: Benjamin
email: b..1@hotmail.com
CustomerID: 121349315,
customertype: International
purchases:
purchaseID: 140, purchased GoodsID: ABC quantity 10 at $50.00 each
purchaseID: 141, purchased GoodsID: DEF, quantity 10 at $250.00 each
purchaseID: 142, purchased GoodsID: XYZ, quantity 1 at $750.00 each
Client5:
lname: Lunberg
fname: Pandy
email: &..7@gmail.com
CustomerID: 121349316,
customertype: International
purchases:
purchaseID: 143, purchased GoodsID: ABC quantity 2 at $50.00 each
purchaseID: 144, purchased GoodsID: DEF, quantity 1 at $250.00 each
purchaseID: 145, purchased GoodsID: XYZ, quantity 1 at $750.00 each
Thank you
Step by step
Solved in 2 steps