Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Attribute Name Sample Value Sample Value Sample Value Sample Value Sample Value INV _ NUM 1 0 0 1 1 0 0 2 1 0

Attribute
Name Sample Value Sample Value Sample Value Sample Value Sample Value
INV_NUM 10011002100310041005
PROD_NUM 123-21UUY, SRE-657UG QER-34256 SRE-657UG,
ZZX/3245Q SRE-657UG,
'001278-AB' ZZX/3245Q
SALE_DATE '2022-3-8''2022-3-8''2022-3-8''2022-3-9''2022-1-16'
PROD_DESC Houselite chain saw, Rat-tail file Sledge hammer Rat-tail
file,
Steel tape Rat-tail file, claw hammer Steel tape
VEND_CODE 235,232231232,235232,231235
VEND_NAME Shelly
K.
Smithson,
Annelise Crystall James Johnson Annelise
Crystall, Shelly
K.
Smithson,
James
Johnson Arthur Jones
QUANT_ SOLD 1,311,21,21
PROD_PRICE $189.99, $2.9918.63 $6.79,52.99 $12.95,2.99 $2.99
1. Remove all partial dependencies, and draw the new dependency diagrams. Identify the normal forms for each
table structure you created. Remove all transitive dependencies, write the relational schema, and draw the
new dependency diagrams. Also identify the normal forms for each table structure you created.
2. Draw the dependency diagrams that are in 3NF.(Hint: You might have to create a few new attributes. Also
make sure that the new dependency diagrams contain attributes that meet proper design criteria; that is,
make sure there are no multivalued attributes, that the naming conventions are met, and so on.)
3. Create the database and insert data as per Table 1 and additional data for the sake of completeness.
4. Formulate and execute the following queries.
i. Write a query to display product Prod_code, Prod_QOH and Prod_PRICE for all the products where
price is greater than 200.
ii. Write a query to display prod_num of products that are supplied by VEND_CODE between 230 and
234.
iii. List all the products in products table in descending order of the price
iv. Using the 'PRODUCT' table as a reference, construct a SQL query to calculate the total value of the
products currently in inventory (name the column as Tot_worth.
v. Display name of VENDOR who supplied product '123-21UUY'.
vi. Write a single query that will double the price of product supplied by vendor whose name is 'James
Johnson.(Note: you have to strictly use SUBQUERY to extract vendor code based on vendor name
and use vend_code to update the price)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

1. Try oral, open-book, or group tests.

Answered: 1 week ago