MySqlTalk.com  

Go Back   MySqlTalk.com > MySQL > Database Design
User Name
Password
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread
Old 01-05-2006, 06:12 PM   #1
browno
Junior Member
 
Join Date: Jan 2006
Posts: 1 browno is on a distinguished road
Help with my DB design!!!

Hello!

I'm really needing some help. I'm currently trying to create a website dedicated to the local music scene in my area. I want to have a database containing as much info as possible about the artist (name, where they're from, a biography, interviews) as well as info about their releases (titles, credits, single or album). I'd also like to have tracklistings from these releases that the user can click on for individual song info and lyrics. So...

I've setup a preliminary database with three tables: artists, releases and songs.

ARTISTS
artistid - smallint, length (6), Key (Primary), Default (NULL)
artistname - varchar (70), Key (Mul?)
origin - varchar (40)
yearformed - year, length (4)
biography - longtext
website - varchar (40)
interview - longtext
artistimage - varchar (40)
artisttype - char (1)

RELEASES
releaseid - smallint, length (6), Key (Primary), Default (NULL)
reltitle - varchar, length (50)
format - varchar, length (20)
label - varchar, length (30)
year - year, length (4)
credits - mediumtext
description - mediumtext
artwork - varchar, length (30)
artistname - varchar, length (70)

SONGS
songid - int, length (11), Key (Primary), Default (NULL)
songtitle - varchar, length (50)
trackno - tinyint, length (4)
composer - varchar (80)
performer - varchar (50)
lyrics - mediumtext
reltitle - varchar (50)

I hope you can see what I'm trying to do. On the website you click on an artist, you get their bio and a discography. You can click on an album in the discography which will show you the tracklisting for that album. You can then click on that song to get lyrics or whatever.

So, by not really knowing what I'm doing, is my design ok? artist and release are joined by artistname and releases and songs are joined by reltitle.

Also, do I have to declare my intended lengths for varchars. Does it improve the efficiency of the DB in anyway?

Thanks so much for your help!! Oh, and sorry for the long post!
browno is offline   Fork this post Reply With Quote
Old 03-04-2006, 11:05 AM   #2
gertcuppens
Member
 
Join Date: Feb 2005
Location: ANtwerp - Belgium
Posts: 34 gertcuppens is on a distinguished road
Re: Help with my DB design!!!

Long time since I passed by this forum, that's why this answer took so long.
Anyway, I'm wondering why you're adding artistid and releaseid (which is good) but you don't use them to make the joins.
I suggest you join artist and release by artistid instead of artistname.
The advantage of artistid wille become clear as soon as you have a second David Bowie in your database. The same goes for joining releases and songs : change reltitle and put releaseid instead.

You could make your database a bit more complex by adding an entity GROUP (e.g. the Rolling Stones). A group is composed by several artists. This way a release could be made by a group or by a single artist.
gertcuppens is offline   Fork this post Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Needt to design rental database - How do I begin Tsynergy Database Design 4 12-16-2004 03:09 AM
Help, to design a timetable for my college Radiostation, Stuck, easy for you experts. bigblack Database Design 2 12-01-2004 04:36 AM
2 Installing MySQL Administrator Documentation 103 06-09-2004 02:53 AM
1.8 MySQL Standards Compliance Administrator Documentation 21 06-08-2004 03:18 AM



All times are GMT -4. The time now is 08:28 PM.



Powered by: vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Google
  Web http://www.mysqltalk.com
DISCLAIMERS:
1. We have no commercial interest in this site.
Banner Ads and Subscriptions will only be used to help pay for hosting and maintenance costs.
2. MySQLTalk.com is NOT affiliated with MySQL AB in any way.
3. MySQLTalk.com is NOT endorsed by MySQL AB in any way.
4. Please do not post any content that is harmful to MySQL or MySQL AB, meaning no misleading or obsolete information will be tolerated.
Well-founded constructive criticism meant to help the community is permitted.
5. This website is founded with the goal of improving the MySQL community.
We not only tolerate newbies, we encourage them.
Please do not ask newbies to "read the manual".