Muad'Dib Posted February 17, 2008 Share Posted February 17, 2008 I do a lot of work in Microsoft Access and SQLServer applied to a very large, complex schema and multiple database instances. I'm evaluating FileMaker as a protable analysis tool to assist me when I'm away from the network. I often define a compound primary key -- multiple fields declared as PRIMARY KEY -- which are used to define a unique record. These can be composed of both NUMBER and TEXT fields. I cannot determine how to define this FM Pro 8.5. It is possible to contrain the datatype, set the equivalent of the DDL "NOT NULL" declaration, but no GUI tool for declaring even one field, -- much less two or more fields -- as the primary key. Perhaps primary key is not in the vocabulary of FM? The subject of primary keys pops up here or there but the question never seems to be answered directly. Does anyone have an insight into the creation of primary keys for a table? Thanks, M Quote Link to comment Share on other sites More sharing options...
Maarten Witberg Posted February 17, 2008 Share Posted February 17, 2008 in filemaker, any field can act as primary key field, there is no formal difference. if you make it an auto-enter serial it will be unique. If you want to use a compound key just concatenate the fields and use the resulting calc field as key. Just make sure it can be stored & indexed or FM will not accept it as key to a relationship. BTW Filemaker relationships can be defined with multiple predicates (field A AND Field B), just select the fields on either end you wish to use. since this option arrived in v7 I have never made a compound key again (i think). ps I hope I'm not confusing things, but in fm the key is defined when you define the relationship and not beforehand when defining the field. most of us I guess just declare a field to be a key by giving it a keyish name. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.