AnsweredAssumed Answered

Object oriented database design

Question asked by sheldonrampton on Mar 4, 2009
Latest reply on Mar 5, 2009 by sheldonrampton


Object oriented database design


I've written a blog post about my experience thus far trying to develop object-oriented database design practices for FileMaker:


The point to this is the same as the point to object-oriented computer programming: To simplify and streamline the development process by enabling reusability of existing designs. For example, a "contacts" database typically requires fields for a person's first and last name, address, city, state, zip code, phone number. Object-oriented design enables creating subclasses of "contacts" such as "media contacts," "donors," "customers," etc. Treating them as subclasses means that they inherit the attributes of their parent class, so I don't have to reinvent the wheel each time and then have separate databases each with their own address and phone number fields.


There's another aspect to object-oriented design that I'd also like to adopt in my Filemaker databases, but I haven't figured out how yet. I'd like to be able to make my subclasses inherit the methods of the parent class but be able to override them. In object-oriented computer programming, a "method" is the equivalent of a "function" in non-object-oriented programming. In FileMaker, we use scripts. Does anyone have any thoughts on a good way to organize scripts in FileMaker to support inheritance and overriding?


Here's an example of what I'd like to be able to do: I have a database of investors in the NICA Fund, a project of a nonprofit organization for which I volunteer. Most of our investors lend directly to to the nonprofit organization, but we are currently working to develop a relationship with MicroPlace through which people can find us an invest online. It makes sense for us to define MicroPlace investments as a subclass of our existing investments, and it would be nice if I could have this subclass inherit most of the scripts of the parent database while overriding a few of the scripts that calculate some of the loan terms, such as payment schedules.


Has anyone else grappled with this type of problem? Any thoughts or suggestions?