Database Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesDatabase Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 12th, 2006, 05:19 AM
winsonlee winsonlee is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Posts: 2 winsonlee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 9 sec
Reputation Power: 0
Storing Data in Table

just wondering how can i store all this information on a table ??
should i create two table or i should just use one table ??

I thinking of using one table just to store personal information

info table
id name age phone
1 alex 15 544545
2 rob 20 854545
3 pretty 30 5454645

fruit table
id info_id fruit
1 1 apple
2 1 pineapple
3 1 watermelon
4 2 apple
5 2 watermelon
6 2 orange
7 3 orange
8 3 watermelon
9 3 pineapple


name :alex
age : 15
phone : 544545
favourite fruit : apple, pineapple, watermelon

name : rob
age : 20
phone : 854545
favourite fruit : apple, watermelon, orange


name : pretty
age : 30
phone : 5454645
favourite fruit : orange, watermelon, pineapple.


am i on the right track ???

Reply With Quote
  #2  
Old July 12th, 2006, 09:42 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 956 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 669231 Folding Title: Super Ultimate Folder - Level 2Folding Points: 669231 Folding Title: Super Ultimate Folder - Level 2Folding Points: 669231 Folding Title: Super Ultimate Folder - Level 2Folding Points: 669231 Folding Title: Super Ultimate Folder - Level 2Folding Points: 669231 Folding Title: Super Ultimate Folder - Level 2Folding Points: 669231 Folding Title: Super Ultimate Folder - Level 2Folding Points: 669231 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 8 h 23 m 32 sec
Reputation Power: 4
Send a message via ICQ to Itsacon
Yes, you are certainly on the right track. However, I'd suggest using THREE tables:

people: id, name and phone
fruit: id and name
favourites, people_id and fruit_id.


Good luck, if you need any more help, just say it.
__________________
This is my code. Is it not nifty?

"The biggest problem encountered while trying to design a system that was completely foolproof, was, that people tended to underestimate the ingenuity of complete fools."
---Douglas Adams


Join the Itsacon fanclub!    
Zero Tolerance: Spammers banned so far: 264

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesDatabase Development > Storing Data in Table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway