Roenbaeck / anchor

Anchor Modeler is a database modeling tool for creating database models that handles temporalization using the sixth normal form.
http://www.anchormodeling.com
Other
90 stars 24 forks source link

Trigger generation for PostgreSQL does not work in version 0.99.6.5 test #140

Open KvitkaAndrey opened 3 years ago

KvitkaAndrey commented 3 years ago

Hi, Trigger generation for PostgreSQL does not work in version 0.99.6.5 test. When you issue a next production release generating code for the PostgreSQL? And whether there will be a new version of code generation for Oracle?

delostilos commented 3 years ago

Hi,

The PostgreSQL generation in 0.99.6.5 test is work in progress. I have to finish some work on the perspectives first before I start on the triggers. It's all work in spare time.

As for the Oracle version. If we replace it. We will probably do it for version 20 of Oracle. Then we can use SQL Macros to get performant table functions. See this blog entry about it: https://blog.sqlora.com/en/parameterized-views-in-oracle-no-problem-with-sql-macros/

KvitkaAndrey commented 3 years ago

Thanks! I will be very much waiting for a release for PostgreSQL.

Roenbaeck commented 3 years ago

@delostilos I thought you were being ironic with Oracle version 20. I never noticed that they made a jump after 12, which was the last version I gave up on because of lacking features and poor query optimization.

KvitkaAndrey commented 3 years ago

You can talk a lot and a long time about the merits and shortcomings of Oracle, but I would prefer to make database under Oracle or under PostgreSQL. I think I'm not alone in that opinion. For the current task, I would have enough PostgreSQL.

KvitkaAndrey commented 3 years ago

SQL Macros in Oracle 19.8 https://connor-mcdonald.com/2020/09/14/when-can-i-use-sql-macros/

janosroden commented 3 years ago

@Roenbaeck I tried to use your awesome modeler in my projects but every time I hit the wall called mssql pricing. MSSQL standard costs $900 minimum. I love the whole 6th NF idea but hard to convince my boss to pay instead of deleted_at. MSSQL express seems a good workaround at first, but it's a timed bomb due to its limitations.

Are there particular reasons why you stick with mssql? I'm really not an expert but as far as I know postgres has the same quality at least. I'm pretty sure the whole project would be much popular with postgres first development style. Could you please consider such an option?

Anyway, I'm trying to fix at least the unidirectional postgres stuff, it's not very broken (we'll see). @delostilos are there complex todos here? I plan to copy the missing files from mssql and rewrite to pg style.

delostilos commented 3 years ago

Hi @janosroden,

the next thing to be created are the Tie perspectives. You can peek in the uni_old directory to check the old version. In the PostgreSQL_uni.directive file you can see the parts not done being commented out. The parts that are not done, are already copies of the MSSQL version. First you should check if the current PostgreSQL unidirectional parts that are in place work in your PostgreSQL 12 or higher version.