I am currently working on a project where in which I need to package a database along with a JAVA API. The database should be secured in a sense , no one should be able to access it apart from the API. The point is that the data in the database is intellectual property and should not be exposed.Here is the catch. The database contains approximately 5 million records(4-5 columns only). I need to query it based on indexed fields with aggregate functions as well. I am quite aware there are java embedded databases such as derby,hsql and their likes. But I seriously doubt their performance.I know the requirement sounds weird. But atleast its a start.
The API is meant to be accessed concurrently and needs to retrieve lookup values from this database.Is this really a good design or is there something wrong with the approach.Any architectureal suggestions are welcome
NewInfo: If an embeded database seems not promising, how about an embeded file to be put along with the API. Would this be feasible ?
If you’re distributing the database, you’re not going to prevent people from accessing it directly. That’s just DRM, and as we know from long experience, DRM doesn’t work.
The simplest way to keep the data private is to keep it on a server you control, and provide a network API. That also allows you to use the database of your choice.
If you do keep it on the client, I think you’ll find the embedded databases perform better than you expect. Another good option is SQLite.
I’m not sure exactly what kind of concurrency you need. Do you envision multiple programs on a given client accessing the database simultaneously?