Aperture 3 seems to have completely lost all of my ratings. What can I do to recover them? I noticed the other day that none of the ratings I've made in Aperture are showing up anymore.

Firstly, I'm wondering how that could have happened? I've done a number of things lately like relocate masters, regenerate thumbnails, etc. but I can't pin it down to a specific date and besides I was fairly certain that the ratings metadata was stored separately from all of that. I'm trying to avoid having to restore the library from Time Machine.
To keep the answer general enough for anyone - I'll add some precautionary steps that you can ignore as appropriate.


You might want to set up a vault
to back things up as they are or
kick off a backup before trying to
repair the database.
The sure thing is to recover from a backup before the database got corrupt. The ratings are stored in files separate from the images so there are three repair/rebuild options. See the Aperture Troubleshooting article. It's unlikely the file with the ratings lost read permission, but that would be ideal and rapid to fix. The other options are less "safe" when the database is corrupt and could result in losing work or making the system worse. It's not designed to make things worse - but it's a rare occurrence and your library is broken so even the best attempts to fix it could hurt and not help.
Lastly - you will have to restore from TimeMachine (or an Aperture Vault if you set that up) and re-import or re-perform the changes since that back up.


Good Luck!