Create the physical design for your final project database (tables, fields, relationships, constraints, default values, and indexes).
Question:
Create the physical design for your final project database (tables, fields, relationships, constraints, default values, and indexes). Generate (dump) an SQL script with your completed physical database.
- Recommended using INT or VARCHARdata typeas the primary key field. VARCHAR for descriptive character fields.
- Be sure to include (and save) relationships between the tables (PRIMARY KEY, FOREIGN KEY, REFERENCES).
- Begin to research what data and data types you would like to include in your tables. Data types define what kind and range of data can be stored in a given field (or column). The size of your data doesn't just impact storage size and costs, it also affects query performance.
- A key factor in determining the size of your data for Part 2 is the data type that i select the database that is used is
Customer (CustomerID PK, FirstName, LastName, Email, Phone, address1, address2, city, stateID (FK), zip)
Order (OrderID PK, OrderDate, CustomerID, ShippingID, EmployeeID)
Product (ProductID PK, ProductName, ProductDescription, CategoryID, Price, Quantity)
Payment (PaymentTypeID, PaymentDate, Amount)
OrderPayment (OPID, OrderID (FK), PaymentID (FK), Amount, PaymentDate)
Category (CategoryID PK, CategoryName, CategoryDescription)
Employee (EmployeeID PK, FirstName, LastName, Email, Phone, Position, address1, address2, city, stateID (FK), zip)
ShippingOrder(SOLD, ShippingID (FK), ShippingDate, TrackingNumber)
City(CityID (PK), CityName)
State(stateID, statename)
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi