Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Primary keys...Text or Number?


This topic is 5794 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Which do you use, and why? Do you use both cases situationally?

I have not developed a standard on which way I choose to go with these. Sometimes it seems like using text is better to me, but I'm afraid I'm not grasping the full ramifications of each.

Please share your ideas!

Posted

Hello. I use numbers exclusively. I've read that the index is smaller, and they sort in created order in a dev layout.

Posted

Well I prefer TEXT because for all my keys I am using Base36 UID's

http://www.nightwing.com.au/FileMaker/demos9/demo910.html

text is also required if you need to do multi-key (a return separated list of values) say a list of ID's (text or number) to the primary key in another table ( text or number).

Since keys are INTERNAL to the solution there isn't a reason i can think of that requires it to be a number, sequences or sorting can be handled with another field. Such as Invoice numbers (for the user to see, that can be an serialized number field )

As example you will have a UID and a Invoice Number field, invoice line items don't need to be related to the invoice number field - but to the UID.

Posted

I love religious debates. :

I used text fields until one night I did a huge data import and sorted by the primary key to ensure the records were imported in creation order.

It was a long night.

Posted

I should add that if a multi-key field needs to relate to the numeric key, the multi-key needs to set to text.

Posted

... and then I realise that *everything* I've just posted was already said by Stephen and Barbara. :

This topic is 5794 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.