Converting Relational Tables to Object Views

We have extra information stored for each
field in a table. We call these Vertical
Tables:
rowid primary key - ties to normal tab
column_name "" - ties to column in ""
text_value the value if text
reliability rating for level of accuracy...
date of entry
Yes there are normal tables that the applications also access if they just need the value of the columns.
So I want to take this to object views. This way, while oracle is learning how to alter objects, we can still maintain our data and old application while converting to the use of objects.
I thought the best solution would be Type(s) based on the orignal data type. A generic type, text65_t could be created to hold every column that is less than 65 characters long:
CREATE TYPE text65_t AS OBJECT
WITH OBJECT IDENTIFIER(row_id) AS
row_id VARCHAR2(30),
value VARCHAR2(65),
reliability NUMBER(1,0),
doe DATE
A view can easily be created of this. The
mapping is one to one.
My problem is the next level. How can I build another view on top of text65_t, integer_t, date_t... that ties all of the
vertical rows back into a normal relational table or object.
Thanks,
bill
null

Hi migration group,
I realize this is kind of off topic for
this discussion group. Where can I ask
questions like this?
thanks
bill

Similar Messages

  • Nested table of Object View

    Hi all!
    1. I need canonical form of XML from my XSQL servlet. So I write
    select * from my_obj_view;
    2. When I need to use 'where' condition for nested table in object view, I do follows:
    select * from my_object_view o, TABLE(o.my_nested_table) n where n.col_name = 5;
    But result has not such form as in first example (has form of relational table w/o nested data of nested table). When I write:
    select * from my_obj_view where my_obj_view.nested_table.col_name = 5;
    I got error: ORA-00904: invalid column name
    Please, where I am wrong?

    I'm not sure what you are looking for exactly but is it something like this?
    SELECT id
         , p.ctx_name
         , p.ctx_value
    FROM   tt
         , TABLE(ctx) pWith the following test data:
    INSERT INTO tt VALUES(1,CTX_TAB(CTX_LINE('A','SOME VALUE1')));
    INSERT INTO tt VALUES(1,CTX_TAB(CTX_LINE('B','SOME VALUE2')));
    INSERT INTO tt VALUES(1,CTX_TAB(CTX_LINE('B','SOME VALUE2')));this is the result:
    SQL> SELECT id
      2       , p.ctx_name
      3       , p.ctx_value
      4  FROM   tt
      5       , TABLE(ctx) p
      6  /
            ID CTX_NAME                                 CTX_VALUE
             1 A                                        SOME VALUE1
             1 B                                        SOME VALUE2
             1 B                                        SOME VALUE2

  • How to present a relational table os object

    I have tables that came from Progress. The convert process converted their columns of type array to individual columns in oracle. Their data server copes with this, but I have been asked if it is possible to see a more familiar view for other uses.
    EG. I now have...(only 1 row shown)
    Table
    =====
    col1 (number) (unique column) = 1
    col2 varchar(10) = 'fred'
    col3 varchar(10) = 'sometext'
    col4##1 varchar(10) = 'tom'
    col4##2 varchar(10) = 'dick'
    col4##3 varchar(10) = 'harry'
    col5 varchar(10) = 'sometext2'
    col6 varchar(10) = 'sometext3'
    col7##1 number = 7
    col7##2 number = 14
    col7##3 number = 21
    What do I need to do/setup to be able to query - preferably by an updateable view - the data, so that a query something like
    "select col1,col2,col3,col4[2],col5,col6,col7[3] from table where col1 = 1;" would return a result of
    1 fred sometext dick sometext2 sometext3 21
    or
    "select col1,col2,col3,col4[1],col4[2],col5,col6 from table where col1 = 1;" results in
    1 fred sometext tom dick sometext2 sometext3
    The array sizes are known and rarely if ever changed.
    Any help appreciated. Version 8.1.7.4 on HPUX 11 64bit

    Oops - the select would be against a VIEW (or object table?) and not the relational table, obviously.
    What do I need to do/setup to be able to query - preferably by an updateable view - the data, so that a query something like
    "select col1,col2,col3,col4[2],col5,col6,col7[3] from VIEW where col1 = 1;" would return a result of
    1 fred sometext dick sometext2 sometext3 21
    or
    "select col1,col2,col3,col4[1],col4[2],col5,col6 from VIEW where col1 = 1;" results in
    1 fred sometext tom dick sometext2 sometext3

  • Convert relational table to Dimension

    Hi,
    Suppose I have a Employee table includes columns:
    + emp_id (primary key)
    + emp_parent_key (a foreign key to emp_id)
    + emp_name
    + emp_birth
    Could anyone tell me how to create the hierachies and attributes for dimension Employee?
    Thanks,
    Truong

    Hi Truong,
    that is a great question!
    Essentially, you are asking how to convert an Oracle Extension (CONNECT BY which is a pseudo-4NF for what is really a 5NF structure) into a proper 1NF dimension table. This applies to organizations, products, employees, and all sorts of other dimensions where the issue is the dimensional hierachy structure rather than the levels (or members).
    Wow! This is a really hard one.
    !. The dimensional structuire in a dimensional star based RDBMS must be de-raggedised and fully balanced. This is a pre-requisite. I do this via custom code. I know of no other way to do it. Only you know whether your application generates ragged and/or unbalanced hierarchies. There is nothing in OWB that will do this for you, that I have used in the past.
    (FYI, I write a recursive SQL tree-walker and package it.)
    2. You have now clean hierarchies. You are now faced with the issue of basic versus solved dimensions. You are also faced with the issue (today) of the Paris inadequacies with regard to SCD 2 processing, and the issues around value-based hierarchies. Gee, but this is 'bleeding-edge' stuff!
    Well, guess what? This whole thing landed on my desk today. We need Paris 10gR2 solved dimensions. They are the key to MV query rewrite, because of the huge semantic problem with regard to shrunken, collapsed, and lost dimensions, which I believe to be insoluble for the foreseeable future.
    3. Refer to my paper on the Paris issues. Link is on this forum. But that will not tell you how to fix them. This, I am working on. I do not have a solution at this time. It will be on my website when I do.
    To cut to the chase, you build as many levels as exist in your organization. You unpack the Parent-Child stuff. You clean it. You load it. You can use 9i techniques for mapping old/new and generating an SCD2 basic dimension table.
    That will give you a first cut. What it won't give you is a method of updating it in Paris.
    Stay tuned . . .
    Cheers,
    Donna
    http://www.donnapkelly.pwp.blueyonder.co.uk

  • REF to an object in a relational table

    Hi!
    I try do create a DB for TINs made of triangles. Because of the topology a triangles ist made of three edges and each edge is made of two nodes. The nodes contain the geometry (x,y,z coordinates).
    I created object types for each element.
    In order to fasten the request of geometry data I build Spatial objects, too.
    My tables look like the following
    CREATE OR REPLACE TYPE node_objtyp AS OBJECT (
    node_Id NUMBER(10,0),
    xValue NUMBER(7,3),
    yValue NUMBER(7,3),
    zValue NUMBER(7,3)
    CREATE TABLE nodes_reltab(
    node_Id NUMBER(10,0),
    node_Ref node_objtyp,
    node_Shape mdsys.sdo_geometry
    CREATE OR REPLACE TYPE edge_objtyp AS OBJECT (
    edge_Id NUMBER(10,0),
    from_Node_Ref REF node_objtyp,
    to_Node_Ref REF node_objtyp,
    is_Fold     NUMBER(1,0)
    CREATE TABLE edges_reltab(
    edge_Id NUMBER(10,0),
    edge_Ref edge_objtyp,
    edge_Shape mdsys.sdo_geometry
    How do I insert data into edges_reltab if from_Node_Ref and to_Node_Ref in edge_objtyp should refer to two existing node_objtyps in nodes_reltab node_Ref column??
    I tried
    INSERT INTO edges_reltab VALUES(
    1,
    edge_objtyp(
    1,
    (SELECT REF(n)
    FROM (
    SELECT node_ref
    FROM nodes_reltab
    WHERE node_Id = 1
    )n
    (SELECT REF(n)
    FROM (
    SELECT node_ref
    FROM nodes_reltab
    WHERE node_Id = 2
    )n
    0
    mdsys.sdo_geometry(
    3002,
    NULL,
    NULL,
    mdsys.sdo_elem_info_array(1,2,1),
    mdsys.sdo_ordinate_array(
    2,4,0,
    3,4,0,
    2,4,0
    But just got a ORA-00904 error!
    In my first DB I used object tables. It worked fine, but it was impossible to create an Spatial index an these tables. So I've been forced to use relational tables.
    Thank you for your help!
    Joerg

    Hi Joerg
    It is only possible to use REF with object tables and object views.
    Creating an object view over the relational table will probably not solve your problem (see error ORA-22979).
    Therefore, since you are using a relational model, you should use a foreign key.
    Chris

  • Loading xml into relational tables.

    I was wondering if anyone knows of a product/libraries which does the following:
    -Read data from a relational Database (multiple tables) and generate XML files based upon an XML Schema or DTD file?
    -Read XML files and load data into a relational Database.
    -Graphical Interface for performing the maps (perhaps based upon .xslt). ie.... Mapping of the XML Schema to Multiple Database Tables, Performing Joins etc...
    -Ability to connect to any type of Relational database (not just Oracle). Which rules out XML DB.

    This product does look to be ok, however it is missing a couple features that I would like the product to have.
    I would like this product to be able to insert/update data across multiple tables. Being able to do such things as generate foreign key relationships.
    It doesn't seem as though the XML being generated can be customized very easily. Some XML formats I deal with are very complex (such as X12/EDI).
    I would really like a graphical mapper.
    Here is a note from the doc:
    Storing XML Data Across Tables
    Currently the XML SQL Utility (XSU) can only store data in a single table. It maps a canonical representation of an XML document into any table or view. But there is a way to store XML with XSU across tables. You can do this using XSLT to transform any document into multiple documents and insert them separately. Another way is to define views over multiple tables (using object views if needed) and then do the insertions into the view. If the view is inherently non-updatable (because of complex joins), then you can use INSTEAD OF triggers over the views to do the inserts.
    This product looks really good, I was hoping that Oracle had something comparable:
    http://www.hitsw.com/products_services/xml_platform/allora.html

  • HELP! Applying a varray to a relational table via an object view

    Hi
    I could really do with some help on this one its drivin me nuts!
    I'm trying to create an object view for the following table using the following ADTs and a Varray:
    R_CUSTOMER
    CUSTID NUMBER
    LNAME VARCHAR2(25)
    FNAME VARCHAR2(25)
    STREET VARCHAR2(30)
    TOWN VARCHAR2(25)
    COUNTY VARCHAR2(25)
    PCODE CHAR(9)
    DPHONE CHAR(15)
    EPHONE CHAR(15)
    MPHONE CHAR(15)
    PERSON_TY
    LNAME VARCHAR2(25)
    FNAME VARCHAR2(25)
    ADDRESS ADDRESS_TY
    PHONES PHONE_VA
    ADDRESS_TY
    STREET VARCHAR2(50)
    TOWN VARCHAR2(25)
    COUNTY VARCHAR2(25)
    PCODE CHAR(9)
    create or replace type PHONE_VA as varray(4) of VARCHAR2(15)
    But can the procedure required to select data from the varray be included in the view. I've tried all sorts but i just can't get it to work.
    Can this be done? if so how
    Thks
    null

    Matthew,
    Yes, this can be done with the cast-multiset operator. Please see my answer to your earlier posting.
    Regards,
    Geoff

  • Printing out results in case of object-relational table (Oracle)

    I have made a table with this structure:
    CREATE OR REPLACE TYPE Boat AS OBJECT(
    Name varchar2(30),
    Ident number,
    CREATE OR REPLACE TYPE Type_boats AS TABLE OF Boat;
    CREATE TABLE HOUSE(
    Name varchar2(40),
    MB Type_boats)
    NESTED TABLE MB store as P_Boat;
    INSERT INTO House VALUES ('Name',Type_boats(Boat('Boat1', 1)));
    I am using java to print out all the results by calling a procedure.
    CREATE OR REPLACE package House_boats
    PROCEDURE add(everything works here)
    PROCEDURE results_view;
    END House_boats;
    CREATE OR REPLACE Package.body House_boats AS
    PROCEDURE add(everything works here) AS LANGUAGE JAVA
    Name House_boats.add(...)
    PROCEDURE results_view AS LANGUAGE JAVA
    Name House_boats.resuts_view();
    END House_boats;
    However, I am not able to get Results.view working in case of object-relation table. This is how I do it in the situation of relational table.
    CALL House_boats.results_view();
    House_boats.java file which is loaded using LOADJAVA:
    import java.sql.*;
    import java io.*;
    public class House_boats {
    public static void results_view ()
       throws SQLException
       { String sql =
       "SELECT * from House";
       try { Connection conn = DriverManager.getConnection
    ("jdbc:default:connection:");
       PreparedStatement pstmt = conn.prepareStatement(sql);
       ResultSet rset = pstmt.executeQuery();
      printResults(rset);
      rset.close();
      pstmt.close();
       catch (SQLException e) {System.err.println(e.getMessage());
    static void printResults (ResultSet rset)
       throws SQLException { String buffer = "";
       try { ResultSetMetaData meta = rset.getMetaData();
       int cols = meta.getColumnCount(), rows = 0;
       for (int i = 1; i <= cols; i++)
       int size = meta.getPrecision(i);
       String label = meta.getColumnLabel(i);
       if (label.length() > size) size = label.length();
       while (label.length() < size) label += " ";
      buffer = buffer + label + " "; }
      buffer = buffer + "\n";
       while (rset.next()) {
      rows++;
       for (int i = 1; i <= cols; i++) {
       int size = meta.getPrecision(i);
       String label = meta.getColumnLabel(i);
       String value = rset.getString(i);
       if (label.length() > size) size = label.length();
       while (value.length() < size) value += " ";
      buffer = buffer + value + " ";  }
      buffer = buffer + "\n";   }
       if (rows == 0) buffer = "No data found!\n";
       System.out.println(buffer); }
       catch (SQLException e) {System.err.println(e.getMessage());}  }
    How do I print out the results correctly in my case of situation?
    Thank you in advance

    I have made a table with this structure:
    I am using java to print out all the results by calling a procedure.
    However, I am not able to get Results.view working in case of object-relation table. This is how I do it in the situation of relational table.
    How do I print out the results correctly in my case of situation?
    There are several things wrong with your code and methodology
    1. The code you posted won't even compile because there are several syntax issues.
    2. You are trying to use/test Java in the database BEFORE you get the code working outside the DB
    3. Your code is not using collections in JDBC properly
    I suggest that you use a different, proven approach to developing Java code for use in the DB
    1. Use SIMPLE examples and then build on them. In this case that means don't add collections to the example until ALL other aspects of the app work properly.
    2. Create and test the Java code OUTSIDE of the database. It is MUCH easier to work outside the database and there are many more tools to help you (e.g. NetBeans, debuggers, DBMS_OUTPUT windows, etc). Trying to debug Java code after you have already loaded it into the DB is too difficult. I'm not aware of anyone, even at the expert level, that develops that way.
    3. When using complex functionality like collections first read the Oracle documentation (JDBC Developer Guide and Java Developer's Guide). Those docs have examples that are known to work.
    http://docs.oracle.com/cd/B28359_01/java.111/b31225/chfive.htm
    http://docs.oracle.com/cd/E11882_01/java.112/e16548/oraarr.htm#sthref583
    The main issue with your example is #3 above; you are not using collections properly:
    String value = rset.getString(i);
    A collection is NOT a string so why would you expect that to work for a nested table?
    A collection needs to be treated like a collection. You can even treat the collection as a separate result set. Create your code outside the database and use the debugger in NetBeans (or other) on this replacement code for your 'printResults' method:
    static void printResults (ResultSet rset) throws SQLException {
        try {
           ResultSetMetaData meta = rset.getMetaData();
           while (rset.next()) {
               ResultSet rs = rset.getArray(2).getResultSet();
               rs.next();
               String ndx = rs.getString(1);
               Struct struct = (Struct) rs.getObject(2);
               System.out.println(struct.getSQLTypeName());
               Object [] oa = struct.getAttributes();
               for (int j = 0; j < oa.length; j++) {
                  System.out.println(oa[j]);
        } catch  (SQLException e) {
           System.err.println(e.getMessage());
    That code ONLY deals with column 2 which is the nested table. It gets that collection as a new resultset ('rs'). Then it gets the contents of that nested table as an array of objects and prints out the attributes of those objects so you can see them.
    Step through the above code in a debugger so you can SEE what is happening. NetBeans also lets you enter expressions such as 'rs' in an evaluation window so you can dynamically try the different methods to see what they do for you.
    Until you get you code working outside the database don't even bother trying to load it into the DB and create a Java stored procedure.
    Since your current issue has nothing to do with this forum I suggest that you mark this thread ANSWERED and repost it in the JDBC forum if you need further help with this issue.
    https://forums.oracle.com/community/developer/english/java/database_connectivity
    When you repost you can include a link to this current thread if you want. Once your Java code is actually working then try the Java Stored procedure examples in the Java Developer's Guide doc linked above.
    At the point you have any issues that relate to Java stored procedures then you should post them in the SQL and PL/SQL forum
    https://forums.oracle.com/community/developer/english/oracle_database/sql_and_pl_sql

  • Partitions Tab in Object Viewer for Tables

    I just moved to the official 1.5 release from the 1.5 EA2 release, and no longer see the Partitions tab when using the Object Viewer on a partitioned table. Has this been removed, or is this now configurable?

    Sorry, I take that back, this appears to be only the case where an existing table is converted to a partitioned table (using the same name). Refreshing does not work, but once disconnecting and re-connecting, the tab shows up.

  • Inserting into a doubly nested table through an object view

    Can anyone give me an example of an INSTEAD OF trigger that will mediate an INSERT into a doubly nested table of an Object View? Is there syntax that will allow it?

    Here's some code to demonstrate. Note that relational tables, not an object table, are used to store object instances:
    create or replace type TInnerNestedTable
    is table of varchar2(20)
    create or replace type TOuterNestedTable
    is table of TInnerNestedTable
    create or replace type TMyObject
    is object
         id     varchar2(20)
    ,     tab     TOuterNestedTable
    create
    table     T_MY_OBJECT
         id          varchar2(20)     not null
    ,     primary key (id)
    create
    table     T_MY_OBJECT_TAB_OUTER
         id          varchar2(20)     not null
    ,     outerIndex     integer          not null
    ,     primary key (id, outerIndex)
    ,     foreign key (id) references T_MY_OBJECT on delete cascade
    create
    table     T_MY_OBJECT_TAB_INNER
         id          varchar2(20)     not null
    ,     outerIndex     integer          not null
    ,     innerIndex     integer          not null
    ,     innerValue     varchar2(20)
    ,     primary key (id, outerIndex, innerIndex)
    ,     foreign key (id, outerIndex) references T_MY_OBJECT_TAB_OUTER on delete cascade
    create or replace view V_MY_OBJECT
    of TMyObject
    with object identifier (id)
    as
    select     t.id
    ,     cast(multiset(
              select     cast(multiset(
                        select     i.innerValue
                        from     T_MY_OBJECT_TAB_INNER i
                        where     i.id = o.id
                        and     i.outerIndex = o.outerIndex
                   ) as TInnerNestedTable)
              from     T_MY_OBJECT_TAB_OUTER o
              where     o.id = t.id
         ) as TOuterNestedTable)
    from     T_MY_OBJECT t
    create or replace trigger TR_II_V_MY_OBJECT
    instead of insert on V_MY_OBJECT
    for each row
    begin
         insert
         into     T_MY_OBJECT
              id
         values     (
              :new.id
         insert
         into     T_MY_OBJECT_TAB_OUTER
              id
         ,     outerIndex
         select     :new.id
         ,     rownum
         from     table(:new.tab) o;
         insert
         into     T_MY_OBJECT_TAB_INNER
              id
         ,     outerIndex
         ,     innerIndex
         ,     innerValue
         select     :new.id
         ,     o.outerIndex
         ,     rownum
         ,     value(i)
         from     (
              select     :new.id
              ,     rownum outerIndex
              ,     value(o) innerTab
              from     table(:new.tab) o
              ) o
         ,     table(o.innerTab) i;
    end;
    insert
    into     V_MY_OBJECT
    values     (
         new TMyObject(
              'A'
         ,     TOuterNestedTable(
                   TInnerNestedTable('A','B','C')
              ,     TInnerNestedTable('AA')
              ,     TInnerNestedTable('AB')
    insert
    into     V_MY_OBJECT
    values     (
         new TMyObject(
              'B'
         ,     TOuterNestedTable(
                   TInnerNestedTable('X','Y','Z')
              ,     TInnerNestedTable('Hello', 'World!')
    /Selecting from the view shows the results:
    select     value(o)
    from     V_MY_OBJECT o
    VALUE(O)(ID, TAB)
    TMYOBJECT('A', TOUTERNESTEDTABLE(TINNERNESTEDTABLE('A', 'B', 'C'), TINNERNESTEDTABLE('AA'), TINNERNESTEDTABLE('AB')))
    TMYOBJECT('B', TOUTERNESTEDTABLE(TINNERNESTEDTABLE('X', 'Y', 'Z'), TINNERNESTEDTABLE('Hello', 'World!')))
    2 rows selected.Hope that helps...
    Gerard

  • Objects view - databases with many thousands of tables

    I did not find a way to apply a filter to object names when viewing or using database objects such as tables or views. In databases where there may be 20,000 plus tables and/or views this makes the tool difficult to use.
    Options:
    1) Allow one-time filtering of object names
    2) Allow the designation of one or more objects as favorites or add their names to a project and then only show those object names instead of all objects in the database.

    I did not find a way to apply a filter to object
    names when viewing or using database objects such as
    tables or views. In databases where there may be
    20,000 plus tables and/or views this makes the tool
    difficult to use.
    Options:
    1) Allow one-time filtering of object namesRight click on the object type (for example Tables) and select Apply Filter

  • Object view  with nested table and member functions????????????????

    HI frds:)
    I need some help regarding writeing soem queries..
    I have to use view in retreving data and by useing member functions of object.
    1) i have to create a nested table by useing type object.
    2) i have to create a object wtih member functions inorder to create view of taht nested table,.
    3) by useing this objectt view and by useing methods i have to write soem queries ...
    If any one know or any information regarding this please reply me... as i have searched in net alot but i was unable to figure out..
    Thanks....

    // first createing object
    create type emp_det as object
    (empname varcahr2(20),start_date date,end_date date);
    // creating table of that object
    create table emp_detai_table as table of emp_det;
    // creating nested table
    create table empl (emp_no number,emp_detail emp_detail_table,dep_no number)nested table emp_detail store as s;
    //now i want to create view.. inorder to create view i need to create object. in that object i want to create methods.. these methods should work with date attributes..
    after creating object view i need to select or write some queries by useing member methods..
    This is the tast i have to perform.,. i have no materials ...if u have any link ..forward me..
    i have to do it as soon as possible..
    waiting for your reply...

  • Nested table type in object view on 8.1.7

    Object views seem to be the ideal way to deliver XML datagrams from database queries with nested data.
    I need to create a datagram that contains nested data within another nested set of data eg. a family has many people, each person may have many hobbies.
    The following code taken from Oracle documentation would create the Types I need, but this does not work on 8.1.7 (gets PLS-00534 error). Can someone advise if nested tables within a table type is a new Oracle 9 feature?
    CREATE TYPE project_t AS OBJECT
    ( projname VARHCAR2(20)
    , mgr VARHCAR2(20));
    CREATE TYPE nt_project_t AS TABLE OF project_t;
    CREATE TYPE emp_t AS OBJECT
    ( ename VARCHAR2(20)
    , salary NUMBER
    , deptname VARHCAR2(20)
    , projects nt_project_t);
    CREATE TYPE nt_emp_t AS TABLE OF emp_t;
    CREATE TYPE dept_t AS OBJECT
    ( deptno NUMBER
    , deptname VARHCAR2(20)
    , emps nt_emp_t);
    Thks, Matt. (asked same question in XML forum but maybe more appropriate here).
    null

    Matthew,
    Value-based multi-level collections, such as the one you have here, were not supported in 8.1.7. You have two choices:
    1. Upgrade to 9i to take advantage of value-based multi-level collections (see http://download-west.oracle.com/otndoc/oracle9i/901_doc/appdev.901/a88878/adobjbas.htm#462243), type inheritance, type evolution and other new features.
    2. Use REFs in 8.1.7 to build a reference-based multi-level collections (see http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/appdev.817/a76976/adobjdes.htm#446229).
    Regards,
    Geoff

  • MULTIPLE ROWS IN OBJECT RELATIONAL TABLE, HELP

    Hi,
    Here is my problem explanation. Please help. I have created an object type address, and a relational table called employee. One of the column in employee table is based on the type address. Now suppose I want to have 5 differrent addresses for a perticular employee how can I have it stored? The empno is the primary key .Here is the data strucure
    address( line1 varchar2(30),city varchar2(30), state varchar2(20), zip varchar2(13))
    employee
    (empno number,
    name varchar2(60),
    emp_add address)
    Thanks
    Feroz

    Well you could give your employees a nested table of addresses. But as William said, you really ought to use relational tables for this situation.
    I haven't yet come across a compelling argument for using Types instead of tables for data storage, and there are lots of drawbacks. Duplication of data is just one.
    Cheers, APC

  • Mix object tables with relational tables?

    Hallo,
    is it possible to mix object tables with relational tables in one database?
    I didn't succeed in assigning a foreign key from a relational table to an object table.
    Is this only working with column objects in relational tables?

    Hi
    is it possible to mix object tables with relational tables in one database?
    Every database contains both types of tables. So, it is basically not a problem.
    I didn't succeed in assigning a foreign key from a relational table to an object table.
    Is this only working with column objects in relational tables?It would be interesting to know how you tried... e.g. what error you get... Here an example (executed on 11.1).
    SQL> create or replace type tt as object ( n number );
      2  /
    SQL> create table ot of tt (constraint ot_pk primary key (n));
    SQL> create table rt (n number, constraint rt_ot_fk foreign key (n) references ot (n));
    SQL> insert into ot values (tt(1));
    SQL> insert into rt values (1);
    SQL> insert into rt values (2);
    insert into rt values (2)
    ERROR at line 1:
    ORA-02291: integrity constraint (OPS$CHA.RT_OT_FK) violated - parent key not foundHTH
    Chris

Maybe you are looking for

  • Help with crashes

    So... this will be a bit long... I am getting some serious problems with my machine, and I don't think I can solve this my self. I be not very tech-savvy. Recently I upgraded my cpu video card and ram in a period of 1-2 weeks. Everything was fine at

  • Error while executing FIGL query

    Hello All, While executing a standard FIGL report in the Anayzer, I am getting the following error: No Value could be determined for variable 0P_FVAEX. I know that this error is related to Fiscal year variant Please let me know the reason and the sol

  • Making Your Own Map Component in crystal xcelsius

    Post Author: sunbrain CA Forum: Xcelsius and Live Office http://www.liwaili.com.cn support http://www.liwaili.com.cn support http://www.liwaili.com.cn support Making Your Own Map Component in crystal xcelsius Although the Map components in Crystal Xc

  • MM_XSL Transform

    Does anybody know of a way to load dynamically created xml files using Dreamweaver's XSL Transform class? I'm trying to load a php page that outputs xml from a database. When the php file is viewed it is read in the browser as an XML file. I know the

  • Uploading CSS and Javascript

    I have created a custom stylesheet and also some additional javascript functions which I have uploaded to the server. Whenever I make changes to these documents, the changes don't seem to appear for some time when I run a web template that uses them.