Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 226729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:32:22+00:00 2026-05-11T19:32:22+00:00

how to make relations 1 to n and n to n in oracle objects?

  • 0

how to make relations 1 to n and n to n in oracle objects?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:32:22+00:00Added an answer on May 11, 2026 at 7:32 pm

    [EDIT] I believe the question is referring to Oracle Objects for OLE (OO40) [/EDIT]

    For this example, consider a one-to-many relationship between order and line_item. (An order may have zero, one or more line_item, and a line_item is associate with exactly one order.) We’re jumping past all of the modeling steps, and getting to a shell of what the definitions might look like.

    One option is to use a reference:

    create type order_typ as object
    ( id    integer
    , ...
    );
    
    create table order_obj_table of order_type;
    
    create table line_item
    ( order_ref ref order_typ scope is order_obj_table
    , ...
    );
    

    Another alternative it to use a nested table (called a collection type):

    create type line_item_typ as object
    ( id  integer
    , ...
    );
    
    create type line_item_collection_typ as table of line_item_typ;
    
    create type order_typ as object
    ( id          integer
    , line_items  line_item_collection_typ 
    , ...
    );
    

    [EDIT]

    ADDENDUM:

    Tony Andrews asks (quite reasonably) why one would want to use “nested tables”. Tony points out that the resulting database structures will be “harder to access”, by which he means (I think) the required query constructs are “non-standard” SQL.

    Quite frankly, I can’t think of a good reason that I would use a nested table, but I must at least acknowledge that OO4O does provide support for nested tables.

    Why would one choose to use OO4O at all? It provides (ostensibly) improved performance against an Oracle database, by virtue of a native driver that avoids the overhead incurred by ODBC or OLE. It’s also a technology specifically for Oracle, writing an application against the OO4O interface means that the app will essentially be tied to an Oracle database, which may be okay if there’s no requirement for the app to support multiple (interchangeable) database engines.

    More information and examples for OO4O are available from Oracle web site:

    http://www.oracle.com/technology/tech/windows/ole/index.html

    [/EDIT]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The author tells you in the bullet points just below.… May 12, 2026 at 1:17 am
  • Editorial Team
    Editorial Team added an answer You can use context, the following is saying: Search for… May 12, 2026 at 1:17 am
  • Editorial Team
    Editorial Team added an answer There's parse_str. Bad name, but does what you want. And… May 12, 2026 at 1:17 am

Related Questions

I am using a very intrinsic database with a CakePHP application and so far
It seems to me that introducing an ORM tool is supposed to make your
I have only done databases without relations, but now I need to do something
I'm new to Rails and don't grasp yet all the possibilities with associations. Here's

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.