MESSAGE
DATE | 2014-12-11 |
FROM | Ruben Safir
|
SUBJECT | Subject: [LIU Comp Sci] Fwd: turning attibute values into relations?
|
From owner-learn-outgoing-at-mrbrklyn.com Thu Dec 11 11:41:12 2014 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: by mrbrklyn.com (Postfix) id AD87F161163; Thu, 11 Dec 2014 11:41:12 -0500 (EST) Delivered-To: learn-outgoing-at-mrbrklyn.com Received: by mrbrklyn.com (Postfix, from userid 28) id 931C6161166; Thu, 11 Dec 2014 11:41:12 -0500 (EST) Delivered-To: learn-at-nylxs.com Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by mrbrklyn.com (Postfix) with ESMTP id 57B5D161162; Thu, 11 Dec 2014 11:41:10 -0500 (EST) Received: from [10.0.0.42] (unknown [96.57.23.82]) by mailbackend.panix.com (Postfix) with ESMTPSA id 333BB139A4; Thu, 11 Dec 2014 11:41:09 -0500 (EST) Message-ID: <5489C92A.7040408-at-panix.com> Date: Thu, 11 Dec 2014 11:41:14 -0500 From: Ruben Safir User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: learn-at-nylxs.com, hangout Subject: [LIU Comp Sci] Fwd: turning attibute values into relations? References: <5489C901.7040301-at-mrbrklyn.com> In-Reply-To: <5489C901.7040301-at-mrbrklyn.com> X-Forwarded-Message-Id: <5489C901.7040301-at-mrbrklyn.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: owner-learn-at-mrbrklyn.com Precedence: bulk Reply-To: learn-at-mrbrklyn.com
I know that usenet is bad for homework but this problem is driving me crazy
I need some expertise outside my current ring of contacts.
This question is (e) Retrieve the names of employees who work on every project
Which I think is saying find the employees that work on ALL projects.
How do you turn a relationship into an atribute that can be quried on
This is the relavent relations (tables) SQL> descr employee Name Null? Type ----------------------------------------- -------- ---------------------------- FNAME NOT NULL VARCHAR2(20) MINIT CHAR(1) LNAME NOT NULL VARCHAR2(20) SSN NOT NULL NUMBER(9) BDATE NOT NULL DATE ADDRESS NOT NULL VARCHAR2(50) SEX NOT NULL CHAR(1) SALARY NOT NULL FLOAT(12) SUPERSSN NUMBER(9) DNO NUMBER(2)
SQL> descr PROJECT Name Null? Type ----------------------------------------- -------- ---------------------------- PNAME NOT NULL VARCHAR2(20) PNUMBER NOT NULL NUMBER(2) PLOCATION NOT NULL VARCHAR2(15) DNUM NUMBER(2) SQL> descr works_on Name Null? Type ----------------------------------------- -------- ---------------------------- ESSN NOT NULL NUMBER(9) PNO NOT NULL NUMBER(2) HOURS FLOAT(5)
So you want a query that includes off the essn's in workson that associated with all the possible pno and match pnumbers in projects.
I tried this in SQL and in relational algebra and I can't see a path to a solution.
Ruben
|
|