Create The Movie Database With The Following Relation Schema Where The Primary Keys Are Underlined
Create The Movie Database With The Following Relation Schema Where The Primary Keys Are Underlined
XAVIER’S COLLEGE
MAITIGHAR, KATHMANDU, NEPAL
Phone: 01-5321365, 01-5344636
Email: [email protected]
d. Modify the table client_info by changing the type varchar of client_address column to text
ans
Query:
SELECT * FROM `cilent_info` WHERE client_id=3;
OUTPUT
j. Display all records from table client_info table in descending order.
SELECT * FROM `cilent_info` WHERE 1
order by client_name desc;
OUTPUT
OUTPUT
l. Update client_name, client_address, contact_no using update command of at
least
one client.
Ans;
SELECT * FROM `cilent_info` WHERE 1;
update cilent_info
set client_name='Ramesh'
where client_id=2;
OUTPUT
CONCLUSION
In conclusion, managing a database effectively involves a series of systematic steps to ensure
data integrity and accessibility. Initially, a database named clients was created to store client
information. Within this database, a table called client_info was established, featuring columns
for client ID, name, address, and date of purchase. The table was subsequently modified to
include a contact_info column and to change the client_address column's data type to text for
greater flexibility. Additionally, the client_address column was removed to streamline the
dataset. Five records were then inserted into the client_info table, ensuring a diverse set of client
information. Queries were executed to display all records, fetch specific records, and sort data in
both ascending and descending order, demonstrating the ability to retrieve and manipulate data
efficiently. Updates to the contact_info and other columns showcased the capability to maintain
up-to-date client records. Overall, these operations highlight the essential database management
tasks necessary for maintaining an organized and accessible client database.
My laptop couldn’t open xamp so fom question , I have taken help from my friends work.