Can I add new tables or add columns to existing tables in the old system’s Database for new system?
posted 1 year ago
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.
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?
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.
Out on HF and heard nobody, but didn't call CQ? Nobody heard you either. 73 de N7GH
posted 1 year ago
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.
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
the new thread boost feature brings a LOT of attention to your favorite threads