VbzCart/docs/tables/cache flow: Difference between revisions
Jump to navigation
Jump to search
imported>Woozle (updated purpose) |
m (Woozle moved page VbzCart/VbzCart/tables/cache flow to VbzCart/docs/tables/cache flow without leaving a redirect: part 3/5) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
==About== | ==About== | ||
* '''Purpose''': Keeps track of data dependencies between tables – which queries update cached data in which tables from which sources | * '''Purpose''': Keeps track of data dependencies between tables – which queries update cached data in which tables from which sources | ||
* '''Used by ''': {{vbzcart/query|qryCache_Flow_Procs}} | |||
* '''Refers to''': {{vbzcart|table|cache_tables}}, {{vbzcart|table|cache_queries}} | * '''Refers to''': {{vbzcart|table|cache_tables}}, {{vbzcart|table|cache_queries}} | ||
* '''Fields''': | |||
** '''doWrite''': TRUE = ID_Table is ''written'' to (i.e. TARGET table); otherwise it is only ''read'' from (SOURCE). | |||
* '''Notes''': | |||
** If it turns out that some tables are both read and written, then we might want a doRead field as well. | |||
* '''History''': | * '''History''': | ||
** '''2010-11-09''' Renamed data_flow -> cache_flow; ID_Proc -> ID_Query | ** '''2010-11-09''' Renamed data_flow -> cache_flow; ID_Proc -> ID_Query | ||
** '''2010-11-13''' Significant revision: ID_Srce/ID_Dest replaced by ID_Table/doWrite | |||
==SQL== | ==SQL== | ||
<section begin=sql /><mysql>CREATE TABLE `cache_flow` ( | <section begin=sql /><mysql>CREATE TABLE `cache_flow` ( | ||
ID_Proc INT NOT NULL COMMENT "cache_queries.ID of stored procedure which calculates Dest data from Srce data", | |||
ID_Table INT NOT NULL COMMENT "cache_tables.ID of a table", | |||
doWrite BOOL COMMENT "TRUE = writes to this table", | |||
Notes VARCHAR(255) COMMENT "loose explanatory or descriptive notes", | |||
PRIMARY KEY (`ID_Query`,`ID_Table`) | |||
) ENGINE = MYISAM;</mysql> | |||
<section end=sql /> | |||
===previous version=== | |||
<mysql>CREATE TABLE `cache_flow` ( | |||
ID_Srce INT NOT NULL COMMENT "cache_tables.ID of SOURCE table", | ID_Srce INT NOT NULL COMMENT "cache_tables.ID of SOURCE table", | ||
ID_Dest INT NOT NULL COMMENT "cache_tables.ID of DESTINATION table", | ID_Dest INT NOT NULL COMMENT "cache_tables.ID of DESTINATION table", | ||
Line 12: | Line 27: | ||
PRIMARY KEY (`ID_Srce`,`ID_Dest`,`ID_Query`) | PRIMARY KEY (`ID_Srce`,`ID_Dest`,`ID_Query`) | ||
) ENGINE = MYISAM;</mysql> | ) ENGINE = MYISAM;</mysql> | ||
Latest revision as of 01:56, 25 February 2024
About
- Purpose: Keeps track of data dependencies between tables – which queries update cached data in which tables from which sources
- Used by : Template:Vbzcart/query
- Refers to: Template:Vbzcart, Template:Vbzcart
- Fields:
- doWrite: TRUE = ID_Table is written to (i.e. TARGET table); otherwise it is only read from (SOURCE).
- Notes:
- If it turns out that some tables are both read and written, then we might want a doRead field as well.
- History:
- 2010-11-09 Renamed data_flow -> cache_flow; ID_Proc -> ID_Query
- 2010-11-13 Significant revision: ID_Srce/ID_Dest replaced by ID_Table/doWrite
SQL
<section begin=sql /><mysql>CREATE TABLE `cache_flow` (
ID_Proc INT NOT NULL COMMENT "cache_queries.ID of stored procedure which calculates Dest data from Srce data", ID_Table INT NOT NULL COMMENT "cache_tables.ID of a table", doWrite BOOL COMMENT "TRUE = writes to this table", Notes VARCHAR(255) COMMENT "loose explanatory or descriptive notes", PRIMARY KEY (`ID_Query`,`ID_Table`) ) ENGINE = MYISAM;</mysql>
<section end=sql />
previous version
<mysql>CREATE TABLE `cache_flow` (
ID_Srce INT NOT NULL COMMENT "cache_tables.ID of SOURCE table", ID_Dest INT NOT NULL COMMENT "cache_tables.ID of DESTINATION table", ID_Query INT NOT NULL COMMENT "cache_queries.ID of stored procedure which calculates Dest data from Srce data", Notes VARCHAR(255) COMMENT "loose explanatory or descriptive notes", PRIMARY KEY (`ID_Srce`,`ID_Dest`,`ID_Query`) ) ENGINE = MYISAM;</mysql>