944,066 Members | Top Members by Rank

Ad:
Oct 9th, 2007
0

Database Design Question

Expand Post »
I posted a similar question in MySQL section before but i think this one might be more general/easier to understand (hopefully):

I'm doing a database (in MySQL) of different plants which is gonna store various (somewhat detailed) information about them.

Here's a sample of two tables:

Families (Plant Family)
family_id  	int(10)   	   	 
family_name 	varchar(50)

Genera (Plant Genus)
genus_id  	int(10)   	 	 
genus_name 	varchar(50)

and then theres a Plants table which uses a few tables including the two above and has their pk's as foreign keys:
plant_id  	int(10)    	 
family_id 	int(10) 	families -> family_id  	  	 
genus_id 	int(10) 	genera -> genus_id  	  	 
species_id 	int(10) 	species -> species_id  	  	 
auth1 	varchar(100)
...

Now the data for this table is going to come from an excel spreadsheet file that pretty much has all the data needed except the id's because the

ssheet only has the names stored. Now to save time (there are 2300 records in the ssheet) i wanted to just save the file as CSV and import into

the db but then i would have to change from using family_id, genus_id, etc to using the actual name i.e family_name, etc. which i'm not sure

will work as good as using id's (which is possible but then i would need to modify the ssheet to add all the id's for each column) and i'm not

sure if the relationship would hold as well since it would not really be a foreign key as, say, family_id is the key not family_name (although

in families table it has unique values)

So anyone has any ideas, suggestions, support, etc?

Thanks in advance...
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
ray_broome is offline Offline
25 posts
since Aug 2004
Oct 23rd, 2007
0

Re: Database Design Question

what do you need exactly ?
Reputation Points: 6
Solved Threads: 19
Posting Whiz in Training
fatihpiristine is offline Offline
283 posts
since Sep 2007
Oct 24th, 2007
0

Re: Database Design Question

oh sorry well i actually got that sorted out on my own, but i basically wanted to know if i should have stored the names as well as the id's in the same table but i ended up just storing the id's and using a join to get the names
Reputation Points: 10
Solved Threads: 0
Light Poster
ray_broome is offline Offline
25 posts
since Aug 2004

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Database Design Forum Timeline: Web based database login page question
Next Thread in Database Design Forum Timeline: Link Tables





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC