Aug 7, 2011

FileMaker Database Naming Conventions

A concise, consistent and unambiguous naming convention is important for any database development project, or indeed any software development project. Filemaker is no different, but there are a few specific aspects to Filemaker development that require special consideration.
  1. Be specific. Avoid ambiguous or generic names at all costs. A total stranger should be able to read the names of your tables, fields, scripts, and layouts, and get a rough idea what they are for. Generic names should only be used for things that are truly generic, such as templates or loop counters, things that get reused in many different ways.
  2. Keep names short. This is especially important for naming tables and table occurrences in the relationship graph, and for names of layouts, because if your names are too long, the whole name may not be visible in the FM user interface, which can cause confusion and errors.
  3. If rules 1 and 2 conflict, go with rule 1.
  4. Avoid spaces. Filemaker will cheerfully allow you to use spaces in all sorts of places. At first, this may seem great, because it allows you to give things names that are very legible to humans. But there are many disadvantages to using spaces, especially when it comes to working with third-party platforms.
  5. Use Camel Case. Camel case is when you combine multiple words into a single name, and capitalize the first letter of each word. Like this: IAmGoingToTheStore. Even without spaces, it's easy to tell where words begin and end because of the case change.
  6. Use common or obvious abbreviations. Example: A field that holds the annual percentage rate can be called APR, but you wouldn't want to use PC to mean Postal Code, because it's not a widely known abbreviation.
  7. Use shorthand conventions to identify special pieces. Primary key field should always begin with the letters pk. Foreign keys should begin with fk.
  8. Use the underscore character at the start of field names that are calculated or otherwise derived from other data.

Don't state what something is in its name. If you have a table of names, don't call it "tblNames" or "NamesTable" or something, just call it "Names". Since it's a table, it will only show up in places where tables are relevant, and extra

No comments:

Post a Comment