• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can I add new tables or add columns to existing tables in the old system’s Database for new system?

 
Lin Ahmad
Greenhorn
Posts: 9
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have an application, which I’ll call the old system. We are creating a new application and will be using some of the data from the same database that the old system is using.

I am thinking we can add new tables or add columns to existing tables in the old system’s Database.

Question:
1. Can I do that? Two systems using the same database?
2. We are using Java EE with EJB3. If we can just add new tables or add columns to existing tables to the old system’s Database, do we have to reverse engineer the models (entities) for the old system, or do we just run the JPA Generator again to get the models for the old system?
3. For the new system, how do I generate the entities?

Thanks in advance for your input!

lina
 
Les Morgan
Rancher
Posts: 711
17
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you run two systems out of the same DB? Yes, it is done all the time, but the real question is: Will your business rules allow it?

So the real answer becomes: only you can decide that according to your business rules of both systems.

So, how to get the models? Seems to me if you use the old DB you already have those generated. If you use a new DB, then use what ever tools are available to you to do so.
 
Lin Ahmad
Greenhorn
Posts: 9
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Les!

1. Yes, it boils down to the business rules .. some serious thoughts need to be considered.

2. We used our JPA Generator (in-house) to generate the entities for the old System, so I gather we'll re-run the JPA Generator for a specific entity of the old System if we need to add more columns to the associated table. Do you know if this is usually done this way when adding more columns to an existing table?

3. Agree, we will use our in-house JPA Generator to generate entities for the new System.

Regards,
lina
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic