This is the documentation for the javadbchem project. This page gives an overview over the project, more detailed information is in the linked pages.
javadbchem is a system for building Java code which you put into your project and which then allows you to read and write chemical structures to and from a relational database. Note that javadbchem itself is not the software you use for reading and writing, rather it is a software generating a customized software which does the tasks. The chemical data are stored in a couple of tables, which can be extended by custom columns (and tables) before the Java code is built. The javadbchem code is licenced under LGPL.
You need to check out the javadbchem project from svn or download the release file (note there is no binary release, you will see why). In this you find a file describing the structure database (this uses Torque, the role of Torque is explained in the details pages). You add any attributes and tables you like, set parameters like the name for your database, run ant and a jar file will be generated. You put this jar into your project and you then have classes providing operations like "save this compound", "search this structure", "do a substructure search with this structure" etc. The save operation works with a compound in that sense that each unique compound is only saved once, further saves return the identifier of the existing entry.
Further reading:
Howto on generating code
Howto on using the generated code
How does structure identification work
The structures are saved in the database in a set of tables (see ER diagram below). There is one for molecules, coantaining molecule properties, one for atoms, containing atom properties like symbol, charge etc., each atom referencing one molecule, and a bond table for bond properties (order etc.), each referencing two atoms. You can imagine this a bit like a mol file, where the molecule table has one for each file, the atom table having an entry for each line in the atom block of the mol file and the bond table having an entry for each line of the bond block.
The advantage of this (as opposed to systems where the structures are saved in monolithic blobs) is that you can a) extend the bond/atom tables with custom properties and b) reference them in other tables. You can use primary keys and enforce referential integrity with database means. This is not possible if these entities do not exist in the database.
Whilst javadbchem is a new project, the code and technology in it is proven. The chemistry logic comes from CDK, which is a mature product. The fingerprinting is the same as in Orchem, which is used e. g. in Chebi. The integration using Torque and the database scheme is the same as used in nmrshiftdb2. Effectivly nmrshiftdb2 runs javadbchem, although the javadbchem code was extracted from nmrshiftdb2 code and is still in nmrshiftdb2 as part of the nmrshiftdb2 codebase and not separate, but it the same system. So this is proven technology - which does not mean we guarantee an error-free software and there are most likely bugs in the javadbchem build system, which should not affect use of the code once generated. Still the software comes with no warranty, see the licence and Readme included in the download.
javadbchem is licensed under the GPL V 3.0. This means that changes to the build system and the files in the distribution fall under this license. If you use the software to generate a jar file and database schema for use in your own project, for my understanding the generated files do not fall under any license, so you are free to use them as you like (this is because a machine generated product is not considered a work in the sense of the Berne Convention). Please note that the third party jars you need to use still carry a licence, specifially Torque is under the Apache licence. This does not constitute legal advise and if in doubt seek independent advice.
Wiki: HowTo Generation
Wiki: HowTo Usage
Wiki: Performance
Wiki: Structure Identification