Linking (?) multiple tables

Creating tables and queries
Post Reply
DNAtsol
Posts: 2
Joined: Fri Mar 11, 2011 3:37 pm

Linking (?) multiple tables

Post by DNAtsol »

Hi,
Newbie @ base and I may be in over my head but....

I'm trying to record the results of multiple races with the purpose of using prior results to predict current races. In each table I have the person's name, the team and race result. Sometimes the race takes place over several days and I have each individual stage as well as the overall finishing position.

I'd like to take a list people racing in an upcoming race, pull up their prior results from any race they may have been in to compare.
My thought is to make a master table, filter it based on current race participants and use the result to extract results from prior race results. Am I on the right track? If so, any pointers to get me going in the right direction would be most appreciated. If not, any suggestions on a better way to accomplish this appreciated even more :).

Participants in any one race do not completely overlap with any other race.
Thanks
DNAtsol
open office 3.3
Ubuntu 10.10
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Linking (?) multiple tables

Post by Villeroy »

A typical use case for scenarios.
Example file: http://user.services.openoffice.org/en/ ... hp?id=3004

Sorry, I did not notice that this is the Base forum.
You need a table of events(races), a table of possible winners (horses, riders, teams, whatever). A mapping table to constitute a many-to-many relation, a table of persons who bet linked to the events through a table of wagers (another n-n relation: person--wager--race).
First you fill out the events, the peoples table and the horses. Then you use many-to-many forms to map the related items to each other. A set of queries and reports will deliver the results.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
DNAtsol
Posts: 2
Joined: Fri Mar 11, 2011 3:37 pm

Re: Linking (?) multiple tables

Post by DNAtsol »

Ok. I think I follow your logic. I have one table of (for me) bike riders. Another single table for all the races for the season. What I'm confused on is the "mapping table" could you explain/describe/link to something that could get me an example of how I would do that.

Thanks for the reply
DNAtsol
open office 3.3
Ubuntu 10.10
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Linking (?) multiple tables

Post by Villeroy »

Many-to-many (m-n) relations in the relations manager (Tools>Relations...), reflected in editable cross-table forms:
http://user.services.openoffice.org/en/ ... hp?t=12125& [each movie has one or more genres and vice versa]
http://user.services.openoffice.org/en/ ... 18#p117918 [each employee has one or more meeting with clients and vice versa]
http://user.services.openoffice.org/en/ ... hp?id=8641 [each meal has one or more ingretient and vice versa]
Short tutorial on form design tools: http://user.services.openoffice.org/en/ ... 83&t=32757
m-n form step by step: http://user.services.openoffice.org/en/ ... 62#p116320
There is no way to do this by means of wizards.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply