Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

10. Are you a. a leader? b. a follower? _______

Answered: 1 week ago