Presentation is loading. Please wait.

Presentation is loading. Please wait.

UML CS Dept. 95f523 hcg-struct-migration.ppt - 1 RJL pre-981107 Migration Strategy (hcg_* to TT->TS TS<-VW) l Proposed 96s523 chgen project l Hcg-structs.

Similar presentations


Presentation on theme: "UML CS Dept. 95f523 hcg-struct-migration.ppt - 1 RJL pre-981107 Migration Strategy (hcg_* to TT->TS TS<-VW) l Proposed 96s523 chgen project l Hcg-structs."— Presentation transcript:

1 UML CS Dept. 95f523 hcg-struct-migration.ppt - 1 RJL pre Migration Strategy (hcg_* to TT->TS TS<-VW) l Proposed 96s523 chgen project l Hcg-structs used by chgen and pr-util.a l Difficult to understand and maintain l Reverse-engineer --> equiv. data model l Add to schema.h and pr_loaded view l Update, continuously track hcg_structs l Specify and check runtime invariants l Incrementally convert each client l Maintain duality during coexistence l At 100% cut-over, can eliminate hcg_*.

2 UML CS Dept. 95f523 hcg-struct-migration.ppt - 2 RJL pre Current hcg- Structures hcg_ts-list: Array [0.HXCG_NUM_TABLES] of ts_list_type: ts_list_type: Array[0..MAXVERSIONS- 1] of ts_list_elt_type]: ts_list_elt_type: maxrow // largest row number[or pkey?] value in version rcount // total number of table rows in version hcg_view_list_type: // holds version# of each table in each named view {int num_views// at most MAXVIEWS (= 10) Array[0..MAXVIEWS] of view_elt_type viewname[30] char// runtime value - must search by name mode char // r=read; w=write; a=append version_list: Array[0..HCG_NUM_TABLES-1] of version_list_elt: version_list_elt: char//unsigned int [0..MAXVERSION <=255] }hcg_view_list

3 UML CS Dept. 95f523 hcg-struct-migration.ppt - 3 RJL pre hcg_table hierarchy hcg_ts_list ts_list ts_type maxrow rcount hcg_view_list num_viewsI2 view_element_type viewname c30 modec1 version_list_elt versionNoc1 Views and table versions for each table 1:MAXVIEWS 1:HCG_NUM_TABLES 1:MAXVERSIONS root level (one row in each) (one row per view) (one row per table) (per table version in loaded views?) (one row per view name and table version) ______ Proposal: Merge top tables; merge bottom tables.

4 UML CS Dept. 95f523 hcg-struct-migration.ppt - 4 RJL pre Hcg-equivalent Data Model SV Schema Version schemaNamec30 schemaVersion i2 num_tablesi2... TT Table Type ttabbrevc4 maxveri2 rcounti2 TA Table Attribute (as in chgen v9)... TS TableStats versionNoi2 maxrowi2 vrcounti2 VV ViewVersion viewName c30 mode c1 num_tables i2 Tables VV, TS and VS contain the same attributes that chgen now declares and maintains as the hcg_* structures in schemaname.h. (Exception: version rcount becomes vrcount.) This model adds tables VV and TS to the genv9 schema SV-->TT-->TA

5 UML CS Dept. 95f523 hcg-struct-migration.ppt - 5 RJL pre Path Extensions to MetaSchema l Schema tables TT andTA do not capture the schema topology. l Network paths are defined by fkeys and connect tables. l Fkey (FK) is a sub-class of TA. l Path (PA) is a sequence of fkeys. l Many PAths share fkeys. l Table IK (Intermediate fKey) associates FK’s and PAths. l From table PA, access macros can be defined. l Each path has an orientation; IK identifies path’s first or last fkey. SV TT TA FK PA IK

6 UML CS Dept. 95f523 hcg-struct-migration.ppt - 6 RJL pre Alternate Path Data Model (2) l Paths are either direct (one fkey) or composite (multi-fkey) l Each PAth has exactly one fkey (FK) component. l PAths are linear sequences, with a ‘head’ fkey and a ‘tail’ composite path or sub-path. l This leads to a cyclic schema: PA-- >FK:CP-->PA...->FK. l Eventually the PA shrinks to an fkey and CP vanishes (mincard = 0). l Chgen cannot handle alternate paths, only unique ones. SV TT TA FK PA SP 1:10:1 1:1

7 UML CS Dept. 95f523 hcg-struct-migration.ppt - 7 RJL pre Alternate Path Data Model (3) l Paths are either direct (one fkey) or composite (multi-fkey) l Each PAth has exactly one fkey (FK) component. l PAths are linear sequences, with a ‘head’ fkey and a ‘tail’ composite path or sub-path. l Upward paths branch out at each table with In-degree >1. l Fkeys become part of more than one PAth; therefore, FK--->PA is 1:1::1:M. l The dashed TT-->PA relation is redundant. SV TT TA FK PA pathLength PT (PathTail) 1:M 0:1 1:1 rest-of -path bottom -link alternate upward paths


Download ppt "UML CS Dept. 95f523 hcg-struct-migration.ppt - 1 RJL pre-981107 Migration Strategy (hcg_* to TT->TS TS<-VW) l Proposed 96s523 chgen project l Hcg-structs."

Similar presentations


Ads by Google