netcode Posted November 14, 2008 Posted November 14, 2008 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
bcooney Posted November 14, 2008 Posted November 14, 2008 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
netcode Posted November 14, 2008 Author Posted November 14, 2008 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.
bcooney Posted November 14, 2008 Posted November 14, 2008 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."
comment Posted November 14, 2008 Posted November 14, 2008 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.
netcode Posted November 14, 2008 Author Posted November 14, 2008 Thank you both for your input!! Now I can get to work on this... lol
Recommended Posts
This topic is 5912 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