I need help wiith this database questions, we have to create these thing down be
ID: 3663311 • Letter: I
Question
I need help wiith this database questions, we have to create these thing down below in pgModeler and need some help! thanks!
Tasks
1. Create the following reference tables:
a. Products
b. Versions
c. Employees
2. Create a table whose name is derived from its’ purpose. It is a table that tracks the combination of Products and Versions. It should contain 4 fields.
a. The Primary Key
b. An “Active” field that is a Boolean
c. A foreign key that references Products
d. A foreign key that references Versions
3. Create a table whose name is derived from its’ purpose. It is a table that tracks the products a company has available for sale. It should contain the following fields
a. The Primary Key
b. A product name (normally this would be “name”)
c. An “Active” field that is a Boolean, default value of true
d. A foreign key that references Product Versions
e. Description (This can hold a lot of text)
f. Suggested retail price (normally known as sell price or msrp). This is probably a numeric that contains 7 digits with 2 reserved for decimal precision.
g. Maximum discount. This is probably a numeric that contains 5 digits with 2 reserved for decimal precision.
h. Minimum sell quantity. This should probably be an integer of some sort.
4. Create a table that has to do with orders. It should have the following fields:
a. The primary key
b. An order timestamp, default value of “now()”
c. A timestamp that contains when the order was shipped
d. A foreign key that references Employees
5. Create a table that has to do with the products in an order. This would normally be called a derivative of “Order Lines”. It should have the following fields: WEEK 3 – DIAGRAMMING 1 8
a. The primary key
b. A foreign key that references order
c. A foreign key that references Sellable Products
d. Quantity field. This is probably an integer that has a check constraint of greater than 0.
e. A sell price field. This is probably a numeric that contains 7 digits with 2 reserved for decimal precision. It also should have a check constraint of greater than 0.
f. Extended Price. This is probably a numeric that contains 8 digits with 2 reserved for decimal precision
Explanation / Answer
Task-1 (Create the following reference tables)
a. Products
b. Versions
c. Employees
Task-2(Create a table whose name is derived from its’ purpose. It is a table that tracks the combination of Products and Versions. It should contain 4 fields.)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.