Does a database rewrite it's entire file everytime new data is stored? Is it able to selectively remove parts of it's file when data is to be deleted or does it need to rewrite the whole file? Is this done with fstream?

Paul