SQLEditor: Compound Foreign Keys

The newest version of SQLEditor (1.4.4b1) now has support for compound foreign keys. This is something that people have been asking about for a while now, so I’m pleased that it got included.

There are some things that may need to be improved, but I’m fairly happy with the first revision of this.

Diagram showing compound foreign key

Diagram showing compound foreign key

The compound foreign key object is a new table level object that you can add from the Object menu just like a field or index. Then you drag from the foreign key to the target table. Finally you use the inspector to create pairs of columns to link together.

When importing from a database SQLEditor will try to create field-to-field links on foreign keys with only 1 pair of columns unless you tell it otherwise. (There is a new preference to do this)

Support is fairly complete, SQL parsing, database import, database export and SQL export are all available so it should work fairly well. I think the only thing it doesn’t do is auto-create indexes, so you may need to do this by hand on referenced columns (for those databases that need this)

There is naturally a new inspector palette to go with the table object.

Compound foreign key inspector

Compound foreign key inspector

This allows you to add pairs of columns using the + button at the bottom. Choose your columns using the little popup menus.

The whole thing is completely new, so please send in your thoughts to the usual address.

Download SQLEditor 1.4.4b1

(or enable the “Check for beta versions” preference and then use the check for updates feature)

This entry was posted in SQLEditor and tagged , , , . Bookmark the permalink.

Leave a Reply