db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Shields <blanketyblank...@gmail.com>
Subject Overriding one database's content with another
Date Sun, 13 Sep 2009 20:52:19 GMT
I'm currently developing a Java version of Mids' Hero Designer 
<http://www.cohplanner.com/>, using Derby as my data storage/retrieval. 
The data in the database is representative of the archetypes, powersets, 
powers, and enhancements in the online game City of Heroes 
<http://www.cityofheroes.com/>. Updates to the program would include 
updated values in the database to reflect changes to the game.

One of the features I'd like for the program is to allow user 
customization of the database without interfering with the "official" 
values, and without updates to the official values interfering with user 
changes. User customization would be used, for example, to input 
upcoming changes to the game by the user, before an official program 
update is created. Alternatively, as a way to show the effects of 
hypothetical changes when making a suggestion for the game.

My idea for achieving this was to maintain two databases: 'Data', 
storing the official information, and 'User_Data', storing the 
user-generated changes from Data. What I want is for any SELECT 
statement to be passed to both DBs; results in User_Data which are not 
in Data would be returned (information added by the user), results in 
Data which are not in User_Data would be returned (information not 
touched by the user), and results in both databases would return the 
version from User_Data (information modified by the user).

The problem is, I'm not exactly certain how to go about it. I suppose I 
need to create some sort of abstraction layer between my queries and 
that actual database access, but how would I combine the ResultSets?

View raw message