Well in general when you have power failures/brown-outs while actively using a database it can result in the database becoming corrupt.
Not knowing Aperture, I'd look for a DB rebuild or 'fix' function in the software, if there is one, otherwise you could restore from a recent backup.
Brian.