0

How can I create a table in Oracle with a tree view design. I'm not with coding with any programming language, I want only table design for example

Capital
- share
- Preference Share

Liabilities
- Secured loan
- Unsecured loan
- debenture

Assets
- Fixed Assets
- Tangible Assets

Above all are in one single table.

Here Capital, Assets and Liabilities are the main fields of the table and under those are child nodes.

Ben
  • 51,770
  • 36
  • 127
  • 149

1 Answers1

2

It's not clear what you mean by tree design. Are you referring to a design pattern known as "generalization specialization"?. By this I mean that an unsecured loan is a subtype of liabilities, and your three main categories could be lumped together into some supertype. Another way to describe this pattern is "inheritance modeling in relational design".

If so, the subject of table design for gen-spec has come up numerous times in SO.

Table design and class hierarchies

Here's one of the best articles, follow the pointers taking you to Martin Fowler's discussion of the object-relational mismatch.

How to do Inheritance Modeling in Relational Databases?

Community
  • 1
  • 1
Walter Mitty
  • 18,205
  • 2
  • 28
  • 58