1consider the relations supplierssid sname rating


1-Consider the relations:

Suppliers(SID, Sname, Rating)

Parts(PID, Pname, Color)

Catalog( SIDPID, Cost)

Use relational algebra language to answer the following queries:

Query 1: Retrieve SIDs of Suppliers whose rating > 10.

Query 2: Retrieve SIDs of Suppliers who supplied red parts.

Query 3: Retrieve Sname of Suppliers who supplied red parts.

2- Consider the following relations:

Student(ssn, name, address, major)

Course(code, title)

Registered(ssn,code)

Use relational algebra language to answer the following queries:

Query 1: List the codes of courses in which at least one student is registered (registered courses).

Query 2: List the titles of registered courses (of those in query 1).

Query 3: List the codes of courses for which no student is registered.

Query 4: The titles of courses for which no student is registered.

Query 5: The number of courses, which are registered for each ssn

3. Give an example of 3 relations illustrating primary keys and foreign keys.

Use your example for a simple Relational algebra query.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: 1consider the relations supplierssid sname rating
Reference No:- TGS02682231

Now Priced at $15 (50% Discount)

Recommended (99%)

Rated (4.3/5)