Simple novice database question

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
derek barnstorm
Forum Commoner
Posts: 36
Joined: Thu May 18, 2006 11:23 am

Simple novice database question

Post by derek barnstorm »

Hi,

This is the first script that I am going to be working on, so forgive me for being a novice.
I am going to use a form like this one: http://spacerockcity.com/add_profile.html to send the information to a database (MySQL), so I can then retrieve it and display it on a profile page for my users.
My question is, would it be best for me to store all of the information in just one table, or create a new table for each form field?

Thanks,

Des.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I see no reason to have a new table for each form field.
derek barnstorm
Forum Commoner
Posts: 36
Joined: Thu May 18, 2006 11:23 am

Post by derek barnstorm »

Okay thanks. So, can you have as many columns in a table as you like?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Technically, yes. However it's rare for many tables to have a lot of columns. The exact point where "a lot" happens varies depending on what you're storing.
derek barnstorm
Forum Commoner
Posts: 36
Joined: Thu May 18, 2006 11:23 am

Post by derek barnstorm »

Right. Thanks a lot for the advice.

Des.
Post Reply