Question: Task 3: Write the appropriate SQL statement for the following with screen shots of the execution: (30 Marks) NOTE: please add your student ID to

 Task 3: Write the appropriate SQL statement for the following withscreen shots of the execution: (30 Marks) NOTE: please add your studentID to add to the column names to avoid similarity. Table name:

Task 3: Write the appropriate SQL statement for the following with screen shots of the execution: (30 Marks) NOTE: please add your student ID to add to the column names to avoid similarity. Table name: Country Column Name Data Type Constraint CountryID Integer Primary key CountryName Varchar Not null ContinentName Varchar Phone No Integer Table Name: Plant Column Name Data Type Constraint PlantID Integer Primary key PlantName varchar Not null Type varchar Should not be less than 0.0 cm Height Numeric(6,2) PlantedDate Date CountryID Integer References to country table a. Create country and Plant tables as per the above given structure. (12 marks) b. Create a view that will display the total number of plants per type. (6 Marks) C. Change the planted date of plants which belongs to creeper or climber type to 31st Aug. 2000. (6 Marks) d. Write a subquery to display the Plant ID, Plant name and continent name of all quotes that originates from the country Iran or Australia (6 Marks) Task 4: Consider Plant and Country tables given in task 3 and write the relational Algebra for the following tasks: NOTE: please add your student ID to add to the column names to avoid similarity. (30 Marks) a. Find all the information about Countries that belongs to the Asian continent. (6 Marks) b. Find the maximum height of plant for each type. (6 Marks) C. Find ID, name and type of all plants whose height is not more than 100 cm. (6 Marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!