Professional Documents
Culture Documents
1689090777238
1689090777238
Anu has created the following relations in database Travels by providing Primary Key –
Foreign Key relationship.
Table: booking
Table: Flights
(a) Write command used to select ‘sport’ database to perform SQL operations into that database.
(b) Write a command to increase number of matches played for ‘MI’ and ‘KKR’ by 1
(c) Write a command to display details of teams having negative NRR.
(d) What will be the most appropriate data type for NRR column?
(e) Which column would be most suitable for primary key?
(a) What is primary key and foreign key in the above table?
(b) What is degree of natural join of above tables?
(c) Write a command to display products sold at Delhi.
(d) What will be the most appropriate data type for P_ID column?
(e) Write a command to insert a new row in ‘Product’ table with following data
P_ID = PP02, ProductName = “Body Wash”, Manufacturer = “PQR”. The price of the item is not yet
finalised so need to be NULL.
A department is considering to maintain their worker data using SQL to store the data. As a
database administer, Karan has decided that :
e) Write a query to display the Structure of the table WORKER, i.e. name of the attribute and their
respective data types.