D
dprocket
Hello. I am a newbie to databases, and I've run into a bit of a problem.
Here is my situation. I have a table that has a list of my business
partners. I have separate tables that have order information, contact info,
etc.
I really want to include something that shows where each (state or region)
one business partners has service in.
For instance:
XYZ Company may have service in NY, MA and PA
ABC Company may have service in NY, NJ
123 Company may have service in MN
789 Company may have service in all 50 states.
Ultimately, I'd like to get to a solution where I can search my database to
find every business partner that has service in a particular state. For
instance:
"Find all partners with service in NY."
I have not figured out a way to build a table that allows my to have
multiple areas of service for a single record.
The best thing I've come up with is to create several tables:
StateListTable (contains all 50 states)
PartnersTable (contains all partners)
And then I would create a table that has records like this:
XYZ Company | NY
XYZ Company | MA
XYZ Company | PA
ABC Company | NY
ABC Company | NJ
123 Company | MN
789 Company |AL
789 Company |AK
....
....
The problem with this design is that it seems awfully bulky and I am not
sure how I would go about adding records to it or being able to search.
Can someone help me out?
Here is my situation. I have a table that has a list of my business
partners. I have separate tables that have order information, contact info,
etc.
I really want to include something that shows where each (state or region)
one business partners has service in.
For instance:
XYZ Company may have service in NY, MA and PA
ABC Company may have service in NY, NJ
123 Company may have service in MN
789 Company may have service in all 50 states.
Ultimately, I'd like to get to a solution where I can search my database to
find every business partner that has service in a particular state. For
instance:
"Find all partners with service in NY."
I have not figured out a way to build a table that allows my to have
multiple areas of service for a single record.
The best thing I've come up with is to create several tables:
StateListTable (contains all 50 states)
PartnersTable (contains all partners)
And then I would create a table that has records like this:
XYZ Company | NY
XYZ Company | MA
XYZ Company | PA
ABC Company | NY
ABC Company | NJ
123 Company | MN
789 Company |AL
789 Company |AK
....
....
The problem with this design is that it seems awfully bulky and I am not
sure how I would go about adding records to it or being able to search.
Can someone help me out?