NYCPHP Meetup

NYPHP.org

[nycphp-talk] data modelling vs. db design (was: ER Diagram tool for MySQL/OS X)

Daniel Krook krook at us.ibm.com
Tue Oct 4 14:50:06 EDT 2005


> > It seems like it would be worth the extra overhead to keep
> > behind-the-scenes
> > digest tables of commonly joined tables, is this 
> something that higher end
> > databases (ie. oracle) do?
> 
> It's not so much the higher-end databases do it, but that 
> they can do it,
> whereas I'm not sure mySQL can.
> 
> One method is to use triggers to update the digest tables 
> when detail
> tables are updated.
> 
> Another method is to use "materialized views", where you 
> create a view
> that is kept updated by the system.  In method 1 you do the work, in
> method 2 the system does the work.
> 
> barring these, you would update the digest tables yourself
> whenever the
> detail tables are updated.


DB2 uses a technology called Materialized Query Tables (MQTs) that are 
intended for this type of work.  They were introduced in version 8 but 
were known in a limited form as summary tables (ASTs) in version 7.

As described above, there are two ways to keep these "perma-views" in 
synch with the base tables, either user refreshed or system refreshed:
http://www.ibm.com/developerworks/db2/library/techarticle/dm-0509melnyk/

Since the Zend Core for IBM is based on PHP/DB2, these might be available 
to play around with.
http://www.zend.com/core/ibm/





Daniel Krook, Advisory IT Specialist 
Application Development, Production Services - Tools, ibm.com

Personal: http://info.krook.org/
BluePages: http://bluepages.redirect.webahead.ibm.com/
BlogPages: http://blogpages.redirect.webahead.ibm.com/






More information about the talk mailing list