Last week I have written a blog post on **Orman ** – a new lightweight Java Object-Relational Mapping Framework I’m coding. [hacker news story] Now I will demonstrate how easy is to design and create a database using only Java classes. Let the proof-of-concept begin!
The scenario we will use is a very primitive airline company management system project I have from my Databases course this year, I will reuse it here even though it is very complicated for a simple app that Orman Framework is aimed for, but Orman can handle this.
Requirements: Basic knowledge of Java and databases, how to add Orman framework to a Java project.
Step 1. Create your environment
Create a new Java project, add orman.jar to your path, download SQLite binaries. Create a package to put your entity classes in them. Then let’s start to create entities.
Step 2. Create entities (boring part)
Read More →Recommended read: Making your old Java classes Orman Entities Now we need to design our entity classes. I have an ER (entity-relationship) diagram that introduces how our database is going to be like from my course project. Just give 1 or 2 minutes and inspect it to understand rest of the tutorial: