November 14, 200817 yr Hey all, I am sitting here thinking about a database, my first one obviously. Well actually I am making some changes to an existing one I guess as we already have a massive database, however the designer didn't really create this database the way we wanted it so I am here to save the day and make some changes, or create new ones if need be. Anyways I am wondering how I mark a field as a primary key for a table? Thanks in advance -B
November 14, 200817 yr There is no checkbox to check that "marks" a field as a primary key. Developers adopt some field naming standards, in order to better read their work. You may wish to read the FMI Developer Conventions doc for some suggestions. White Paper Link
November 14, 200817 yr Author From my understand primary keys are mandatory in database so each record is unique and to index. Maybe its not called a Primary key in FileMaker and called something else? I never used FileMaker before too much, all my database knowledge comes from college and using SQL databases, where primary keys are a must to even create a database.
November 14, 200817 yr Yes, a primary key is a field that contains a value unique to all records in the table. Typically, in FM, one uses a number field, and sets its Entry Options to serial number, prohibit modification. I name my primary keys, "__kP_Table_ID," so that they come to the very top of an alpha sort field list. btw, I name foreign keys, "_kF_Table_ID."
November 14, 200817 yr Filemaker doesn't force you to designate a primary key. However, it's good practice to have an auto-entered serial number field in every table and treat it as the primary key for that table.
Create an account or sign in to comment