I am designing a database using MySQL Workbench. I've defined a bunch of tables and set up relationship via foreign keys. I am preparing to forward engineer this model to a database schema. Where do I go from there?
What I am looking to do is take the new database and create the Java entities that will correspond to said tables for use in a SpringBoot application. I have seen a few posts that talk about different methods including Eclipse-based solutions that generate these artefacts, but many of these are older solutions and I'm not sure what the current "hot" tool is. Using Spring Source Tool Suite, I installed JBoss Tools which claims to do this via their Hibernate Tools Reverse Engineering utility, but I can't find any step-by-step documentation on how to proceed.
Since the project is in its infancy, I expect frequent changes to be made to the model and would like to consider a solution that can handle those types of updates as well.
In addition to the utilities listed in the comments, there are a couple of other possibilities I want to mention:
Maven Archetypes - Maven-based templating toolkits that can generate projects according to different configurations
JHipster - Yeoman-based templating toolkit that can generate opinionated best-practice Spring-Boot monolithic or microservice applications.
Number 2 is currently my go-to solution as it has a very active community and does a lot of "cool stuff".
Related
Recently, I started investigation of activiti framework to integrate it into my current project.
In our project we use teradata database.
So I added activiti dependency and created simple bpmn process for testing purposes.
I tested this process with h2 inmemory database and it worked fine.
But when configured project to use teradata I've got exception on spring boot application startup.
Caused by: org.activiti.engine.ActivitiException: couldn't deduct database type from database product name 'Teradata'
I have googled and found only this topic on internet space:
https://hub.alfresco.com/t5/alfresco-process-services/does-activiti-support-teradata-database/m-p/17587#M287
It seems there is no way to integrate activiti and teradata for now.
So the reason why I am here posting this question is that I just want to make sure there is no way to reach integration between those technologies.
Any suggestions and ideas will be welcomed. Thank you.
Activiti is an open source product and can be "adapted" to almost any back end transactional database. Transaction support is a must as any BPMN engine is basically a state machine.
Database access is isolated in the entity layer and specific SQL is managed by the Ibatis ORM.
To integrate a specific database, you will need to modify the entity and ORM layers.
Certainly possible and actually not that much work (typically about 30 hours in my experience), but it is work you have to do and maintain yourself.
I have an existing application based in LAMP and now I am looking to develop a new module of the existing system in Meteor.JS (Only New Module, keeping the existing system as it is)
I know that Mysql is not officially supported till now in Meteor. I have gathered some knowledge that, using a package numtel:mysql, we may get support for mysql, but I feel that is also limited.
Now, my question is: I have one project built on a LAMP stack, and I wanted to develop a new module for this in Meteor using the same Mysql database, as its contains existing records. (I know that I have to do some workaround for sign-in and authentication between two, and that I have to take care too.
But I just wanted to know, Is it possible to use the existing system (Mysql database) and what are the possibilities of creating a new module in Meteor. Can someone put shed light into this scenario?
Also, can someone suggest to me how to do single sign-on between these two different applications (LAMP and Meteor)
What are the steps that I should take in order to achieve this?
I have to develop a database that will be used for data acquisition, mainly measurements from micrometer which will be compared against a Reference Table inside the db. The platform is OS X. I have been looking at Valentina-DB, SQLite and even MySQL.
My main requirement is: The database will be used by factory workers which may not have a lot of experience in using software. Therefore, the front-end has to be extremely easy to use. This includes installation of the database and the front-end.
What are my options when it comes to custom GUI apps?
Most of databases have no GUI front-end to use "by factory workers for data acquisition" so you need to program it yourself.
One of the approaches would be to use Java Swing GUI and some Java-based database like Apache Derby maybe. You could put everything into runnable jars, talk to database exclusively directly (not network setup, no authentication) and Java is available on OS X form Oracle website. Seems relatively easy to setup and would also run under Windows if at the end desired. This is not the only possible approach but something that is likely to work.
There are many possible alternative approaches.
I want to know if Entity Framework can be used to create an architecture such that the asp.net application connects to MSSql,Mysql and Oracle database just by changing the connection string. If it is possible how do I proceed with it? If not what is the next best alternative? I am working on a product that is used by different customers - some prefer MsSql, some prefer Mysql and very few prefer Oracle. This means all three databases will have identical schema.
I have used EF with both Oracle and SQL Server. It works really well with SQL Server and reasonably well with Oracle.
However, I wouldn't have the application talk directly to EF itself. There are bound to be subtle differences between the databases that you don't want your core application to deal with. Instead, use something like the Repository Pattern and have your app talk to a repository interface. Create a repository for each database that you can plug into your app. You can certainly use EF in your repositories to map data between the database and your domain classes; but as good practice, your application shouldn't know about your data access or database technology.
If you are planning to use entity framework 6, currently not supported by oracle. But EF 5 would work right now. I am very optimistic that oracle would provide support for ef 6 in future. I have used EF5 to connect to mysql, oracle and sql server successfully using repository pattern and unit of work pattern and running successfully in production. Read also domain driven design (domain driven pattern/table pattern) and onion architecture
i was asked to do a book manager at university with hibernate and mysql. I have a simple question. If i choose to do a web application, grails already uses hibernate. GORM runns over hibernate. so to use mysql i only need to configure jdbc grails drivers and that's it?
i mean, "for the project you must use hibernate and mysql" - this are the requirements. So can i do that way?
thanks in advance,
JM
Yes, of course you can.
You'll need to get the MySQL JDBC driver from this location.
Grails? When you're new to programming? Whose idea was this?
Personally, I think that taking on all these unknowns is risky for someone who's "new to programming." Do you know anything about SQL or JDBC? Have you ever written a web project before? This could be difficult.
I don't know how to be more specific. Download the JDBC JAR from the link I gave you.
I'd recommend that you start with a JDBC tutorial first. Hibernate is not for you - yet.
Hibernate is an object-relational mapping tool (ORM). It's a technology that lets you associate information in relational database tables to objects in your middle tier. So if you have a PERSON table with columns id, first, and last Hibernate will let you associate those data with the private data members in your Person Java class.
That sounds easy, but it gets complicated quickly. Your relational and object models might have one-to-many and many-to-many relationships; Hibernate can help with those. Lazy loading, caching, etc. can be managed by Hibernate.
But it comes at a cost. And it can be difficult if you aren't familiar with it.
If you have a deadline, I'd recommend creating a Java POJO interface for your persistence classes and doing the first implementation using JDBC. If you want to swap it out for Hibernate later on you can do it without affecting clients, but you'll have a chance of making progress without Hibernate that way.