4.5. Generating an application from an existing database
Manually create tables in your database. (To switch to a different database, create a new project, and select the correct database.) Then, select :
![](https://access.redhat.com/webassets/avalon/d/JBoss_Enterprise_Application_Platform_Common_Criteria_Certification-5-Seam_Reference_Guide-en-US/images/26d61a3b086fcbde85061fd8796d29c7/generate_entities_0.png)
With JBoss Developer Studio, you can either reverse-engineer entities, components and views from a database schema, or reverse-engineer components and views from existing JPA entities. This tutorial concerns reverse-engineering from the database.
Restart the deployment:
![](https://access.redhat.com/webassets/avalon/d/JBoss_Enterprise_Application_Platform_Common_Criteria_Certification-5-Seam_Reference_Guide-en-US/images/e61b59f89b9085b78082b697e87690f1/restart_deployment.png)
Then go to
http://localhost:8080/helloworld
. You can browse the database, edit existing objects, and create new objects. The code generated here is very simple. Seam was designed so that data access code is easy to write by hand, even without reverse-engineering.