Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I do this sort of relationship?

Status
Not open for further replies.

sansangtracao

Technical User
Oct 7, 2005
19
VN
I have 3 tables: events, country and city. Several events can take place in a country and in different cities of that country. Question: What kind of relationship I can build here???
Thanks
 
Not enough information.

Can a single event take place in more than one city (or country)?


Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Hi traigamer, actually the event can take place only in one city of a country! I managed to put the events to a country but cannot link the cities to that country but the difficult part is that on the report the country is displayed well (with names in text) but the city always appears in number.
What the right relationship would be in thius situation?
 
You should lay out your tables like this:

CountryID Country
1 UK
2 USA
3 Italy
4 Wherever

CityID CountryID City
1 1 London
2 2 New York
3 1 Bristol

CourseID CityID Course
1 2 Course1
2 1 Course2
3 3 Course3

Then join the like ID fields in a query to create the data for your report countryid is joined to countryid and cityid is joined to cityid.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top