MySQL Forums
Forum List  »  Newbie

Setting up some new tables
Posted by: Vincent Guerin
Date: July 31, 2009 09:18AM

I have a lot of experience writing SQL and PL-SQL, but I've actually never set up tables based on requirements. Wanted to get some feedback on a hypothetical situation.

I need to store a list of Concerts, each with their own ID (and other fields like date, time, etc). Each concert can have 1 venue attached to it, and each venue has it's own unique ID and info. That part is easy, a concerts table and a venue table, with a FK field on the concert table that maps 1-to-1 to the unique key on the venue table. But here's a twist: each concert can have multiple "Headline" artists, as well as multiple "Opening" artists playing. I can setup an Artist table, each with a unique ID, but what is the proper way of storing the multiple artists on the Concert table?

Would it be a comma-separated list in a field on the Concert table? Or multiple rows? And if multiple rows, how to store both headliners and openers? Or maybe just have a set number of slots for each one, and have Headliner1, Headliner2..Headliner5 (same with opener). Sorry I know this is a basic question, but any advice for a newbie would be GREATLY appreciated! Thank you in advance!

Edited 1 time(s). Last edit at 07/31/2009 09:28AM by Vincent Guerin.

Options: ReplyQuote

Written By
Setting up some new tables
July 31, 2009 09:18AM
August 08, 2009 05:03PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.