denormalization - Automatic denormalizing by query -
i wonder if it's possible create logic automatically creates denormalized table , it's data (and maintains it) specific sql-like query.
given system user can maintain data model , data. data stored in "relational" tables, tables used user maintain data. if wants display data on webpage has write query (sql) automatically turn denormalized table , kept up-to-date when updating/deleting relational data.
let's got query this:
select t1.a, t1.b t1 t1.c = 1
the logic automatically create denormalized table copy of needed data according query. it's view (i wonder if views more performant approach). whenever query (give name) needed business logic replaced simple query on new table.
any update in t1 search queries t1 involved , update denormalized data automatically, performance win update rows infected (in example 1 row). that's point i'm not sure if it's achievable in automatic way. example query simple, if there queries joins, aggregation or sub queries?
does approach exist in nosql world , maybe can share experience it?
i know whether creating 1 table per query conflict best practises when using nosql databases.
i have idea how solve simple queries finding involved entity primary key when updating data , run query on specific entity again (so joins updated, too). aggregation , sub queries don't know how determine denormalized table's entity involved.
Comments
Post a Comment