How do I do a Many to many relationship database

For HanDBase related topics that are not specific to one platform.

How do I do a Many to many relationship database

Postby ESwardt » Sun Feb 08, 2015 12:59 pm

Hi

I am a new HanDBase on ipad user. I want to set up a database for a simple publishing company. This is the basic database:

The first database is a list of songs, e.g. 1) Help 2) Yesterday etc.
The song database will hold various bits of information, amongst others the writers of the song and the percentage each person will get of any royalties.

The second database is a list of Persons e.g. 1) John 2) Paul et.
This database will hold further information e.g. Their address, bank details, etc

Each song may have one or more writers, e.g. Help may be written by John amd Paul who will share equally in royalties (50%) each. Yesterday may belong 100% to Paul.

As you can guess, each writer may have a share in any number of different songs.

In MS access, this problem is solved by creating a third database named song_author, with only 3 fields, i.e. Song, Author, Percentage,

I figured out in Handbase I set up the song DB and the author DB and this third database with the song and author fields defined as linked fields, pointing to the two databases mentioned. Only problem is it does not work the way I expected, i.e. I am doing something wrong and do not understand the software well enough to do such a task.

Some help or pointers on how to do this would be appreciated.

Thanks

Eric
ESwardt
 
Posts: 3
Joined: Sun Feb 08, 2015 12:43 pm

Re: How do I do a Many to many relationship database

Postby Brian_Houghton » Tue Feb 10, 2015 7:36 am

Hi Eric,

Thanks for posting.

Using HanDBase's relationship fields in your songs and authors databases, you can create as many relationships between the two different databases as you want. There is no actual need for a third database.

To accomplish this, in the songs database, first add a relationship that will show all authors of the song.

Then in the authors database add another relationship that will point back to the author database and show the values you need related to the author selected.

You can also use the "show value from" parameter to pull across different values.
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am


Return to HanDBase General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron