Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ER TO SQL In this assignment, you will be implementing queries on the database you have created for HW Assignment #2 using SQL. Implement the

ER TO SQL
In this assignment, you will be implementing queries on the database you have created for HW Assignment #2 using SQL.
Implement the following types of queries in SQL (at least 2 queries for each category):
(a) retrieve all the tuples of a relation. Display all the attribute values.
(b) retrieve all the tuples of a relation. Display some but not all attribute values.
(c) retrieve the tuples that satisfy some condition.
(d) retrieve the tuples that satisfy some condition. Query should include the LIKE operator.
(e) retrieve the tuples that satisfy some condition. Output should be sorted sorting on a single attribute.
(f) retrieve the tuples that satisfy some condition. Output should be sorted sorting on more than one attribute.
(g) implement a query that groups a relation on a specific attribute, and applies SUM, COUNT, MIN, MAX aggregate functions on each group.
1
I Implement the following types of queries in SQL (at least 2 queries for each category):
(a) a JOIN combining 2 relations.
(b) a JOIN combining 3 relations.
(c) a CROSS JOIN
(d) A SELF JOIN (if it makes sense for your database).
Implement the following types of queries in SQL (at least 2 queries for each category):
(a) a Subquery.
(b) a Corelated Subquery. (c) UNION.
(d) UNION ALL.
(e) INTERSECT.
(f) EXCEPT
2
Each query should make some sense.
For each query,
define the query in English. (e.g. what does it retrieve?)
specify how it can be implemented Using SQL. (write the query in sql)
image text in transcribed
M person: lastName, FirstName, DOB, SNO Vet: Employce ID, SSNO 200 keeper: Employee IO, SIN, Cog Nos Supervisor Customes: ypaulen Lage No)SINO Arnal: Vet EmployezKwatssko Coveno, age, gender, gerus Drugs: yet Employse Avetismo, Drug EP, drughoe wage No , ID ID Cages CasinosblockNo, Zookeeper Emped , Vitthon

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

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

design a simple disciplinary and grievance procedure.

Answered: 1 week ago