[OTDev] A Novell Approach to the O.R.M. Software
chung chvng at mail.ntua.grMon May 10 09:49:37 CEST 2010
- Previous message: [OTDev] error reporting
- Next message: [OTDev] searchable web services
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Dear All, It is well known in every developer that one of the most hard tasks when working on a large project is the database management. It becomes even harder when the specifications change from time to time forcing amendments of the database structure. It is even harder if one decides to work with prepared statements for increased performance and security and this is also the case in OpenTox. For these reasons, here in NTUA, we decided to tackle the issue of database creation/management in a more systematic and generic way by developing an O.R.M. (Object Relational Mapping) Java tool called DeciBell. In DeciBell, Java classes are related to relational database entities automatically and in a transparent way as far as the background operations are concerned. So, on the one hand, non-expert users can work on Java code exclusively while an expert one will be able to focus on more algorithmic aspects of the problem they try to solve rather than with trivial database management issues. In contrast to the existing ORM programs (Hibernate, Smyle, etc), DeciBell does not require any configuration files or composite query structures, but only a proper annotation of certain fields of the classes. This annotation is carried out by means of the Java Annotations which is a modern trend in Java programming. Among its supported features, DeciBell supports: * Annotation of primary and foreign keys explicitly. * One-to-many and Many-to-Many relations are automatically produced from Java Collections, Lists and Sets. Relational tables and Auxiliary weak entities are automatically generated and used. * Self-referencing Java classes (e.g. a User which has a friend-User) are automatically correlated to self-referencing tables. * Objects of unspecified internal structure are serialized as XML and stored in the database from where they can be easily retrieved. * Multiple primary keys are supported * The four essential database operations are supported using prepared statements (SELECT, INSERT, DELETE, UPDATE). * There is the ability to work with multiple databases from within the same project. One can also connect to the same database using two distinct users. * Support for the Derby JDBC server but we are also planning to provide support for the MySQL server. * DeciBell uses reflection only on startup. All necessary Fields and Constructors are backed up to be used directly when needed. No reflective operations are used on runtime. * DeciBell works exclusively with Prepared Statements for increased security and performance. * The beta version of DeciBell will come with support for Java hierarchy relational mapping, that is the Java hierarchical structure is reflected in the database. The alpha version (release for testing) of DeciBell is available at http://github.com/hampos/DeciBell and we would be glad if you try it and send us some comments. The results from the first 35 JUnit tests and all initial small-scale experiments are quite encouraging for us and we will keep providing more features. These results will be presented in a workshop which is part of the annual FOSS conference here in Athens. We have also started using DeciBell in our services and indeed it simplifies the source code (5000 lines deleted already due to DeciBell) and facilitates the development! Best Regards, Pantelis Sopasakis Charalampos Chomenides
- Previous message: [OTDev] error reporting
- Next message: [OTDev] searchable web services
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Development mailing list