Shan
If you want your local and remote databases to implement the same interface and DatabaseException is made to extend IOException and RemoteException already extends IOException then you have your answer.
The fact that in remote mode your Data object will throw both Database and RemoteExceptions and in local mode it will only throw DatabaseExceptions doesn't change the fact that both modes are only throwing a type of IOException.
Now if you use an Adapter pattern and have a factory that creates either local or remote adpater instances according to the type of connection mode then you are perfectly set up to process the actual exceptions thrown in the way appropriate by the type of database you are connected to.
For instance your LocalAdapter might chose to just catch IOException. This will enable it to catch all exception types thrown by the DataInterface and to process them as DatabaseExceptions as we know that in local mode no RemoteExceptions will actually be thrown. In the RemnoteAdapter we might chose to distinguish between Remote and DatabaseExceptions and process them differently.
So yes it is possible to use the Factory pattern, you can use the Adapter pattern to translate the actual exceptions thrown into something that your program can understand and having all exceptions inherit from the same parent class enables Data to implement the same interface in different modes.
Hope that helps
Sam