First, mean what database is --> which DBMS
so, ur database name is Material DB, ok then
from what u explain here, i don't see any relation between table 3 to 1 and 2
this statement of mine ( i think u already know it )
so, u got ur own reason to make ur database design to look like that, i can't argue with that, in fact i know nothin to ur problemsto linked ( Relation ) between one table to other - must have same data type and values instead ! ( consider to re-construct )
but, if u want it :
==========================
Make [table 3] as detail table
contain : id3,id1,id2, [child field ] . . .
now, from that IDs, [ id2 linked to Table 2 ] and [ id1 linked to Table 1 ]
so, [Table 1] and [Table 2] is Master Tables
==========================
from ur design, u can make [Table 3 ] not relation to any tables in ur DB.
so, da only way u can do is Hard Coding, check one by one, split da [Id3] values, to sync values from other tables [ Table 1 ] and [ Table 2 ]
[ id1 = MA ] - [ id2 = 02 ] - [ id3 = MA02 (gabungan id1 dan id2) ]
u see, how about if [ id1 = MA ... MZ or AA ... AZ , etc ] If [ id2 = 99 ] then u lost ur path there - [ id3 = MZ99 ]
you'll make new problems in da end. ( but, i know nothin about ur problems .. so, consider it obey ur self )
( truely i hate relations - but, if i want to chase ma database i should to do data analizing first, about what will i get, then design da tables )
=============================================
about db code ::.
=============================================
If this is ADODB Classes and their trees Classes
=============================================
ADODB <--> Engine Drivers <--> Databases
|
< connection link classes >
(0) Connection Classes <-- Recordset Classes (1)
< subtrees of Recordset Classes >
(1) Recordset <--(2)Class Tables <--(3)Class Fields <---(4)Class Data Type, etc --
=============================================
Then u can choose which Classes are quicker to use for certain sql statement of yours, etc
I'll wait ur comments, later
Regard, Positive+







Reply With Quote





Bookmarks