Aperture Raw Database Access Disclaimer: The methods outlined in this page use raw database access to the Aperture Library database. They are likely to break with updates to the Aperture Library because of Aperture updates. The methods on this page only query into the database and do not write to any files so they should be safe, but read and understand the code before you use it. That said, you should probably not try to access the Aperture Library database directly except as a last resort.Here is my diagram of how I see the Aperture Library database (the flow lines show how I am building file paths from version IDs): Aperture-ErdHere is a list of database activities that I have figured out:

  • Determine if a version’s master file is managed or referenced
  • Path for managed master
  • Path for referenced master

I should now state that I am not very good at writing SQL queries and that the seed for this work came from some things that Adam Tow blogged about in regards to his development of Timeature. After some Googling I found Fazid Majid’s blog posting about Aperture internals and was off and running.See also:

Below is an AppleScript to get the path to the currently selected version(s) master files. It is significantly faster and more reliable than my previous methods for doing this and seems to work properly for renamed images.Script outline:

  1. Find the Library path
  2. Determine if version’s master is referenced or managed
  3. Get path using appropriate method

Aperture Database Access Stub 03.scpt.zip

Share