[Qgis-community-team] Materialised / Rule based views

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Qgis-community-team] Materialised / Rule based views

Anita Graser
Hi,

I'm wondering about the term 
​"
Materialised Views (Rule based views)
​" in the lesson about rules:​

Maybe I'm missing something, but it doesn't seem like the example has anything to do with views. It's a nice rule that writes into a regular table, as far as I can tell. 

It would be good to provide an example that deals with inserting data into a view. 

What do you think about changing the subheading to "Creating a logging rule"?

Regards,
Anita

_______________________________________________
Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-community-team
Reply | Threaded
Open this post in threaded view
|

Re: [Qgis-community-team] Materialised / Rule based views

Tim Sutton-6
Hi

I (or whoever wrote it) could probably have chosen a better example. Materialised views change something that is normally read only (a view) into something that can be treated as a writable table (with the correct transactions being deferred to the tables that were used to create the view). So agreed we should either change the example or the heading :-)

Regards

Tim

On 11 Jan 2018, at 23:24, Anita Graser <[hidden email]> wrote:

Hi,

I'm wondering about the term 
​"
Materialised Views (Rule based views)
​" in the lesson about rules:​

Maybe I'm missing something, but it doesn't seem like the example has anything to do with views. It's a nice rule that writes into a regular table, as far as I can tell. 

It would be good to provide an example that deals with inserting data into a view. 

What do you think about changing the subheading to "Creating a logging rule"?

Regards,
Anita
_______________________________________________
Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-community-team







Tim Sutton

Co-founder: Kartoza
Project chair: QGIS.org

Visit http://kartoza.com to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux 
IRC: timlinux on #qgis at freenode.net


_______________________________________________
Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-community-team
Reply | Threaded
Open this post in threaded view
|

Re: [Qgis-community-team] Materialised / Rule based views

Richard Duivenvoorde
Hi,

just because I stumbled upon this last month:

A materialized view is originally just a table based on a query. So you
should not update the 'view' as upon a refresh, those edits will be
overwritten.

Postgresql has an 'official' materialized view

https://www.postgresql.org/docs/9.3/static/sql-creatematerializedview.html

which you can 'refresh' using a query:

https://www.postgresql.org/docs/9.3/static/sql-refreshmaterializedview.html

I think the heading in the training_manual should be something like:
'rule based updates' or so?

Regards,

Richard Duivenvoorde



On 11-01-18 23:32, Tim Sutton wrote:

> Hi
>
> I (or whoever wrote it) could probably have chosen a better example.
> Materialised views change something that is normally read only (a view)
> into something that can be treated as a writable table (with the correct
> transactions being deferred to the tables that were used to create the
> view). So agreed we should either change the example or the heading :-)
>
> Regards
>
> Tim
>
>> On 11 Jan 2018, at 23:24, Anita Graser <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Hi,
>>
>> I'm wondering about the term 
>> ​"
>> Materialised Views (Rule based views)
>> ​" in the lesson about rules:​
>> ​
>> https://docs.qgis.org/testing/en/docs/training_manual/database_concepts/rules.html
>>
>> Maybe I'm missing something, but it doesn't seem like the example has
>> anything to do with views. It's a nice rule that writes into a regular
>> table, as far as I can tell. 
>>
>> It would be good to provide an example that deals with inserting data
>> into a view. 
>>
>> What do you think about changing the subheading to "Creating a logging
>> rule"?
>>
>> Regards,
>> Anita
>> _______________________________________________
>> Qgis-community-team mailing list for organizing community resources
>> such as documentation, translation etc..
>> [hidden email]
>> <mailto:[hidden email]>
>> https://lists.osgeo.org/mailman/listinfo/qgis-community-team
>
> —
>
>
>
>
>
>
> *Tim Sutton*
>
> *Co-founder:* Kartoza
> *Project chair:* QGIS.org <http://QGIS.org>
>
> Visit http://kartoza.com <http://kartoza.com/> to find out about open
> source:
>
> Desktop GIS programming services
> Geospatial web development
> GIS Training
> Consulting Services
>
> *Skype*: timlinux 
> *IRC:* timlinux on #qgis at freenode.net <http://freenode.net>
>
>
>
> _______________________________________________
> Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/qgis-community-team
>

_______________________________________________
Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-community-team
Reply | Threaded
Open this post in threaded view
|

Re: [Qgis-community-team] Materialised / Rule based views

Andreas Neumann-4

Hi all,

I agree with Richard. Thanks for referencing the PG docs. Normally, materialized views are not meant to be manipulated (insert/update/delete). They are usually used to improve performance of complex queries.

Yes - with the power of PostgreSQL one could probably somehow also update also materialized views (with rules and triggers) - but in most cases it would not make sense and I wouldn't encourage it.

Greetings,
Andreas

On 2018-01-12 10:41, Richard Duivenvoorde wrote:

Hi,

just because I stumbled upon this last month:

A materialized view is originally just a table based on a query. So you
should not update the 'view' as upon a refresh, those edits will be
overwritten.

Postgresql has an 'official' materialized view

https://www.postgresql.org/docs/9.3/static/sql-creatematerializedview.html

which you can 'refresh' using a query:

https://www.postgresql.org/docs/9.3/static/sql-refreshmaterializedview.html

I think the heading in the training_manual should be something like:
'rule based updates' or so?

Regards,

Richard Duivenvoorde



On 11-01-18 23:32, Tim Sutton wrote:
Hi

I (or whoever wrote it) could probably have chosen a better example.
Materialised views change something that is normally read only (a view)
into something that can be treated as a writable table (with the correct
transactions being deferred to the tables that were used to create the
view). So agreed we should either change the example or the heading :-)

Regards

Tim

On 11 Jan 2018, at 23:24, Anita Graser <[hidden email]
<mailto:[hidden email]>> wrote:

Hi,

I'm wondering about the term 
​"
Materialised Views (Rule based views)
​" in the lesson about rules:​

https://docs.qgis.org/testing/en/docs/training_manual/database_concepts/rules.html

Maybe I'm missing something, but it doesn't seem like the example has
anything to do with views. It's a nice rule that writes into a regular
table, as far as I can tell. 

It would be good to provide an example that deals with inserting data
into a view. 

What do you think about changing the subheading to "Creating a logging
rule"?

Regards,
Anita
_______________________________________________
Qgis-community-team mailing list for organizing community resources
such as documentation, translation etc..
[hidden email]
<mailto:[hidden email]>
https://lists.osgeo.org/mailman/listinfo/qgis-community-team








*Tim Sutton*

*Co-founder:* Kartoza
*Project chair:* QGIS.org <http://QGIS.org>

Visit http://kartoza.com <http://kartoza.com/> to find out about open
source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

*Skype*: timlinux 
*IRC:* timlinux on #qgis at freenode.net <http://freenode.net>



_______________________________________________
Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-community-team

_______________________________________________
Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-community-team



_______________________________________________
Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-community-team
Reply | Threaded
Open this post in threaded view
|

Re: [Qgis-community-team] Materialised / Rule based views

Anita Graser
I've changed the heading to better represent the content. See PR https://github.com/qgis/QGIS-Documentation/pull/2322

Regards,
Anita



On Fri, Jan 12, 2018 at 10:57 AM, Andreas Neumann <[hidden email]> wrote:

Hi all,

I agree with Richard. Thanks for referencing the PG docs. Normally, materialized views are not meant to be manipulated (insert/update/delete). They are usually used to improve performance of complex queries.

Yes - with the power of PostgreSQL one could probably somehow also update also materialized views (with rules and triggers) - but in most cases it would not make sense and I wouldn't encourage it.

Greetings,
Andreas

On 2018-01-12 10:41, Richard Duivenvoorde wrote:

Hi,

just because I stumbled upon this last month:

A materialized view is originally just a table based on a query. So you
should not update the 'view' as upon a refresh, those edits will be
overwritten.

Postgresql has an 'official' materialized view

https://www.postgresql.org/docs/9.3/static/sql-creatematerializedview.html

which you can 'refresh' using a query:

https://www.postgresql.org/docs/9.3/static/sql-refreshmaterializedview.html

I think the heading in the training_manual should be something like:
'rule based updates' or so?

Regards,

Richard Duivenvoorde



On 11-01-18 23:32, Tim Sutton wrote:
Hi

I (or whoever wrote it) could probably have chosen a better example.
Materialised views change something that is normally read only (a view)
into something that can be treated as a writable table (with the correct
transactions being deferred to the tables that were used to create the
view). So agreed we should either change the example or the heading :-)

Regards

Tim

On 11 Jan 2018, at 23:24, Anita Graser <[hidden email]
<mailto:[hidden email]>> wrote:

Hi,

I'm wondering about the term 
​"
Materialised Views (Rule based views)
​" in the lesson about rules:​

https://docs.qgis.org/testing/en/docs/training_manual/database_concepts/rules.html

Maybe I'm missing something, but it doesn't seem like the example has
anything to do with views. It's a nice rule that writes into a regular
table, as far as I can tell. 

It would be good to provide an example that deals with inserting data
into a view. 

What do you think about changing the subheading to "Creating a logging
rule"?

Regards,
Anita
_______________________________________________
Qgis-community-team mailing list for organizing community resources
such as documentation, translation etc..
[hidden email]
<mailto:[hidden email]>
https://lists.osgeo.org/mailman/listinfo/qgis-community-team








*Tim Sutton*

*Co-founder:* Kartoza
*Project chair:* QGIS.org <http://QGIS.org>

Visit http://kartoza.com <http://kartoza.com/> to find out about open
source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

*Skype*: timlinux 
*IRC:* timlinux on #qgis at freenode.net <http://freenode.net>



_______________________________________________
Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-community-team

_______________________________________________
Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-community-team




_______________________________________________
Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-community-team
Reply | Threaded
Open this post in threaded view
|

Re: [Qgis-community-team] Materialised / Rule based views

Tim Sutton-6
Thanks Anita!

On Sat, Jan 20, 2018 at 4:10 PM, Anita Graser <[hidden email]> wrote:
I've changed the heading to better represent the content. See PR https://github.com/qgis/QGIS-Documentation/pull/2322

Regards,
Anita



On Fri, Jan 12, 2018 at 10:57 AM, Andreas Neumann <[hidden email]> wrote:

Hi all,

I agree with Richard. Thanks for referencing the PG docs. Normally, materialized views are not meant to be manipulated (insert/update/delete). They are usually used to improve performance of complex queries.

Yes - with the power of PostgreSQL one could probably somehow also update also materialized views (with rules and triggers) - but in most cases it would not make sense and I wouldn't encourage it.

Greetings,
Andreas

On 2018-01-12 10:41, Richard Duivenvoorde wrote:

Hi,

just because I stumbled upon this last month:

A materialized view is originally just a table based on a query. So you
should not update the 'view' as upon a refresh, those edits will be
overwritten.

Postgresql has an 'official' materialized view

https://www.postgresql.org/docs/9.3/static/sql-creatematerializedview.html

which you can 'refresh' using a query:

https://www.postgresql.org/docs/9.3/static/sql-refreshmaterializedview.html

I think the heading in the training_manual should be something like:
'rule based updates' or so?

Regards,

Richard Duivenvoorde



On 11-01-18 23:32, Tim Sutton wrote:
Hi

I (or whoever wrote it) could probably have chosen a better example.
Materialised views change something that is normally read only (a view)
into something that can be treated as a writable table (with the correct
transactions being deferred to the tables that were used to create the
view). So agreed we should either change the example or the heading :-)

Regards

Tim

On 11 Jan 2018, at 23:24, Anita Graser <[hidden email]
<mailto:[hidden email]>> wrote:

Hi,

I'm wondering about the term 
​"
Materialised Views (Rule based views)
​" in the lesson about rules:​

https://docs.qgis.org/testing/en/docs/training_manual/database_concepts/rules.html

Maybe I'm missing something, but it doesn't seem like the example has
anything to do with views. It's a nice rule that writes into a regular
table, as far as I can tell. 

It would be good to provide an example that deals with inserting data
into a view. 

What do you think about changing the subheading to "Creating a logging
rule"?

Regards,
Anita
_______________________________________________
Qgis-community-team mailing list for organizing community resources
such as documentation, translation etc..
[hidden email]
<mailto:[hidden email]>
https://lists.osgeo.org/mailman/listinfo/qgis-community-team








*Tim Sutton*

*Co-founder:* Kartoza
*Project chair:* QGIS.org <http://QGIS.org>

Visit http://kartoza.com <http://kartoza.com/> to find out about open
source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

*Skype*: timlinux 
*IRC:* timlinux on #qgis at freenode.net <http://freenode.net>



_______________________________________________
Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-community-team

_______________________________________________
Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-community-team






--
------------------------------------------------------------------------------------------

Tim Sutton
Visit http://kartoza.com to find out about open source:
 * Desktop GIS programming services
 * Geospatial web development
* GIS Training
* Consulting Services
Skype: timlinux Irc: timlinux on #qgis at freenode.net
Tim is a member of the QGIS Project Steering Committee
-------------------------------------------------------------------------------------------
Kartoza is a merger between Linfiniti and Afrispatial

_______________________________________________
Qgis-community-team mailing list for organizing community resources such as documentation, translation etc..
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-community-team