|
-
February 22nd, 2004, 05:59 PM
#1
design question
Is it better to have one table with many entries
Example
----------
Email
Name
Address
City
....
or to have multiple tables with fewer entries
Example
----------
Table1
Email
Name
Table2
Address
City
Basicly, i'm looking at designing one table with about 25+ entries or spliting them up in to 3-4 categores and creating a table for each, and i'm looking for the better option, the option that will give me better performance. To me either one doesn't matter, but if one will performe better, obviously i'd like to use that one.
-
February 23rd, 2004, 02:22 PM
#2
That depends on your purpose ... What normal form are you looking to get to? Oh, what database is this to be in?
-
February 23rd, 2004, 09:54 PM
#3
It's going to run on MySql, and possibly MsSql later on.
It's basicly a submition form. The user will enter his info, name, email, address...and so on.
My inquiry is basicly, is it better to split these into categories then give each catagory it's own table in the database, or just create one table in the database and throw all these entries in there.
I'm leaning more thward splitting everything up.
Here's a better idea of what the database entries will look like and possibly how I'm thinking of splitting them up.
1-
Email, Name, Address, Phone...
2-
Email notifications, SMS notification, other notifications...
3-
XML feed1, XML feed2, XML feed3....
Or, should I just put all of these into one table??
-
February 25th, 2004, 09:18 AM
#4
In your example, it's better to have one table.
All information you have specified is unique, so there is no need to make another table.
Create another table, for example, if you want to have more then one email for one person:
TablePerson
---------------
Person_ID
Name
Address
City
TableEmails
---------------
Person_ID
Email
You can enter more emails for one person.
Person_ID is primary key in TablePerson.
Person_ID in TableEmails isn't a primary key, duplicates are allowed.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|