Cs 403 assignment no 3 fall 2022 by vu university

Assignment # 3 (CS403)
Solution:
1. Create a table named Booking. You also have to define theprimary key
and foreign key (if any).
Answer:
CREATE TABLE Booking (
bookingId INT, bookingdate
DATE, driverOption VARCHAR,
PRIMARY KEY (bookingId)
FOREIGN KEY (driver) REFERENCES Driver (License No)
);
2. Create a table named Agreement. You also have to definethe primary key
and foreign key (if any).
Answer:
CREATE TABLE Agreement
AgreementId INT,
Duration INT, Rentfee
Decimal, ReturnDate
DATE,
(
PRIMARY KEY (AgreementId)
);
3. Show he age, Name, and Address of the Driver: and makesure that selected
column should not contain any duplicatedvalues.
The syntax for selecting SQL:
SELECT column1, column2, …FROM
table_name;
Answer:
SELECT DISTINCT Age, Name,AddressFROM
Driver;
4. Change the Data type of Feedback_desc column fromvarchar (100)
to Text in Feedback table.
The syntax for changing data type:
ALTER TABLE Table-name
ALTER COLUMN Column datatype;
Answer:
ALTER TABLE Feedback, ALTER
Column Feedback-descText;
5. Insert one record in Agreement table having data againsteach column
(Agre_Id: 01, Duration: 2 days, Fuel: 5 litter, Rent_fee: 5000, Return_date:
15/03/2022).
Syntax for Inserting data;
INSERT INTO table name (column 1,
column2,……); VALUES (value 1,
value2……);
Answer:
INSERT INTO Agreement (Agree id,
Duration, Fuel, Rentee)Return-date)
VALUES(01,2,500, ‘15/03/2022’);
6. Delete columns Bk_Date and Driver_option from tableBooking.
Syntax for Deleting Columns:
ALTER TABLE Table name
DROP COLUMN Coulmn 1,column 2,…;
Answer:
ALTER TABLE Booking DROP
COLUMNS BK-Date;
Driver-option;
7. Show the Name in Upper case latter and Contact_No ofthose customers
whose ages are between 30 to 60 from Customer table.
Syntax to converts a string to upper-case.
SELECT UPPER(Column1, column2….)FROM
Table-name;
Answer:
30

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with StudyAcademia.com
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat