SQL
SQL
* The table(tbl_UserProfile) should have columns for UserID, FullName, Email, MobileNumber, and
Password.
- User_ID
- FullName
- Rec_Address
- Email (Unique)
- MobileNumber
- Password
- Role
* Set the UserID column as the primary key.
* Create the table script as an .sql file.
* Save it as a users.sql file.
Prepare a SQL query which validate the user credentials from the corresponding user table and return
a boolean flag with Role.
Input
* User Name
* Password
Output (if Exists)
* Role
* User Name
* Password
Prepare a SQL query to create table to store the booking information
- Booking_ID
- User_ID
- Rec_Name
- Rec_Address
- Rec_Pin
- Rec_Mobile
- Par_Weight_Gram
- Par_Contents_Description
- Par_Delivery_Type
- Par_Packing_Preference
- Par_PickupTime
- Par_DropoffTime
- Par_ServiceCost
- Par_PaymentTime
- Par_Status
Prepare a SQL query which inserts the booking details into the table.
- User_ID
- Rec_Name
- Rec_Address
- Rec_Pin
- Rec_Mobile
- Par_Weight_Gram
- Par_Contents_Description
- Par_Delivery_Type
- Par_Packing_Preference
- Par_PickupTime
- Par_DropoffTime
- Par_ServiceCost
- Par_PaymentTime
These information need to save to the DB and BookingID need to be auto generated.
Prepare an SQL query to fetch the information based on the booking ID
-Booking ID
-Receiver Name
-Receiver Address
-Receiver Pin
-Receiver Mobile
-Parcel Weight(g)
-Parcel Contents Description
-Parcel Delivery Type
-Parcel Packing Preference
-Parcel Pickup Time
-Parcel Dropoff Time
-Parcel Service Cost
-Parcel Payment Time
Prepare an SQL query which result the ten latest booking by a particular user, below fields need to be
resulted
Booking ID | FullName | Address | Rec_Name | Rec_Address | Date of Boooking |Par_Status
Prepare SQL query to retrieve the below details based on the Booking ID.
Booking ID | FullName | Address | Rec_Name | Rec_Address | Date of Boooking |Par_Status |
Par_PickupTime | Par_DropoffTime
Prepare SQL query to update the Pick and Drop time based on the Booking ID.
Prepare SQL Query to retrieve the delivery status of the Parcel based on the Booking ID and display the
below items
Booking ID | FullName | Address | Rec_Name | Rec_Address | Date of Boooking |Par_Status |
Prepare SQL Query to update the delivery status of the Parcel based on the Booking ID
Prepare and SQL query to retrieve the below booking history information
Customer ID | Booking ID | Booking Date | Receiver Name | Delivered address | Amount |Status