many to many relationships

Discuss the HanDBase for Windows Desktop program, conduits, and add-ons.

many to many relationships

Postby samsinclair » Fri Aug 01, 2014 6:05 am

IS' nm new in the forum but have been reading about this software in relation to my needs. Can this software handle many to many relationships?
samsinclair
 
Posts: 10
Joined: Fri Aug 01, 2014 5:56 am

Re: many to many relationships

Postby mjhanna » Fri Aug 01, 2014 11:27 am

A record in database 'A' can have a one-to-many relationship to some records in database 'B'. Likewise individual records in database 'B' could have a one-to-many relationship back to some records in database 'A'. Is this what you mean?
Michael
(Only a user and not affiliated with DDH Software, but working with computer databases for over fifty years.)
mjhanna
 
Posts: 155
Joined: Tue Oct 15, 2013 10:56 am
Location: New Mexico

Re: many to many relationships

Postby samsinclair » Thu Aug 07, 2014 8:53 am

yes
samsinclair
 
Posts: 10
Joined: Fri Aug 01, 2014 5:56 am

Re: many to many relationships

Postby mjhanna » Thu Aug 07, 2014 9:53 am

Since you say yes, then the answer to your question is also yes. HanDBase has several one to many relationship constructs. There are some basic tutorials about using them on the company website.
Michael
(Only a user and not affiliated with DDH Software, but working with computer databases for over fifty years.)
mjhanna
 
Posts: 155
Joined: Tue Oct 15, 2013 10:56 am
Location: New Mexico

Re: many to many relationships

Postby samsinclair » Thu Aug 07, 2014 10:04 am

thanks mjhanna for the quick reply. the challenge is I have 3 databases, A, B & C. A has many to many relationship with B and B has 1 to many relationship with C. is that possible with handbase? which is appropriate to use? link/linked or relationship?
samsinclair
 
Posts: 10
Joined: Fri Aug 01, 2014 5:56 am

Re: many to many relationships

Postby dhaupert » Thu Aug 07, 2014 10:21 am

Hi,

I'd recommend the relationship if you already have unique id's/keys within the database. For example, a customer ID, customer name, etc.

The link/linked pair are for a one to many design (though I've seen people use each of them on both sides to approximate a many to many) where you don't want to create or maintain a unique identifier for each record. The link/linked does this for you.

But the relationship field is far more flexible assuming you have these ids already in your design.
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: many to many relationships

Postby samsinclair » Thu Aug 07, 2014 11:16 am

yes, I do have unique identifier and so will use relationship. thanks heaps
samsinclair
 
Posts: 10
Joined: Fri Aug 01, 2014 5:56 am

Re: many to many relationships

Postby samsinclair » Thu Aug 07, 2014 11:45 am

joining B and C with relationship is now done and looks ok. next is A and B which is many to many relationship. I will try that later and hopes I will get it. thanks
samsinclair
 
Posts: 10
Joined: Fri Aug 01, 2014 5:56 am

Re: many to many relationships

Postby dhaupert » Thu Aug 07, 2014 12:10 pm

Hi there,

When you set up a relationship field in HanDBase, it does two things for you:

1. Let's you pull a single value from a related table's record to show in your database record.
2. Provides a jump to show the matching records from your database record.

There is no option to show all related records without tapping a button and jumping to a different screen as our Edit Record and Forms screens are both limited to a single data record in a table. But with the #2 option above you can quickly get to your related records.

I'd suggest reading through a few of our Relationship documents to see how this is done:
http://ddhsoftware.com/knowledgebase.html?read=221
http://www.ddhsoftware.com/knowledgebase.html?read=195

Hope this helps!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: many to many relationships

Postby samsinclair » Thu Aug 07, 2014 5:21 pm

thanks; these are good read. will implement them soon.
samsinclair
 
Posts: 10
Joined: Fri Aug 01, 2014 5:56 am

Next

Return to HanDBase for Windows

Who is online

Users browsing this forum: No registered users and 0 guests

cron