Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started