American Intercontinental University SQL Database Project
Description
- Use the cis305 database you previously created.
- Create a new table named PRODUCT. The product table will have two attributes;
- product ID as integer, not null, and a primary key constraint set to unique.
- product description as varchar(30), not null specification.
- When you have created the new table, copy and paste your T-SQL into your assignment submission.
- Next, write T-SQL to alter the booth table and the machine table to add a product id attribute, type integer to each table.
- When the fields have been successfully added to each table, copy and paste your T-SQL into your assignment submission.
- Lastly, use the following two sets of insert statements to insert data into the product table and the booth table.
use cis305;
insert into dbo.product(product_id, product_desc)
values(1, ‘Chips’);
insert into dbo.product(product_id, product_desc)
values(2, ‘Cola’)
insert into dbo.product(product_id, product_desc)
values(3, ‘Energy Drink’);
insert into dbo.product(product_id, product_desc)
values(4, ‘Chocolate Bar’);
go
insert into dbo.Booth(booth_product, booth_price, product_id)
values(‘Chips’, 1.5, 1);
insert into dbo.Booth(booth_product, booth_price, product_id)
values(‘Cola’, 1.25, 2);
insert into dbo.Booth(booth_product, booth_price, product_id)
values(‘Energy Drink’, 2, 3);
Using the insert statements for the booth table, write insert statements to insert the following values into the machine table for the machine product, machine price, and product id fields respectively:
‘Chips’, 1.5, 1
‘Chocolate Bar’, 1.25, 4
‘Energy Drink’, 2, 3
Once you have completed your assignment, copy and paste the script into a Word document and submit it.
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."