Templates

2003-08-28 Thread Vernaillen Tim
Title: Templates






Hello


I've a little question about templates.

Is it possible to design a template table and reuse this table for other (new) tables?

If it is, when you change something on the template, will it also change on the other tables?


Regards


Tim



encoded content removed -- binaries not allowed by ListGuru


RE: Templates

2003-08-28 Thread Stephane Faroult

What do you have in mind? Data or structure? If it's a matter of data if you replace 
'template' by 'table' and 'table' by 'view' in your question, the answer is yes.
If it's a matter of structure (enlarging a column, for instance), the answer is no.
You have templates of a sort in PL/SQL, when you define a parameter to be of 
table.column%type - if the definition change, the procedure will be automatically 
invalidated and recompiled. But this is not a syntax supported by 'CREATE TABLE' as 
far as I know. Dependencies are tracked by Oracle for stored objects only (procedures, 
functions, packages, views) - I mean structural dependencies, not data dependencies 
(foreign keys). The best you can do is write some procedure which follows the FK to PK 
links and duly alter tables when say a PK column has been altered, and perhaps have it 
fired by a DDL trigger on the 'master' or 'template' table.

HTH

SF

Hello

I've a little question about templates.
Is it possible to design a template table and reuse
this table for other =
(new) tables?
If it is, when you change something on the
template, will it also change =
on the other tables?

Regards

Tim
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephane Faroult
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).