PROBLEM
There are two ways implement a data model using Skyway Builder: natively and externally. While the result is generally the same, there are some definite pros and cons to each approach. Based on the application requirements, a developer needs some guidance on deciding the best approach.
SOLUTION
The following table summarizes the differences between externally defined data models and natively defined data models.
Table 4.4. Comparison of Native and External Data Models
Native Approach | External Approach |
---|---|
Defined in an object-oriented manner; the patterns for storing object-oriented data in relational databases are very well defined and handled by the ORM framework and JPA provider. | Defined in a relational manner with object-oriented facade; relational schemas don't translate perfectly to objects. |
Data model created in same application development environment | Data model must be defined using separate tools; all developers will need access to DBMS client tools |
Data model changes are immediately available in the Skyway project | Data model must be rediscovered before being available to Skyway project |
Data model can easily evolve during application development; the initial definition of the data model can be pretty loose | All data model changes must be done externally; extra effort required to import data model; therefore you will probably want data model to be well defined before commencing with development |
Data model changes are version controlled with the other application development artifacts; easier to identify correct data model implementation for earlier versions of application | If data model changes are version controlled at all, it will be done separately from project |
DBMS expertise not needed | DBMS expertise needed; DBA may need to get involved too |
Data model can be deployed to any supported DBMS for maximum deployment flexibility | The data model is tied to the DBMS that it was derived from |
Sharing project is simply a matter of copying project folder | Sharing project requires copying the project folder and providing the ddl for the database |
While native data models offer maximum flexibility, there are occasions where external data models are the only or most suitable option. Here are some comman scenarios where you would use external data models:
Table 4.5. Scenarios for using external data models
Scenario | Description | ||
---|---|---|---|
Application Migration | New front-end to existing application database | ||
Integration | Integration with external systems | ||
Applicatoon Interface tables | To facilitate external applications integrating with Skyway application at DB level | ||
DB Centric Development | You are philosophically opposed to starting development until the database schema has been defined |