Jump to content
Stef's Coding Community
Sign in to follow this  
scampbell70

Is This Possible With Php And Mysql

Recommended Posts

Is it possible to have 2 or 3 tables in a database example

 

Table 1 = names

Table 2 = address

Table 3 = phone numbers

 

 

and when I fill in my name and number on a form it writes the name to the name table and number to the number table and then I can build a query to pull the phone that goes with the right name?

 

Is it better to spilt it up this way for security or it doesn't really matter? I just feel like I have way to many rows in a single table on my database.

 

 

Share this post


Link to post
Share on other sites

Sure, I suppose you could do that, but it seems very inefficient to me. I'd create tables by grouping related data, so perhaps it makes sense to split the data if the content has different purposes, but if it's all contact information about a person, I think that belongs in the same table. I wouldn't worry about too many rows on a table (rows are horizontal, each representing a record in the database), but I would worry about a huge table with a large number of unrelated columns (vertical)

 

I wouldn't worry too much about security on information like names, addresses and phone numbers -- that information is likely publicly available anyway if someone were to search for it. If someone gets access to the database, splitting up that data into multiple tables won't really be any other than a minor annoyance.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...