Create everything in Servoy or database

Hi,
Ath the monent we are using PostgreSql for our proyects, and we have a question.

it is better to create everything in Servoy or in the database?.

At the moment we are creating all in database, relations, fields, etc…

what is most recommendable and why?.

Thanks

Hi Juan Martin,

Is your question what tools to use to create these database objects ? PgAdmin vs Servoy ?
Or is your question to create some logic (foreign key constraints, etc) in the database (layer) or in Servoy (application layer)?

I don´t want a comparative between, my question is what is your recommendation.
What advantages I have with one and another?.

Is better to create the database and everything else in Servoy or dou you prefrer create database, fields, relations etc… with PgAdmin?
Which is your choice and why?

Thanks Robert

I wasn’t making a comparison, I was not clear what your question was.
But to answer your question I always use a DBA tool (be it PgAdmin or other) to create my database objects. Why ?
Because of the control you have over the datatypes and you can’t create any foreign key constraints via Servoy in the database for instance.
Also Servoy doesn’t offer you a way to create indices or dbsequences in the database. All things I use in my database(s).

Servoy offers a way to create columns in a table but it was never intended to be a DBA tool.

Hi,

You can do it both ways. The disadvantage of changing the database outside Servoy is that you will have to restart or refresh Servoy Developer for it to see the new database structure. If the built-in Servoy tools do everything you need to do, then stick to them, on the other hand if you already know and like some third-party tool you should be able to continue using it. Personally, I like the Ruby-on-Rails database migrations, so I use them to build and modify the databases I use with Servoy and this works very well for me, but I may be the only one doing it this way ;-)

My recommendation: don’t build the database using Servoy (meaning: databases, tables, PK, FK and PFK constraints), but build all the business logic of your application (including some relationships outside the scope of the database PK, FK and PK-FK constraints) with Servoy.

JC

PS: PFK are the FKs of a table product of a many-to-many relationship. It is a composite key - in the combination of two or more tables you can use the FKs of the related tables as the PK - when you need that type of relationship constraint.