Subscribe to this thread
Home - General / All posts - active column mfd8 history comparison
lionel

995 post(s)
#25-Jan-18 17:05

Hi

I read again Celko book 3 Tables 3.3 Computed Columns about SQL and for the author the main work is done on the DDL (Data definition language) to compute metadata so not the data store in table but how those data are manage ( restriction , constraint ) . I think Computed columns should be use on online SQL engine in commercial web site. I think because most of the time the complexity of relationship beetween tables is hidden by use php DAL ( Data Layer Abstraction ) layer on the Back End side of CMS.

DAL name could be for ADOdb, Pear DB for php , ezSQL for wordpress , JFactory for joomla ,Drupal Abstraction Layer from 4 to 8 , web2py/Web3py for python/GAE and ZODB for Zope/plone ....

this make me think if i don't do mistake that active column already exist in SQL Dialect ( don't know wich )

SQL general 

< column name > < data type > [GENERATED ALWAYS] AS (< expression >) [VIRTUAL | PERSISTENT]

or

< column name > < data type > [COMPUTED] BY (< expression >) 

CREATE TABLE Order_Details (order_nbr CHAR(15) NOT NULL REFERENCES Orders(order_nbr),

gtin CHAR(15) NOT NULL,

PRIMARY KEY (order_nbr, gtin),

order_qty INTEGER NOT NULL

unit_price DECIMAL(10,2) NOT NULL

line_tot DECIMAL(15,2) GENERATED ALWAYS AS (order_qty * unit_price) VIRTUAL );

I think the best way is to find functionalities support by SQL9 engine is to use the input filter of the QueryBuilder . At this time the word GENERATED , ALWAYS, VIRTUAL/ STORED return nothing .

should the active column in mfd9 when appear ll have to trigger update when change occur ?

This concept ( wiki , theory) are supported since specific version number ( year) in some database under different name :

---maria db 5.2 (2010)/ 10.1 ........=> virtual column

---MySQL 5.17.6 (2xxx) /5.7.21. ....=> generated columns

---SQLServer 2008(2008)...............=> Computed Columns

---FireBird 2.1(2014) /3.0.2..=> Computed Columns

---Manifold 8 .................................=> Active Columns

---postgresql ( no support ) ...........=> trick1

---oracle ( No support ) .................. => trick use BEFORE INSERT TRIGGER

Hope this ll give another point of view of active column in manifold 8 .

regard's

Attachments:
activecolumn.png


Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

lionel

995 post(s)
#25-Jan-18 17:40

here comparison capture screen howto use active column in manifold 8 and manifold 9 !

When i add a new value to the column like 3 in manifold 9 table , then there is no update on the column 2 that is a copy of Column . I was thinking we could go to the schema GUI to update column value but nothing occur !! I think it ll appear soon ? !!

regard's

Attachments:
aciveColumn_mdf8-mfd9.png
update_activeColumn_mfd9.png


Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

adamw


10,447 post(s)
#26-Jan-18 09:35

You don't see the value for the computed field in the second screen, because you didn't yet send changes to the record to the table. After you commit your changes (eg, using Ctrl-Enter), the table will compute the new value for the computed field and show it.

adamw


10,447 post(s)
#26-Jan-18 09:33

For now, documentation on SQL is in the general manual for 9. For syntax used to create, alter or delete computed fields, see SQL - SQL Statements.

We are working on a specialized document dedicated to SQL, it will be similar to the one we have on the object model (all keywords, all functions, examples for everything, etc).

should the active column in mfd9 when appear ll have to trigger update when change occur ?

If you change the value of a field that participates in the computed field, the computed field updates automatically.

lionel

995 post(s)
#26-Jan-18 10:33

I ll try again....mfd9 is shortcut Key oriented !!!(

Sorry for post wrong comments....


Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.