SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Theory question: how to work out Active Domain?

    Hi, I've got some theory questions regarding database and haven't been able to figure them out, hope someone here can help me out.

    How do I work out the Active Domain of a relation?

    Example:

    Code:
     dom(A) = {a1, a2}
     dom(B) = {b1, b2, b3}
     dom(C) = (c1, c2}
     R = ABC
     
     r(R)
     A  B  C
     --------
     a1 b1 c1
     a1 b2 c1
     a2 b1 c2
     
     dom(R)
     A  B  C
     --------
     a1 b1 c1
     a1 b1 c2
     a1 b2 c1
     a1 b2 c2
     a1 b3 c1
     a1 b3 c2
     a2 b1 c1
     a2 b1 c2
     a2 b2 c1
     a2 b2 c2
     a2 b3 c1
     a2 b3 c2
    In this example, I THINK the active domain ends up being all the tuples in dom(R) without b3 in it, but I have no idea why.

    Also, if ~r is dom(R) - r, and active complement is adom(R) - r, what's meant by "if |~r| > |r| then the active complement can be used as a storage compression device"?
    Work smarter, not harder. -Scrooge McDuck

  2. #2
    SitePoint Guru asterix's Avatar
    Join Date
    Jun 2003
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Someone should move this thread to the .NET forum...

  3. #3
    SitePoint Guru asterix's Avatar
    Join Date
    Jun 2003
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oops, please ignore previous post! Totall wrong thread for it

  4. #4
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Heh, I've solved it already anyway.
    Work smarter, not harder. -Scrooge McDuck

  5. #5
    SitePoint Guru asterix's Avatar
    Join Date
    Jun 2003
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So tell us your answer then!

  6. #6
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Active Domain's basically the same as domain (dom(R) in the diagram), but using only values in r. In this case, using all the values except for b3, because that didn't appear in r(R).

    That means while dom(R) has 12 rows, adom(R) only has 8 rows i.e., all the ones in dom(R) that doesn't contain b3.
    Work smarter, not harder. -Scrooge McDuck


Bookmarks

Posting Permissions

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