vault backup: 2024-01-26 10:35:31

This commit is contained in:
2024-01-26 10:35:31 +00:00
parent 14b75ba16c
commit a068c9f67f
12 changed files with 106 additions and 30 deletions

View File

@@ -76,3 +76,27 @@ AND sailors.rating=7;
```
![](Pasted%20image%2020240123164006.png)
# Workshop
Count number of tuples in the following relations:
1. Products
![](Pasted%20image%2020240126101329.png)
2. Suppliers
![](Pasted%20image%2020240126101454.png)
How many suppliers does each product have?
Many suppliers to many products
Write SQL queries which count the number of tuples in each of the following algebraic statements.
1. The relation created by products x suppliers
![](Pasted%20image%2020240126103004.png)
2. The relation created by Products theta Products.SupplierID=Suppliers.SupplierID Suppliers
![](Pasted%20image%2020240126102902.png)
For each of the following write a description of the data it will retrieve and execute a single SQL statement which retrieves this data from the database
1. This will return the product name of all products shipped from Manchester.
2. This will return the same as the first, but be more efficient.
3. This will return the city of all employees that live in the same city as a customer.