0% found this document useful (0 votes)
12 views3 pages

Term2 Practical File Questions

Uploaded by

rudrakshah2007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Term2 Practical File Questions

Uploaded by

rudrakshah2007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Set 1 – Based on Database Basic Commands

Write SQL Commands for following:


1. Create a database named practical_2025
2. Check database is present or not in the list of databases
3. Open a database
4. Create a database temp
5. Delete a database temp
Set 2 – Based on DDL Commands
Consider the following MOVIES table and write the SQL commands based on it.

1. Create above table, assign Movie_ID as a primary key and insert records as
above.
2. Show the structure of table
3. Add a column named collection with decimal data type with structure 12, 2
4. Change the data type of movie_id to varchar
5. Rename a column MovieName to MName

Set 3 – Select queries including order by


1. Display the movie name, type, releasedate and total cost of all movies
2. Display all details of action and thriller movies
3. Display movie name, types and releasedate of all movies released in the
month of February, 2022
4. Display the details of movies whose name ends with letter k.
5. Display the details of movies which is not released yet
6. Display the movie name type release date and production cost in the
descending order of production cost
Set 4 – Group by, having and aggregate functions
1. Display the number of movies for each type
2. Display the number of unique movies
3. Display the maximum production cost for each movie type
4. Display the date of movies released latest
5. Display the average business cost of movies for each type
6. Display the type and number of movies for each type where movie type is
more than two

Set 5 – Join Queries


Create two tables as follows and write given queries below:

Table – Song

1. Display the cartesian product of artist and song tables


2. Display the records of artist and song using equijoin.
3. Display the records of artist and song tables using natural join.
4. Display artist name, label and songs of sony music company.
5. Display artist name, song name from artist and song which song starts
with ‘p’.
Part C – Python & MySQL Connectivity Programs
Chapter 14 – Interface Python with MySQL
1. Write a program to connect with mysql database and insert a record into
database.
2. Write a program to connect with mysql database and update a record into
database.
3. Write a program to connect with mysql database and delete a record into
database.
4. Write a program to connect with mysql database display record of particular
label under the artist is working.

You might also like