Mark Jones Posted April 21, 2013 Posted April 21, 2013 What is the advantanges or disadvantages of using ID files as a Numeral or a Text. I am seeing both being used and since I am brand new to relational databases using id _kp and _kf fields I am trying to get started right. Thanks. I did search the forum for this info and didn't find it. It seems to work either way in my experiments. Mark Jones
Ocean West Posted April 21, 2013 Posted April 21, 2013 Mark the important part is that they are Unique and not mismatched so as to not rely on a Text ID field and a Number ID field matched in a relationship in some cases it will fail especially if you are using these fields in an SQL query, Numbers are smaller take up less space. However require some planning to make sure they remain unique ( imports ) Text as ID field can use Get ( UUID ) function which returns a unique string essential for syncing solutions and for solutions that are distributed. using the _kp or KEY PRIMARY and _kf or KEY FOREIGN is just a way to label what that field is used for. In most cases my preference is just to make sure that each table has an ID or UID field and that any other table where there needs a foreign key simply just label it so as uid_customer or uid_invoice always knowing that a uid ----< uid_entity is the relationship. Unique to FileMaker is the muti-key when you can take a text field with return separations such as "1001¶1002¶1003" and match that field to the unique table in another table useful as a way to populate a portal based on a scripted logic to derive the list of IDs needed to sustain the relationship. In this case a text field and a number field will work. This was a much used technique before we had multi-predicute relationships (fmp7). and still very much used.
Mark Jones Posted April 21, 2013 Author Posted April 21, 2013 Thanks for the information. I saw it being done both ways on youtube help videos and was curious. Filemaker is a great product and does so much. Mark Jones
Recommended Posts
This topic is 4294 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now