How to prevent iPhoto from getting corrupted?
This is the second time in the last couple months where I've had to rebuild/repair my iPhoto library, i.e. I get prompted at iPhoto startup that the library cannot be read, with the suggestion to rebuild or repair my library by starting with Command + Option. While I've found plenty of links on how to rebuild/repair the library, my concern is that it's not addressing the root cause.
1. What are the reasons a library would be corrupt? Is it because the iPhoto database doesn't match with what's in the filesystem? If so, what specifically doesn't match - file permissions, file properties, etc.? Or, is it something with the filesystem itself that's corrupted, causing iPhoto to not be able to find a file(s)?
2. How can I prevent corruption in the future?
I was able to rebuild/repair or restore from Time Machine backup, but again, my concern is without knowing the root cause, I could be losing data and not realizing it, or even propagating errors in the Library.
I'm using OS X ver. 10.8.3. iPhoto 11, ver. 9.4.3 (720.91).
MacBook Pro, OS X Mountain Lion (10.8.3)