Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Please correct me if I'm misunderstanding your question. Also, I'm not familiar with Win32::ODBC, I use DBI. But this is more of a database design thing, not database or connection specific. While many database systems do have the functionality to specify tables' relationships, one relies on that functionality only to enforce referential integrity on a DBMS level. Your code still needs to account for those same relationships. To that end, one generally places a corresponding key field in each table, so that the tables can be JOINed in statements. So your servers_tbl already has an key field, which is a unique primary key. So far so good. Put a corresponding field in your drives table, called 'server_id' or something, and use that field to join on. Your basic data would look something like so.... servers_tbl: drives_tbl: _ID____NAME_____ _LETTER__SERVERID____FOO___ 1 SomeServer C 2 blahblah 2 OtherServer D 2 ahblahbla 956 YetAnotherServer C 956 foobarAnd a select to get all of OtherServer's drives might look something like: Hope this helps. In reply to Re: Inserting values into MS Access sub tables
by sedhed
|
|