Database adapter :: Creating table relationship

Hi,
I have created a db adapter to read from database tables using pk-fk 1:M relationship.
DB design is already done and relationships are defined at db level. Do we still need to create 1:M relationship in adapter as well ? Please let me know.
I guess it will be an overhead if we should create all 1:M relationship once again.
Regards,
AP

Hello,
In same way i am using two parent-child(header-line) tables. they have one to many relationship.
I want to generate XML which contains multiple line items under a child elements for header elements.
I have tried it but i am getting only one line under that child item. i am using jdev10.0.3.3.0
can u help me please.
-regards
satyendra

Similar Messages

  • Create table select option Issue

    I have created a copy of an exisitng table in the database as -
    create table test1_temp as select * from test1 where 1=2;
    The table was created w/o data.
    But the problem is that the indexes and primary key of table "test1" are not copied to "test1_temp".
    Since the table ddl is copied dynamically, I want to copy the indexes and primary keys also dynamically. How should I achieve this.
    Pls help.Thanks.

    user10525117 wrote:
    Thanks for your suggestions.
    Actually there are 2 problems - 1) the sql needs to be run automatically using a script.Hence no manual intervention is possible. In that case have your script that search for the table_name and replace with new table_name (sed in unix)
    2) the customer has adviced this approach of creating the table.
    In that case you have to explain to your customer that creation of index is not possible in CTAS.
    Based on these facts, pls suggest.
    Thanks.I hope you are creating temporary tables, and would be dropping that tables later. If that is the case (ie. you do not mind the tablespace in which index is created). In this case you can have your pl/sql that runs dynamic sql to create the index fetching the data from user_constraints table.
    Regards
    Anurag

  • SQL error #3115 during Create table

    As a new user to this AIR problem, I am using "adl
    application.xml" to start up testing.
    I am using disk file based table. Disk file is wiped out each
    time before startup this application.
    Following sql failed all the time. Is there anything wrong
    with adl or any cached data need to empty out prior to create
    table?
    createTables : function(callback) {
    // create tables
    var stmt = new air.SQLStatement();
    stmt.sqlConnection = this.sqlConnection;
    stmt.text = "CREATE TABLE IF NOT EXISTS Contacts ( " +
    "id INTEGER PRIMARY KEY AUTOINCREMENT, " +
    "manufacturer VARCHAR(32), " +
    "model VARCHAR(32), " +
    "sn VARCHAR(32), " +
    "orderNumber VARCHAR(64), " +
    "type VARCHAR(256), " +
    "shipping VARCHAR(32), " +
    "check VARCHAR(32), " +
    "notes VARCHAR, " +
    "photo BLOB)";
    var success = function(event) {
    if (callback) callback(true);
    var failure = function(event) {
    runtime.trace("CREATE TABLE error:", event.error);
    runtime.trace("event.error.code:", event.error.code);
    runtime.trace("event.error.message:", event.error.message);
    if (callback) callback(false, event.text);
    stmt.addEventListener(air.SQLErrorEvent.ERROR, failure);
    stmt.addEventListener(air.SQLEvent.RESULT, success);
    stmt.execute();
    D810# adl application.xml
    Loaded
    Loaded
    Loaded
    Loaded
    Loaded
    Loaded
    Loaded
    creating database D:\blackbooksafe\data\database.db
    CREATE TABLE error: SQLError: 'Error #3115: SQL Error.',
    details:'near 'VARCHAR'
    : syntax error', operation:'execute', detailID:'2003'
    event.error.code: undefined
    event.error.message: Error #3115: SQL Error.
    Cannot create database: Error #3115: SQL Error.
    D810#

    Hi Dimitri.
    If you click on the tables node before you right click, does this work for you? Apple's focus is different to windows and you need to click on the component you wish to get a menu on on OSX
    Let me know.
    B

  • Database Adapter: Insert, relationships, sequences and problems of course

    Hello Everyone!!
    I'm trying to do an insert in an Oracle Express Database with a database adapter. I'm trying to do the insert in two tables: SOLICITUDES with a column called NUMSOLICITUD that is also the primary key of the table and it's populated from its own sequence and the other table whose name is DOCJUST with a field NUMSOL. SOLICITUDES has a 1:M relationship with DOCJUST and the fields used in this relationship are NUMSOLICITUD and NUMSOL. The problem is that when the adapter do the insert, the first insert made on SOLICITUDES is correct, but when it tries to insert in the DOCJUST table, when it's supposed to insert in NUMSOL the same value inserted in NUMSOLICITUDES instead of that, a NULL value is inserted in NUMSOL so the process fails. Is it because the NUMSOLICITUDES column is populated from a sequence? How can I resolve that?
    Thanks!!

    Hi,
    OK, I found the following article: http://soa-bpel-esb.blogspot.com/2010/04/understanding-catch-and-catchall.html
    Using the info from that article I have created a test flow, which contains the same insert database adapter as the production flow. I have placed the Invoke within its own scope and attached a "CatchAll" block to this scope. To this block I have added a "empty" step (do nothing).
    In my tests, I see the desired results i.e. the second time I initiate the flow with the same data, the CatchAll block executes, which does nothing, and processing continues after the scope.
    So far so good - my query is how would I catch the specific error of unique index violation rather than general catchall?
    As before, and assistance/comments greatly appreciated.
    Anit

  • Database adapter not importing table having data type as WF_EVENT_T

    Hi All,
    I have a requirement to import a table in the Database adapter. That table is having a column of data type “WF_EVENT_T”.
    When I tried to import the table in database adapter I got the error as "The following tables are not supported in the Database Adapter and were not imported".
    Then I modified the table by adding one more column with some other data type and tried to import that table.
    It got imported successfully but I was not able to see the column with data type WF_EVENT_T in the table.
    Any pointers to this would be of great help.
    Thanks.

    Hi Harish
    Thanks for your response.
    I can create the table with the data type 'String'. However, the problem is when I try to update the table from a program in SE38 or a Function Module in SE37.
    When I try to activate the PROGRAM or FUCNTION, I GET A MESSAGE THAT I MENTIONED EARLIER.
    Here is the simple program that I have created that I am not able to activate
    ==========================================
    REPORT  ZTEST_STRING1.
    tables: ztest.
    ztest-zid = 2.
    ztest-zstring1 = 'ABC'.
    insert ztest.
    ===========================================
    ztest has two fields
    zid which is NUMC type
    and zstring1 which is STRING type.
    When I try to activate I get an error message as follows:
    'ztest' must be a flat structure. You cannot use internal tables,
    strings, references, or structures as components.
    Edited by: Ram Prasad on Mar 20, 2008 6:08 PM

  • Database Adapter Wizard does not show accessible table

    HI guys,
    in the wizard I am unable to see the tables which I need to use for database adapter.
    But I do have access to those tables, and able to select from them in SQL worksheet from with in Jdev.
    I dont own the tables, but my user id have readable access to those tables.
    Any help is appreciated.
    P.S. If I didnt explain it properly, plz let me know. It really creates lot of access issues if I can only create DB adapter on My owned tables.
    :)

    Hi there,
    please see the answer to your duplicate post on the BPEL forum:
    DB Adapter does not show selectable tables
    In general BPEL forum gets a lot more traffic but I will try to address questions on both equally.
    Thanks
    Steve

  • Database Adapter: cannot access table with complex record type as columns

    Hi all,
    I cannot perform any operations on a table that has columns with complex record type.
    I have created a table to store purchase order details.
    Sample script:
    CREATE type XX_CUST_INFO_TYP as object
    ssn VARCHAR2(20),
    rating NUMBER(15)
    CREATE type XX_ITEM_TYP as object
    item_name VARCHAR2(20),
    unit_price NUMBER(15),
    quantity NUMBER(15)
    CREATE table XX_PORDER (cust XX_CUST_INFO_TYP, porder XX_ITEM_TYP);
    When i try to access the table X_PORDER in jdev through a database Adapter, i receive the error as
    "some tables contains columns that are not recognized by the database adpter"
    1.) so in this case, how to include such tables that have complex types?
    Also, check out this scenario also..
    1. add a table through a database adapter
    2. drop the table in backend
    3. i can still see the table and its structure in the database adapter wizard even after restarting Jdeveloper.. How is it possible?
    These are some really interesting scenarios to experiment. Please suggest your ideas on this..
    Thanks All!

    Hi Hem,
    for a select you could select against a view. And for inserts you could create a stored procedure. They support complex types since 10.1.2. Complex types support in tables/views was added for 11 (next major release).
    You might be able to use PureSQL as a workaround too, i.e.
    insert into XX_PORDER values (XX_CUST_INFO_TYP(?,?), XX_ITEM_TYP(?, ?, ?))
    As for your other problem, in 10.1.2/10.1.3 the DBAdapter wizard sits on top of the Jdev Offline Tables and TopLink Mapping Workbench components. When you remove a table in the wizard it won't delete the Offline DB component. It was added by the wizard, but afterwards it is public to the entire Jdev project. You must remove it from Jdev yourself. This has been improved for the next major release too, no artifacts from underlying components are created.
    To remove it select:
    Offline DB Objects -> <schema> -> <table> and try File.. Erase From Disk.
    Thanks
    Steve

  • Oracle SOA Suite 10.1.3.4 Polling database table with Database Adapter

    We are trying to use the database adapter to poll for new and changed data in a database. To do that we try to use a sequencing table on an external database. But for that we need to specify the data-source name for the external sequencing table. Where do we need to define this data-source? We have tried with data-source defined in the Enterprise Manager, but it's not right. Also tried with the name of database connection in JDeveloper, still not working.
    Any ideas?

    Hi,
    If you are trying to understand how to create a connection pool for a data source, then this document might be helpful
    http://blogs.oracle.com/fusionmiddlewarereallife/soa_11g_bpel_composite_and_database_adapter.html

  • Polling table with Database Adapter

    Hi All,
    I have created a Database Adapter to poll the table for the new record or modified.
    I have added a receive activity to that Adapter and deployed.
    However the instance is not completing and its in always running state and waiting at receive activity.
    Can you please help me out
    Thanks

    hello,
    i have to do database polling..this is wat i have done.but instance is not getting created in BPEL..
    i have created a sequence in databse.
    i have created a source table in database which has three colums id,name,sequence.(generated by doin seq.nextval)
    i have created a table as seqhelper table which has two fields table_name and seqid.
    now i hav dragged a db adapter.I hav chosen poll,update seq table..and given my seq table name,seqname filed as table_name,seqvalue field as seqid.and sequence fiels ad sequence column of source table ...and done polling frequency as 5 seconds.
    now created a bpel process,chosen interface as based on wsdl and selected db adapters wsdl file and linked to bpel after removing the default exposed service of bpel..so bpel as one receive activity joined to db adapter...
    WHEN<
    i am inserting any new records to source table....instance is not getting created...please help..

  • Database Adapter with sql server connection cannot import user tables

    Hi,
    In jdeveloper 11g, I tried to create a sql server database connection, i could create the connection, i could see the tables and navigate through the data in
    Database navigator section. But while trying to import the tables in the Database adapter to do polling operation, It displays only the system tables like this
    syscolumns (dbo)
    syscomments (dbo)
    sysdepends (dbo)
    sysfilegroups (dbo)
    sysfiles (dbo)
    sysforeignkeys (dbo)
    sysfulltextcatalogs (dbo)
    sysindexes (dbo)
    sysindexkeys (dbo)
    sysmembers (dbo)
    sysobjects (dbo)
    syspermissions (dbo)
    sysprotects (dbo)
    sysreferences (dbo)
    systypes (dbo)
    sysusers (dbo)
    I am not understanding this wierd bahaviour of jdeveloper.
    please advise.
    -Chaitu
    Edited by: chaitu123 on May 13, 2010 9:16 AM

    This is NOT related solely to the SOA Suite. The same behavior appears in the Connections Navigator.
    IMHO, this is related to how JDeveloper is parsing the .getMetaData() response.
    Scott
    Edited by: user8951683 on May 21, 2010 8:08 AM

  • Creating a relationship between two tables  through configuration manager

    I've just created two tables in the underlying db, each with a primary key and established a primary key - foreign key relationship. I've also created a relationship through stellent and it shows up under the 'Relations' Tab.
    However, when I go to Information Fields > Field Info > Click on my Field > 'Edit' > Enable Option List and Configure > Use the view of one of the tables and click on Dependant Field , I don't see any Relationships defined. What could I have done wrong here?
    Thanks.

    ok...solved...followed metalink note 445363.1 for clarification on the right approach to creating Dependant Choice Lists (DCL).

  • Creating a relationship between one table and the PK in another

    Sorry the subject of this message is a bit vague. I'm not sure how to describe this problem in one sentence.
    So here's the issue: I've just created a new block on my form based on table2. Table2 contains t1_id which is the FK link to Table1.
    What I want is when one of the fields in Table2's block is changed and inserted, the t1_id is inserted in the applicable row. Essentially, I need :table2.t1_id to have the 'Copy From Item' property set at :table1.id
    I cannot seem to see where in designer this option is. I asked a friend and he said what I need to do is 'create a relationship between the two values in designer'. Huh? In the Table Definitions the FK is set for the two, so I'm not sure how to do this.
    Another problem, which I'm believing will be solved when this is, is that when the form loads, this new block, table2, is not automatically populated with the applicable values from the table.
    Thanks for any help. It's greatly appreciated!

    Do you mean that you want to create a Master-Detail Form using Designer?
    If yes, you need to define the entity usage from the Function Hierarchy Diagrammer, then attribute usage definition. Generate the module using Application Design Transformer. You need to define the Context so that master table's PK will be carried over to the detail table.

  • Getting error while creating table from one database to other.

    Hi,
    We are getting below error while creating the table from one database to other.
    SQL> create table fnd_lobs parallel compress as select * from [email protected];
    create table fnd_lobs parallel compress as select * from [email protected]
    ERROR at line 1:
    ORA-01555: snapshot too old: rollback segment number 28 with name "_SYSSMU28$"
    too small
    ORA-02063: preceding line from EEXIT2TEST
    ORA-01555: snapshot too old: rollback segment number 28 with name "_SYSSMU28$"
    too small
    ORA-02063: preceding line from EEXIT2TEST
    ORA-01555: snapshot too old: rollback segment number 28 with name "_SYSSMU28$"
    too small
    ORA-02063: preceding line from EEXIT2TEST
    ORA-01555: snapshot too old: rollback segment number 28 with name "_SYSSMU28$"
    too small
    Regards,
    Bhatia

    hi
    what are the apps version local and remote database???
    Snapshot too old errors occur because Oracle can 't reconstruct a consistent
    image of a block for the purposes of a consistent read.
    I feel at remote database, you are using UNDO, it will be rather easy to iincrease the undo retention time or increase the undo tablespace size.. if you are dealing with roll back segments, you may have rollback segments whose optimal values are too small...
    increase roll back segments size and select again then
    the following metalink notes might be helpful
    ORA-01555 "Snapshot too old" - Detailed Explanation Doc ID: 40689.1
    How To Avoid ORA-01555: Snapshot Too Old When Running PAAPIMP Doc ID: 603259.1
    OERR: ORA 1555 "snapshot too old (rollback segment too small)" Doc ID: 18954.1

  • Parent-Child Join on tables in Database Adapter

    Hi,
    We are doing a join on two tables(T1 and T2) in Database adapter for an Insert operation. There is no Reference Integrity between these two tables in Database, but join is done through bpel database adapter.
    Here is a scenario - when we try to insert a record(parent-child), into these two tables, If there is any data issue in any of the child record, Adapter inserts parent-record, also inserts few child-records it processed before it encountered this data issue and terminates.
    Issue here is , We want this to be transactional, it means, If any of the child record fails adapter should rollback the entire insert operation both from parent and child tables and exit with an error. Instead BPEL inserting half records into child table.
    Is there any parameter I need to set or am I missing anything? Someone please suggest.
    Thanks,
    Phani

    There are a few options I guess.
    1. Add the referential key constraint.
    2. Add custom logic in your BPEL project to compensate for any errors you encounter in your BPEL processes.

  • Create table on Logical Standby Database

    Dear DBAs,
    here is my situation;
    1. My primary database (where the tables' owner is "ICC" having a DBA) is used for insert/update transactions.
    2. The logical stdby DB (dataguard structure with MAX availability) is used to generate reports, after updating some tables owned by the same user "ICC". note that these tables are excluded from the replication.
    3. The developers might need to create this kind of tables to generate another kind of reports.
    The issue is that when the standby apply is enabled or disabled, the user ICC is not able to create a new table, it gives ORA-01031: insufficient privileges. note that it's not practical to ask the DBA to disable the "APPLY" at any table creation.
    Do you have an idea about how to resolve.
    My database is 10gR2 path.10.2.0.4.0 on Windows 2003
    Thank you in advance

    If you stop applying log on the logical standby you can easily create a table over there. See oracle docs. The following list shows >how to re-create a table and restart SQL Apply on that table:
    >
    Stop SQL Apply:
    SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY;
    Ensure no operations are being skipped for the table in question by querying the DBA_LOGSTDBY_SKIP view:
    SQL> SELECT * FROM DBA_LOGSTDBY_SKIP;
    ERROR STATEMENT_OPT OWNER NAME PROC
    N SCHEMA_DDL HR EMPLOYEES
    N DML HR EMPLOYEES
    N SCHEMA_DDL OE TEST_ORDER
    N DML OE TEST_ORDER
    Because you already have skip rules associated with the table that you want to re-create on the logical standby >database, you must first delete those rules. You can accomplish that by calling the DBMS_LOGSTDBY.UNSKIP >procedure. For example:
    SQL> EXECUTE DBMS_LOGSTDBY.UNSKIP(stmt => 'DML', -
    schema_name => 'HR', - object_name => 'EMPLOYEES');SQL> EXECUTE DBMS_LOGSTDBY.UNSKIP(stmt >=> 'SCHEMA_DDL', -
    schema_name => 'HR', - object_name => 'EMPLOYEES');
    Re-create the table HR.EMPLOYEES with all its data in the logical standby database by using the >DBMS_LOGSTDBY.INSTANTIATE_TABLE procedure. For example:
    SQL> EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE(shema_name => 'HR', -
    object-_name => 'EMPLOYEES', -
    dblink => 'BOSTON');
    Start SQL Apply:
    SQL> ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;Regards.

Maybe you are looking for