Question
Please help with figuring out how to write in Oracle SQL the following for the data provided below: Create a list of all table combinations
Please help with figuring out how to write in Oracle SQL the following for the data provided below:
Create a list of all table combinations that are linked by a one-to-many relationship.
Identify data types and constraints for each attribute.
Develop the SQL CREATE TABLE statements required to create the tables based on the UML class diagram.
The create statement must include all attributes, primary keys, and foreign keys (on the many side of all one-to-many relationships you identified).
Include any additional constraints you think are appropriate with a justification for the inclusion of each constraint. Additional constraints include NOT NULL, DEFAULT, CHECK or UNIQUE.
Here is what I have so far, please write it as a code and explxain the code
customer customer_id(primary key) customer_first_name customer_last_name
customer_street
customer_city
customer_state
customer_zip customer_email
customer_phone#
product product_id(primary key) product_name
product_size
product_price product_weight
order_state order_state_id(primary key) order_state_name
order_distance
order_date
order order_id(primary key) customer_id(foreign key of customer table) order_date order_state_id(foreign key of order_state table) order_shipping_date order_delivery_date warehouse_id(foreign key of warehouse table)
warehouse warehouse_id(primary key) warehouse_name warehouse_location
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started