My.ADVISOR.com Sign-In
ID
Password

Member Center / Sign-Up
   
SUBSCRIPTION STATUS
If you are a subscriber to this publication, sign-in to access locked articles. To subscribe or renew go to www.AdvisorStore.com.
Go to Article

ADVISOR ANSWERS

Change Your FileMaker Data Model in Mid-Stream

Making changes to the data model of an existing application can be tricky, which is why it's important to think things through before you build your system. But, from time to time, business rules change and so must data models.

By Chris Moyers and Bob Bowers, technical editors


Q: My department uses a FileMaker Pro database to track the jobs we work on. It's currently set up so we can select the name of an artist who is working on a project from a drop-down list. Some of our projects have multiple artists working on them, though. What would be involved in changing the database so we can specify multiple artists for a job?

A: Making changes to the data model of an existing system can be a bit tricky, which is why, of course, it's important to think it through really well before you build your system. But business rules change — we'll assume that's what's driving your need — and so must data models from time to time. Thankfully, FileMaker Pro is a rather nimble and forgiving tool when it comes to things like this.

There are two things involved in a change like the one you're asking about. The first is making the structural changes needed to support the new functionality. As we'll explore, this involves making changes to tables, fields, relationships, layouts, and scripts. Frankly, this is the easy part. The other task — moving the existing data into the new structure — can be painful depending on the condition of your data and the complexity of the change.

First, we'll discuss the structural changes. For simplicity, let's assume you currently have just one table, Job, which has the following fields: JobID, JobName, and ArtistName. I'll also assume you have a static value list attached to ArtistName. Now, it's possible that you could just add a single new table — named something like Assignment — and end up with the requisite one-to-many relationship from Job to Assignment. One job could then have multiple artists assigned to it. But, properly speaking, an artist can be assigned to multiple jobs, and you'll be better served, in our opinion, by re-modeling this as a many-to-many relationship. The difference is that you'll end up with an Artist table as well. The new data model will look like figure 1.

Create the following fields in the Artist table:

  • ArtistID (auto-enter serial number)
  • ArtistName.

In the Assignment table, create:
  • AssignmentID (auto-enter serial number)
  • JobID_fk
  • ArtistID_fk

Figure 1: A many-to-many relationship — Because it's possible to assign more than one job to an artist, and more than one artist to a job, you're best served by setting up a many-to-many relationship.

Chris MoyerChris Moyer is president and CEO of The Moyer Group, a FileMaker Pro consulting and training firm with offices in Atlanta, Chicago, and San Francisco. Chris is a technical editor of FileMaker Advisor Magazine.

Printer-friendly
page layout

Change Your FileMaker Data Model in Mid-Stream

No reader comments ... yet.

    What do YOU think about this topic? Share your advice and thoughts using this form.

    Your Name

    REQUIRED : PUBLIC

    Your E-Mail

    REQUIRED : PRIVATE

    Job, Company

    OPTIONAL : PUBLIC

    City, State, Country

    OPTIONAL : PUBLIC

    Your Web Site

    OPTIONAL : PUBLIC

    Your Comment

    Please help everyone by keeping your comments on-topic, using clean language, and not defaming or making personal attacks.


    Your e-mail address is required, but it will not be displayed to the public or given to anyone. See our Privacy Policy. Comments become visible after they pass our spam filter, and spammers and abusers are permanently blocked. Please report spam or abuse.

    ARTICLE INFO

    Web Edition: 2009 Week 24, Doc #19619

    FREE ACCESS FREE ACCESS

    Keyword Tags: Database Development, FileMaker, FileMaker Development, FileMaker FileMaker Pro, Portals, Software Development

    Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
    Portions copyright ©1983-2010 Advisor Media, LLC. All Rights Reserved.
    Reuse or reproduction of any portion or quantity of Advisor Media's copyrighted content, in any form, for any purpose, requires written permission.
    ADVISOR®, the ADVISOR logo, and other names and logos that incorporate ADVISOR are registered trademarks, trademarks or service marks of Advisor Media, LLC in the United States and/or other countries.
    Other trademarks are used for identification, editorial or descriptive purposes and are the property of their owners.
    Hosted by Prominic.NET Website powered by
    LOTUS SOFTWARE
    ztfmfd0904 moyec080 posted 2009-6-8 mod 03/21/2010 03:19:58 AM ztfmfd/ztfmfd
    domino-144.advisor.com my.advisor.com 03/21/2010 09:16:59 PM