How widely used are Oracle objects?

后端 未结 8 2333
陌清茗
陌清茗 2021-02-14 06:20

I\'m writing an assignment for a databases class, and we\'re required to migrate our existing relational schema to Oracle objects. This whole debacle has got me wondering, just

8条回答
  •  时光说笑
    2021-02-14 06:51

    Many of the other answers have given good examples of where using objects does make sense; in general these are to handle some particular, perhaps complex, types of data. Oracle itself uses them for geospatial data.

    What is not commonly done, except it would sadly appear in some college courses, is to use object-based tables instead of regular relational tables to hold regular data like employees and departments something like this:

    create type emp_t as object (empno number, ename varchar2(10), ...);
    create table emp of emp_t;
    

    While these may be nice simple examples to teach the concepts, I fear they may lead to a new generation of database developers who think this approach is suitable, more modern and therefore better than "old-fashioned" relational tables. It emphatically is not.

提交回复
热议问题