Unique DB Popup Relationship type mismatch

Discussion of the version of HanDBase that runs on the iPhone and iPod touch devices. This includes the synchronization conduits as well.

Unique DB Popup Relationship type mismatch

Postby ivan308 » Fri Dec 04, 2009 10:54 pm

I have a database with customers that I am using Unique type to assign a Customer ID.
I then have a second database with time entries. I am using DB Popup type to lookup and populate the Customer ID from the first database.

All looks OK and both databases appear to have the correct matching Customer ID however when I try and use the Customer ID field to define a Relationship between the two databases it appears that the Relationship does not work because the Unique type is Integer and the DB Popup is text.

I plan on using the Customer ID in a few other databases to establish Relationships with the Customer database so I cannot see how I can use Link and Linked unless I create a Link Linked pairing for each database. If I have 10 databases I will then have to have 10 different Link types in the Customer database. :?:
ivan308
 
Posts: 3
Joined: Fri Dec 04, 2009 10:42 pm

Re: Unique DB Popup Relationship type mismatch

Postby dhaupert » Tue Dec 08, 2009 3:28 pm

Hi there,

Yours is a great question. For speed reasons, we only allow certain field types to be related to others. I was not aware honestly that the Unique field type would not be compatible with the DB Popup, but it's definitely a possibility. I can definitely check and verify that is the issue, but the main reason for writing you first is to dis-recommend using HanDBase's unique type for customers. The unique number is only unique if you're using HanDBase on the iPhone/touch and nowhere else. In other words, if you use a desktop, or share with another user, the unique number won't truly be unique! I usually only recommend using this field type for things like helping declare a winner in a sorting tie for this reason. As to what to use for a customer ID- at this point on the iPhone the best option is to write in a value yourself, or choose a primary id of some sort (phone number, last name, company name, etc).

When you decentralize the database engine and run it in multiple places, creating a unique number that is unique across multiple places means using a lot more than a simple number. There are a few postings on here about using the Link value as a unique identifier (you can use a conditional field to get it into a text format, and from there you'll see it's a huge string of text and numbers. If this is something you're interested in using, let me know and I'll try to find some of those other postings regarding this!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: Unique DB Popup Relationship type mismatch

Postby ivan308 » Wed Dec 09, 2009 7:13 pm

Dave

I already located the post on the conditional Link field and I am using that as an ID.

Thanks

Ivan
ivan308
 
Posts: 3
Joined: Fri Dec 04, 2009 10:42 pm

Re: Unique DB Popup Relationship type mismatch

Postby edelph@sbcglobal.net » Sat Jan 09, 2010 10:52 pm

I will say this about using something that is not system generated as the key - the user will want to change the value of a non-system generated key. Link to a persons name - they get married. Link to a SSN - they typed it wrong on the form. Link to a company name - they merge with another company. And when you change the value of a key, all the links are broken. There are times you want any change to propogate to all linked records (linked, relationship), and there are times you only want the value at a specific time stamp (DB Popup).

There needs to be a means to generate and use a unique system generated key for links and relationships, and that generated unique key needs to be able to have rules defined for what number it starts with and what the increment is (negative allowed). This will allow different users to input data on separate handhelds and sync to a common database. Each user would be given their own seed to start with. If the unique field could handle 1,000,000,000, then each user could get a seed starting at increments of 100,000 or such as appropriate.
edelph@sbcglobal.net
 
Posts: 1
Joined: Fri Jan 01, 2010 1:58 pm


Return to HanDBase for iPhone and iPod touch

Who is online

Users browsing this forum: Bing [Bot] and 1 guest