Over 46,000+ Business Solution Developers Find answers, ask questions, and connect with our community of business solutions developers, business owners and partners.
FileMaker, mySQL, and ESS; A Little Known Secret, to Me Anyway – FileMaker Today
Recently, I was working on improving performance for a FileMaker solution that had a large web integration. It was decided that the best approach was to move a few primary tables from FileMaker to mySQL using ESS. The issue, of course, was we had to maintain all the business logic associated with those FM tables after they had been moved to mySQL. This is something I had done before, and my normal process is:
1. Run a DDR (Database Design Report – available with FileMaker Advanced) pre-migration to mySQL
2. Setup DSN to mySQL
3. Change table occurrences of affected tables to new mySQL tables
4. Use DDR to search for all references to affected tables and adjust any misaligned fields used in scripts or displayed on layouts, relationships, etc
The above process works well, although it is, at times, painstakingly slow because once I change the underlying base table of the affected table occurences, any relationships, security, scripts, and even fields displayed on layouts, often change and need to be fixed. I’ve always wondered if there was a way to maintain all the dependecies when making such a change and yesterday, the light went on thanks to some work I was doing with Roger Jacques. Before I get into those details, I want to point out that the mySQL schema, in this case, was a mirror of the FM tables (same table names and same field names).
What We Discovered
I should point out that I’m not a mySQL admin, nor do I have much experience with mySQL outside of ESS integrations. That said, Roger was using a free tool called Sequel Pro to manage what he was doing with mySQL. It turns out, that if you sort your FileMaker fields by creation order, and then use Sequel Pro to arrange (drag/drop) the mySQL table columns to match the ceation order of the fields in FileMaker, dependencies are maintained. It is still important to check the DDR (as mentioned in my process above), but all relationships, scripts, and layout objects were maintained when we did this. Perhaps this just escaped me over the past couple years, but this made my day and greatly improved the amount of time it took to do what we needed to.
While the process is simple, it is important to know that when using ESS, FileMaker creates a shadow table. It is this shadow table that is used in relationships, etc. and needs to be correct. So, if you are working in the Manage Database and change a table occurrence to a mirror based on mySQL, you should NOT see any changes to fields used in relationships. If you do, you need to cancel out of the Manage Database. This will delete the shadow table which is necessary. Then, simply check the column order in Sequel Pro and try again.
I’d be interested in hearing from your experiences and if you have any additional notes to add that make a move to mySQL, under similar conditions, easier.