Lost Library Data and how to Fix it ??

I have not gotten into the details of the library database or what is stored there yet for each file, but it seems that information about each file and its thumbnail is stored there whenever a new file is found during a library refresh and this information is then provided to the DLNA device when the menus containing a file are built and displayed on the TV, which allows the TV to play the file.
I have experienced 2 situations that perhaps others can explain.
1. I have had thumbnails disappear that formerly displayed with titles on the menu.
2. I have had items that formerly listed on the menu disappear, and in checking the log it said that 1. the item was not in the database but that 2. it would be added but then there were no more log entries indicating either success or failure of the add, but subsequent log entries continued to repeat 1. and 2. and the file never displayed.
The fix for both of these failures/lost database information was to rename the file in question, refresh the library, name the file back again and refresh the library again. This is a fairly time consuming process, so I would like to know why this information is being lost, is it a bug, and what better solutions are there to fixing it.
I can't help but wonder if it would be better to erase the database each night and rebuild it, rather than refresh it periodically, when refresh does not fix these broken entries and a rebuild will.
I have experienced 2 situations that perhaps others can explain.
1. I have had thumbnails disappear that formerly displayed with titles on the menu.
2. I have had items that formerly listed on the menu disappear, and in checking the log it said that 1. the item was not in the database but that 2. it would be added but then there were no more log entries indicating either success or failure of the add, but subsequent log entries continued to repeat 1. and 2. and the file never displayed.
The fix for both of these failures/lost database information was to rename the file in question, refresh the library, name the file back again and refresh the library again. This is a fairly time consuming process, so I would like to know why this information is being lost, is it a bug, and what better solutions are there to fixing it.
I can't help but wonder if it would be better to erase the database each night and rebuild it, rather than refresh it periodically, when refresh does not fix these broken entries and a rebuild will.