dbTalk Databases Forums  

how to create a db model about records/disc/sides/tracks of one artist

comp.databases.mysql comp.databases.mysql


Discuss how to create a db model about records/disc/sides/tracks of one artist in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
SM
 
Posts: n/a

Default how to create a db model about records/disc/sides/tracks of one artist - 08-31-2010 , 09:25 PM






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

Reply With Quote
  #2  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: how to create a db model about records/disc/sides/tracks of oneartist - 09-01-2010 , 09:48 PM






On 8/31/2010 10:25 PM, SM wrote:
Quote:
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
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).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #3  
Old   
Geoff Berrow
 
Posts: n/a

Default Re: how to create a db model about records/disc/sides/tracks of one artist - 09-02-2010 , 06:38 AM



On Wed, 01 Sep 2010 22:48:57 -0400, Jerry Stuckle
<jstucklex (AT) attglobal (DOT) net> wrote:

Quote:
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

--
Geoff Berrow (Put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs www.4theweb.co.uk/rfdmaker

Reply With Quote
  #4  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: how to create a db model about records/disc/sides/tracks of oneartist - 09-02-2010 , 07:36 AM



On 9/2/2010 7:38 AM, Geoff Berrow wrote:
Quote:
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

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.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #5  
Old   
Geoff Berrow
 
Posts: n/a

Default Re: how to create a db model about records/disc/sides/tracks of one artist - 09-02-2010 , 09:23 AM



On Thu, 02 Sep 2010 08:36:54 -0400, Jerry Stuckle
<jstucklex (AT) attglobal (DOT) net> wrote:

Quote:
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.
I wasn't making myself clear. The format table is in addition to the
problem. Albums can come in many formats.

Quote:
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.
I agree that 'side' should go in disc_track, but to future proof that
it may need to be a foreign key to another table, say, location.

Loc_id description
1 A side
2 B side
3 Layer 1
4 Layer 2
5 Layer 3

I have other problems with the word 'track'. Track isn't really a very
good word because it is derived from the continuous track on a vinyl
record. My first thought was that this should really be 'recording', a
discrete entity, usually a song. But then I remembered that some
recordings are continuous even though they may be split into many
tracks... Not simple, is it?


--
Geoff Berrow (Put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs www.4theweb.co.uk/rfdmaker

Reply With Quote
  #6  
Old   
SM
 
Posts: n/a

Default Re: how to create a db model about records/disc/sides/tracks of one artist - 09-02-2010 , 11:37 PM



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

Reply With Quote
  #7  
Old   
SM
 
Posts: n/a

Default Re: how to create a db model about records/disc/sides/tracks of one artist - 09-28-2010 , 11:05 AM



On Sep 3, 12:37*am, SM <servandomont... (AT) gmail (DOT) com> wrote:
Quote:
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
-------------------------------------------

Reply With Quote
  #8  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: how to create a db model about records/disc/sides/tracks of oneartist - 09-28-2010 , 05:37 PM



On 9/28/2010 12:05 PM, SM wrote:
Quote:
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
-------------------------------------------
That's one way of doing it. Just as long as you don't have some tracks
on "SIDE A" and others on "SIDE 1", for instance.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #9  
Old   
Captain Paralytic
 
Posts: n/a

Default Re: how to create a db model about records/disc/sides/tracks of one artist - 09-29-2010 , 06:16 AM



On 28 Sep, 17:05, SM <servandomont... (AT) gmail (DOT) com> wrote:
Quote:
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...
I don't think a "track" can appear on 2 sides. Physically a track is
either one side or the other. A track's contents may be the same as
that of another track on the album, but physically it is a separate
track.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.