![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've created a db model that represents a collection of one artist albums/records/cd/ep/lp/dvd/. The basics are as following: 1 record contains 1 or multiple discs (i.e: one record can contain 2 cd's + 1 dvd) 1 disc contains 1 or multiple tracks and 1 track could be in more then 1 disc In the case of a CD or DVD, they contain one side with tracks. In the case on an EP or LP, the disc contains 2 sides (usually side a, side b) each side could contain tracks... By default a cd and dvd always contain one side with tracks. An EP, LP always contain 2 sides with tracks and sometimes one side can have no tracks (i.e. a promotional EP with only one side having tracks) ---- the tables are as following: table: album (albumid, name, ...) table: disc (discid, albumid, disc_pos_in_album) table: track (trackid, title, duration, ...) table: disc_track (discid, trackid, track_number_in_disc) The question is how to represent sides in a disc that contains side a and/or side b? Should the 'sides' info go in the table 'disc' or the table 'disc_track' or should i create another table that represents sides of a disc? Thanks Marco |
#3
| |||
| |||
|
|
the tables are as following: table: album (albumid, name, ...) table: disc (discid, albumid, disc_pos_in_album) table: track (trackid, title, duration, ...) table: disc_track (discid, trackid, track_number_in_disc) The question is how to represent sides in a disc that contains side a and/or side b? Should the 'sides' info go in the table 'disc' or the table 'disc_track' or should i create another table that represents sides of a disc? Thanks Marco I think "side" should go in disk_track. A song could be on Side A or Side B of a particular disk, and Side A track 1 is different from Side B track 1. Also, there is no technical reason why a CD or DVD can't have 2 sides. But they don't, just like music CD's generally don't have more than an LP's worth of songs on it (although it could handle quite a bit more). |
#4
| |||
| |||
|
|
On Wed, 01 Sep 2010 22:48:57 -0400, Jerry Stuckle jstucklex (AT) attglobal (DOT) net> wrote: the tables are as following: table: album (albumid, name, ...) table: disc (discid, albumid, disc_pos_in_album) table: track (trackid, title, duration, ...) table: disc_track (discid, trackid, track_number_in_disc) The question is how to represent sides in a disc that contains side a and/or side b? Should the 'sides' info go in the table 'disc' or the table 'disc_track' or should i create another table that represents sides of a disc? Thanks Marco I think "side" should go in disk_track. A song could be on Side A or Side B of a particular disk, and Side A track 1 is different from Side B track 1. Also, there is no technical reason why a CD or DVD can't have 2 sides. But they don't, just like music CD's generally don't have more than an LP's worth of songs on it (although it could handle quite a bit more). As long as there isn't going to be another kind of descriptor in the future. You could perhaps a envisage a CD with layers. Another table may be required. I think there is a bit more work to do on this. It's not so common these days but albums were once released in many formats, cassette, vinyl, 8 track, CD, DVD. In future they may be released on SD card , download only or some other medium. So you may need a table called format table: format (format_id, description, ... format_id would be a foreign key in disc |
#5
| |||
| |||
|
|
Also, there is no technical reason why a CD or DVD can't have 2 sides. But they don't, just like music CD's generally don't have more than an LP's worth of songs on it (although it could handle quite a bit more). As long as there isn't going to be another kind of descriptor in the future. You could perhaps a envisage a CD with layers. Another table may be required. I think there is a bit more work to do on this. It's not so common these days but albums were once released in many formats, cassette, vinyl, 8 track, CD, DVD. In future they may be released on SD card , download only or some other medium. So you may need a table called format table: format (format_id, description, ... format_id would be a foreign key in disc Which really still doesn't address the problem, Geoff. |
|
Just specifying a format id doesn't indicate whether a particular track is on Side A or Side B. Also, if there are additional layers, it will depend on how the industry defines the layers. Maybe that will require a "layer" column. |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Thanks guys for your feedback and tips. First, let me say that i do have a table call media_format that contains the different format of a disc (cd, dvd, ep, lp, 8 inch, etc...). I did not mentionned this because i though it wasn't important. I'm glad that you did, it confirms that i'm on the right path. Thansk for that. As per the side a/b issue. I couldn't agree more with you guys. I like the idea of having a "location" table and adding a foreing key to the "disc_track" table. I've noticed that sometimes an EP or LP with two sides have a different way of labelling the side. ie. SIDE A SIDE B * ... SIDE 1 *SIDE 2 .. i even noticed one 78 rpm that said VOLUME A *VOLUME B for sides. Having the table location and adding a 'label' column fixes that problem... Thanks again for all your help Marco |
#8
| |||
| |||
|
|
On Sep 3, 12:37 am, SM<servandomont... (AT) gmail (DOT) com> wrote: Thanks guys for your feedback and tips. First, let me say that i do have a table call media_format that contains the different format of a disc (cd, dvd, ep, lp, 8 inch, etc...). I did not mentionned this because i though it wasn't important. I'm glad that you did, it confirms that i'm on the right path. Thansk for that. As per the side a/b issue. I couldn't agree more with you guys. I like the idea of having a "location" table and adding a foreing key to the "disc_track" table. I've noticed that sometimes an EP or LP with two sides have a different way of labelling the side. ie. SIDE A SIDE B ... SIDE 1 SIDE 2 .. i even noticed one 78 rpm that said VOLUME A VOLUME B for sides. Having the table location and adding a 'label' column fixes that problem... Thanks again for all your help Marco Getting back to this issue, i've started making some entries and notice that sometimes 1 track could appear on both side a and side b... Also, how do i output side a before side b? should i add a column , say, 'display_position' in the location table? my location table looks like this: location_id, label, display_position ------------------------------------------------ 1, SIDE A, 1 2, SIDE B, 2 3, SIDE ONE, 1 4, SIDE TWO, 1 5, A, 1 6, B, 2 my disc table looks like this: disc_id, track_id, location_id, tracknumber ------------------------------------------- |
#9
| |||
| |||
|
|
Getting back to this issue, i've started making some entries and notice that sometimes 1 track could appear on both side a and side b... |
![]() |
| Thread Tools | |
| Display Modes | |
| |