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!

Can I avoid storing data in Object Types in every table?

MUmarAliDec 2 2015 — edited Dec 3 2015

Hi friends

At start when I read about Object Types in Oracle SQL, I was so happy to know that now I will just refer that object (like Poiners in C++) in my tables and then it will return it's object attributes to me without joining with tables who actually store data about those objects.

But when I read little more about these Object Types, then I came to know that I'll also have to store data for attributes of these types in every table which will include columns of these types.

For example, consider Item Object type in Items table. To me, an Item can have attributes like Name, Color, Size, Design, Brand etc.

So, wherever I make queries including items, I'll have to fetch its attributes from Items table which will increase query cost a little bit.

And this is my question that is there any data structure in Oracle which stores data only once and then return that data wherever I refer it e.g Items.Item.Name, Items.Item.Color, Items.Item.Size etc.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 30 2015
Added on Dec 2 2015
4 comments
935 views