Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2012
    Posts
    1

    Relational database schema (relational calculus)

    SUPPLIERS = {sid, sname, address} with key {sid}
    PARTS = {pid, pname, color} with key {pid}
    CATALOG = {sid, pid, cost} with key {sid, pid} and foreign keys
    [sid] ⊆ SUPPLIERS[sid] and [pid] ⊆ PARTS[pid]

    Here is the question:
    Find the pids of parts supplied by at least two different suppliers.

    Can anyone explain how to do it? and give an answer please.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Quote Originally Posted by yli375 View Post
    Can anyone explain how to do it?
    Certainly.
    Quote Originally Posted by yli375 View Post
    and give an answer please.
    Why would we do that? You might apply to work for one of us. If we do your homework now and you appear to pass the class, then we'll end up doing your homework at least until we either fire you or train you.

    I'm not willing to sign up for that gig.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Feb 2012
    Posts
    76
    The trick is to use a join.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •