Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is there a way to create a template table, somewhat akin to an OO class?

397444Jun 25 2003 — edited Jun 26 2003
Hi everyone,

Here is my novice question of the day.

Say I would like to create a table which will describe the attributes of a set of tables. Each table in the set will have exactly the same field names, datatypes, etc..., but each table will represent a completely distinct data set. Is there a way to designate a table as a 'template' and then create tables which are instances of the table?

I know I could do something inelegant like TableA_Version1, TableA_Version2. But that just seems very clunky for the 21st century. I also do not wish to inter-mingle the data from TableA_Version1 and TableA_Version2 by putting a field in TableA called version.

Say, for example, my database contains information on different financial models. TableA would be the template or parent describing the characteristics which all of the models have. But each model would need to have its own 'version' of TableA.

Time may also logically separate the tables into different 'snapshots'. Again, TableA_DateStamp1, TableA_DateStamp2, seems unwieldy. What would be your suggestions here?

Thank you again for helping me with my beginner questions! I very much appreciate your time!

Holly (I was set up with the wrong name... Oracle is fixing that...I hope!)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 24 2003
Added on Jun 25 2003
5 comments
168 views