SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Rusted & Weathered HumanClay's Avatar
    Join Date
    Sep 2000
    Location
    Milwaukee, WI
    Posts
    225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I'm reading the documentation on MySQL site and am a bit fuzzy...

    The difference between SET and ENUM is that with SET you can have multiple values, but with ENUM, the object only gets one value?

    Is this right?

    Also, in my discography database, I am making a field to specify different types of albums.

    AlbumType:
    - Standard Release
    - Promotional Release
    - Video Release
    - Bootleg
    - etc.

    Would I use the ENUM type for this?

    Finally, I am making one table to store the album information, and one table for song information. In the song table I have a field that specifies which album the song is on. Is this correct: in a form, I would use PHP code such as what is listed on this URL: http://www.thickbook.com/extra/php_loopoption.phtml to create a drop down menu containing the different albums so I can choose which album a particular song is on??
    Steve Caponetto - [profile] [e-mail]
    CreedFeed.com - feed your need for Creed!

  2. #2
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hello HumanClay,
    You will probably prefer to choose enum because there is only one option for album type if i am not wrong.
    If an album can include more than one type then you will use set.

    About your database structure, I would have 3 tables
    one for album(albumid, albumname,....)
    one for songs(songid, songname,....)
    one for between album and songs(albumid,songid)

    Because one song can belong to more than one album.
    If you use only 2 tables you will have dublicated songs in your song table.


    Great Dane
    Gokhan ARLI


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
  •