If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > How to create subtypes?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-01-12, 11:13
zahadum zahadum is offline
Registered User
 
Join Date: Feb 2012
Posts: 2
Question How to create subtypes?

For example, I need to define a LEGAL ENTITY supertype and some subtypes under LEGAL ENTITY as SUPPLIER, CUSTOMER and MANUFACTURER...

When I insert an instance of CUSTOMER, Oracle will create both supertype LEGAL ENTITY and subtype CUSTOMER instances for me.

But, suppose I have someone who is a CUSTOMER and a SUPPLIER at same time...how can I insert it as CUSTOMER and SUPPLIER under the same LEGAL ENTITY instance?

Thanks in advanced for your help.
Reply With Quote
  #2 (permalink)  
Old 02-01-12, 11:21
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 6,416
design tables to Third Normal Form
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Reply With Quote
  #3 (permalink)  
Old 02-01-12, 11:53
zahadum zahadum is offline
Registered User
 
Join Date: Feb 2012
Posts: 2
Thanks for your reply but I intended to use the object-relational schema... IŽd like to create types (CREATE TYPE statement) and a table of TYPE...

Is there someone here using oracle object-relational schema?

Thanks
Reply With Quote
  #4 (permalink)  
Old 02-01-12, 11:58
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 6,416
>I intended to use the object-relational schema... IŽd like to create types (CREATE TYPE statement) and a table of TYPE...
>Is there someone here using oracle object-relational schema?

Some/many/most folks avoid doing so because it complicates the application without providing significant benefit.
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Reply With Quote
  #5 (permalink)  
Old 02-01-12, 14:36
beilstwh beilstwh is offline
Lead Application Develope
 
Join Date: Jun 2004
Location: Liverpool, NY USA
Posts: 2,222
Ive been programming oracle databases for 15 years and have never found an occasion to use types except in ref cursors where daughter tables didn't show more flexibility and usefulness.
__________________
Bill
You do not need a parachute to skydive. You only need a parachute to skydive twice.
Reply With Quote
Reply

Tags
insert, object database, object type

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On