republican-creole
Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Tech and Talk » OS and Software » Webmasters and Developers » MySQL How to structure database?
Search Topic:
Share Topic:
RSS topic:
toggle:
flat / full
normal / watch
Posting:
Post a:
Post a:
Problem with YouTube »
« [IE] IE6 acting strange on mom's WIN98 computer  
AuthorAll Replies


jayco437
Premium
join:2001-08-11
El Paso, TX
·AT&T Southwest

reply to aSic
Re: MySQL How to structure database?

said by aSic See Profile :

So should I create a (seemingly infinite amount of) table for each unique class (date), with rows that contain the name/address/etc data? ...and just regularly drop the old tables (classes) as time passes?
No. No. No.

Create a table, CLASSES. Create a table USERS. Use a "lookup" table, CLASSES_USERS to show which users are signed up for which class. This would allow for users to sign up for multiple classes using the same information.

Couple other ways to do it, but creating tables for each class is a no-no.


aSic
Premium
join:2001-05-17
Wakulla, FL
clubs:

Thanks jayco437 See Profile! I knew there was something I was overlooking somewhere. I knew the thought of tables for each class seemed crazy, but my head is hurting, and I couldnt clearly think of any other way.

Now I've got some more googling to do on how to properly implement this.
--
Teamwork is a lot of people doing what I say.
Who is Ron Paul?


aSic
Premium
join:2001-05-17
Wakulla, FL
clubs:

reply to jayco437
Just wanted to say thanks again. This spurred a new round of looking at different tutorials, and now I've got the basic layout for signups, and the instructors viewing thing actually working, although very ugly and insecure at this point. I knew there had to be a way to do it. Thanks for the nudge in the right direction.
--
Teamwork is a lot of people doing what I say.
Who is Ron Paul?


jayco437
Premium
join:2001-08-11
El Paso, TX
·AT&T Southwest

No problem. Its quite a common dilemma I think, until you get a firm grasp on creating relationships in databases. I remember asking myself the same questions years ago.

I actually started with one of the O'Reilly books on Access databases that included some basic info on database modeling.

I've actually looked at this book at B&N, and thought it might be a good beginner book (haven't actually read the whole thing myself though) »www.headfirstlabs.com/books/hfsql/

It's an O'Reilly book also.


Ray
Mahnahmahna
Premium
join:2001-04-02
Mesa, AZ

reply to jayco437
said by jayco437 See Profile :

said by aSic See Profile :

So should I create a (seemingly infinite amount of) table for each unique class (date), with rows that contain the name/address/etc data? ...and just regularly drop the old tables (classes) as time passes?
No. No. No.

Create a table, CLASSES. Create a table USERS. Use a "lookup" table, CLASSES_USERS to show which users are signed up for which class. This would allow for users to sign up for multiple classes using the same information.

Couple other ways to do it, but creating tables for each class is a no-no.
When your table names contain data, that's a code smell.
--
ON DELETE CASCADE


jayco437
Premium
join:2001-08-11
El Paso, TX
Interesting read. I'd never heard of the phrase before, but certainly understand what they're talking about. I like the taxonomy of the different "smells" there. All very common problems (or, solutions? that create more problems)


Tenar

join:2008-01-02
Midland, ON

said by jayco437 See Profile :

Interesting read. I'd never heard of the phrase before, but certainly understand what they're talking about. I like the taxonomy of the different "smells" there. All very common problems (or, solutions? that create more problems)
Yeah an interesting term, I've heard it used in a few blogs here and there. probably related to "information scent" from the SEO world.
Forums » Tech and Talk » OS and Software » Webmasters and DevelopersProblem with YouTube »
« [IE] IE6 acting strange on mom's WIN98 computer  


Saturday, 11-Oct 16:42:17 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 9 years online! © 1999-2008 dslreports.com.
page compression OFF
Most commented news this week
· [140] It's Cable TV Rate Hike Season
· [97] Wholesale Bandwidth Prices Still Dropping
· [95] Is Comcast Cooking Up a 22Mbps/5Mbps Tier?
· [95] Symmetrical FiOS No Longer Qualifies For Bundle Discounts
· [84] Time Warner's Ugly Feud With LIN TV
· [77] Half Of New iPhone Owners Came From Verizon
· [70] Supreme Court TiVo/Echostar Ruling
· [70] Microsoft: U.S. Broadband Policy 'Total Failure'
· [67] Verizon Unveils Blackberry Storm
· [64] XOHM Online In Additional Launch Markets
Most people now reading
· Safty Question about K & T wiring. Very worried... [Home Repair & Improvement]
· Should hourly workers work for free thru lunch [General Questions]
· Extreme HD and Essentials [Verizon FIOS TV]
· [Other] Did Joiphone sunrocket its users???? [VOIP Tech Chat]
· [Connectivity] Neighbor using MY router to connect to Internet? [Comcast HSI]
· Does anyone know if Joi Phone has shutdown??? [cover,3028]
· Heads up; Usenet, "Rarpassgen.exe" virus [TekSavvy]
· Bandwidth Limits - All discussion here [Comcast HSI]
· Homeowner Says Cable Mistake Filled Kitchen With Raw Sewage [Comcast Cable TV]
· Norton AntiVirus 2009 conflicts with ZoneAlarm Pro 7.0.483.0 [Security]