Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2010
    Posts
    2

    Unanswered: How to do creations of composit and multivalued attributes

    Hello!.......I'm studying in 5th sem...I'm working on a DBMS project "Color analysis".....can anyone please tel me how to do creations of composit and multivalued attributes?
    Last edited by Rashmi.B.K; 09-11-10 at 04:27.

  2. #2
    Join Date
    Feb 2004
    Location
    Bangalore, India
    Posts
    250
    could you please elaborate the requirements?
    Cheers....

    baburajv

  3. #3
    Join Date
    Sep 2010
    Posts
    2
    Ya....In my project we have composite & multivalued attributes in tables.....how can we represent these in creation of tables???can we do this in MySql 5.0????
    Last edited by Rashmi.B.K; 09-13-10 at 08:45.

  4. #4
    Join Date
    Feb 2004
    Location
    Bangalore, India
    Posts
    250
    if i understand the requirement correctly, my suggestion is to go for an INT column where each bit represents a specific value.

    consider the following example of colors

    R G B Numeric Value
    1 1 1 7
    1 1 0 6
    1 0 1 5
    1 0 0 4
    0 1 1 3
    0 1 0 2
    0 0 1 1
    0 0 0 0

    If we have to represent these color combination in a single column,

    7 represents the combination where R,B and G are 1 whereas
    4 represents the combination where R=1 and G and B are 0s.

    If we define the bit positions for each of the composite attributes, a BIT wise OR of values can be stored in the column which represents the combination..

    let me know if this solves your problem
    Cheers....

    baburajv

Posting Permissions

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