•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Database Design section within the Web Development category of DaniWeb, a massive community of 426,937 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,439 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Database Design advertiser: Programming Forums
Views: 962 | Replies: 2 | Solved
![]() |
| |
•
•
Join Date: Aug 2004
Posts: 18
Reputation:
Rep Power: 5
Solved Threads: 0
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)
Genera (Plant Genus)
and then theres a Plants table which uses a few tables including the two above and has their pk's as foreign keys:
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...
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...
![]() |
•
•
•
•
•
•
•
•
DaniWeb Database Design Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- your ideas on database design??? (Database Design)
- Database Design feedback (absolute beginner here :) (Database Design)
- Cities and Districts DataBase - Basic Question (Database Design)
- Help with contact/mailing list database design... (Database Design)
- Database design - subtypes and instances of an entity (Database Design)
- Database Design - Supertypes and Subtypes (Database Design)
- Database Design Advice (MySQL)
Other Threads in the Database Design Forum
- Previous Thread: Web based database login page question
- Next Thread: Link Tables


Hybrid Mode