Examplessumavgcountminmax

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ons are functions that take a set of values and that yield a single value in a result tuple. Examples: sum, avg, count, min, max 4. What is a 1 : m relationship set R between two entity sets E1 and E2? Each member of E1 can be associated with any number of members from E2. However, each member of E2 can be associated with only one member of E1. 5. What is generalization? “Factoring” (extracting) properties (attributes, relationships) of similar entity subclass, subtypes, categories) to a common superclass. Exercise 2 (Relational Algebra) [30pts] Consider the following schema: Suppliers(sid: integer, sname: string, address: string) Parts(pid: integer, pname: string, color: string) Catalog(sid: integer, pid: integer, cost: real) Write the following queries in relational algebra 1. Find the names of suppliers who supply some red part. psname(psid((ppidscolor=’red’ Parts) Catalog) Suppliers) 2. Find the sids of suppliers who supply some red or green part. psid(ppid(scolor=’red’∨color=’gr...
View Full Document

Ask a homework question - tutors are online