Table referenced by more than one other table

I'm no DBA so I was wondering if you could answer this fairly basic question. If I have a table that references more than 1 other table. For example Order links to a customer or Order can link to an Employee how would I represent that in the data model?
I'm guessing I could have the Order table have both an Employee ID and a Customer ID columns and null one or the other out depending on whether it was linked to an Employee or Customer but that seems a bit redundant in that there would always be at least one column being null.
Perhaps I could use table inheritance and just add the relevant foreign key col on the inherited tables but I'm fairly sure you can't have abstract tables.
Thanks for the help.

For example:
table a = Primary_key1, col2, col3
table b = Primary_key1, primary_key2, col3
table c = Primary_key2, col2
To join all this tables you must do something like this:
select ....
from tablea,tableb,tablec
where tablea.Primary_key1=tableb.primary_key1 and
tableb.Primary_key2=tablec.primary2;

Similar Messages

  • Logical table having more than one Logical table sources

    Hi ,
    Is it possible a logical table has 2 logical table sources and there is no join between the underlying table of logical table sources?
    What will happen if we create the request which contains one attribute from each source?
    Will BI server return records with Cartesian join?
    Is it mandatory if logical table is having more than one logical table sources(exp. Logical table sources are X,Y and underlying table is A,B respectively),
    The underlying tables (A&B) must be joined ?
    Can someone explain the logic behind the logical table sources? How does it work?
    Any reference of document will be appreciable.
    Thanks,Ashish

    Hi Stijn,
    Thanks for response.
    You are saying that Oracle BI server will run a query against both tables and combine the results. But if there is no possibilty of any type of join, how BI server will combine the results from both tables.
    I have a scenario like below -
    Suppose i have 2 tables A and B at physical layer. Both table contains the information of any common subject area.
    But there is no attribute is common between A and B so not any kind of join possible between two.
    Now if i create a logical table with 2 logical table source A and B and create any request having one column from A and one from B ,
    What will happen? How BI server will combine the result? Will BI server not result records after Cartesian join.
    How can i model this scenario?

  • ORA-01776: cannot modify more than one base table through a join view

    I have created EO based on a database view than consists of two tables, and only one is updateable.
    When I try to update a row using EO, I got a following message: "ORA-01776-cannot modify more than one base table through a join view"
    In Forms, this issue is resolved by setting "Query Only" property of non-updateable items to "True".
    Is it possible to do something like that in ADF BC?
    Thanks

    Thanks for answer.
    When I set "updateable" property to "Never", that attribute is protected from any change.
    I'm sorry for incomplete usecase.
    I have set up a list of value on that attribute, because it is a lookup field for another table and I need to get an ID from that table.
    Basically, I need that attribute to be updateble for BC, but not for database.
    Edited by: MarioK on Oct 13, 2011 9:28 AM

  • Cannot modify more than one base table through a join view

    hi guys, my current problem is that i have a datablock based on a view, now all the fields bar 1 are updateable, but this one field that is obtained through a join is displayed, the user can enter data in this field which then pupulates other fields which are required, but this specific field should not be updated. Is there an option to state this as i keep getting the error:
    cannot modify more than one base table through a join view
    Any help would be greatly appreciated, thanks.

    the user can enter data in this field which then pupulates other fields So, using the value of "this field" you then query the rest of the fields? Can you show us the code you use to populate the rest of the fields?
    but this specific field should not be updatedHave you tried setting the "Query Only" property of the field to "Yes" and the other DML properties (Ins, Upd, Del) to No?
    Also, what is your Forms version?
    Thanks,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • UDO WITH MORE THAN ONE CHILD TABLE

    Hello There.
    Can I handle more than one child table for a master table by code?
    if I can, how do I create this udo, I have tryed the following code, but it takes the last child table ("jobs7")
    If oUserObjectMD.GetByKey("Jbs_UO") = 0 Then
                oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
                oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
                oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tNO
                'oUserObjectMD.FormColumns   
                oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
                oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
                oUserObjectMD.FindColumns.ColumnAlias = "Code"
                oUserObjectMD.FindColumns.Add()
                oUserObjectMD.FindColumns.SetCurrentLine(1)
                oUserObjectMD.FindColumns.ColumnAlias = "Name"
                oUserObjectMD.CanLog = SAPbobsCOM.BoYesNoEnum.tNO
                oUserObjectMD.LogTableName = ""
                oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tNO
                oUserObjectMD.ChildTables.TableName = "JOBS1"
                oUserObjectMD.ChildTables.TableName = "JOBS2"
                oUserObjectMD.ChildTables.TableName = "JOBS3"
                oUserObjectMD.ChildTables.TableName = "JOBS4"
                oUserObjectMD.ChildTables.TableName = "JOBS5"
                oUserObjectMD.ChildTables.TableName = "JOBS6"
                oUserObjectMD.ChildTables.TableName = "JOBS7"
                oUserObjectMD.ExtensionName = ""
                oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO
                oUserObjectMD.Code = "Jbs_UO"
                oUserObjectMD.Name = "Jobs UDO"
                oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_MasterData
                oUserObjectMD.TableName = "JOBS"
                If oUserObjectMD.Add() <> 0 Then
                    Dim ErrMsg As String
                    Dim ErrCode As Long
                    oCompany.GetLastError(ErrCode, ErrMsg)
                    MsgBox("Errorf adding UDO master Data" & vbCrLf & ErrMsg)
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
                    oUserObjectMD = Nothing
                    Return False
                End If
            End If

    Hi Hagai
    after oUserObjectMD.ChildTables.TableName = "JOBS1"
    just write
    oUserObjectMD.ChildTables.Add
    that would be
    oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tNO
    oUserObjectMD.ChildTables.TableName = "JOBS1"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS2"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS3"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS4"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS5"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS6"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS7"

  • How to Create Field Catalogs (More than one Source Table)

    Hi Data Archiving Experts,
    Could you please help me how to create the Field Catalogs (More than one Source Table). If any one is having example that will help.
    My scenario:
    Currently we are archiving on CRM Data archiving project. We are facing one issue on creating field catalog with more than one source table.
    Ex: ST -- BP1
                  BP2
                  BP3
    ST info store in one table and BP1 -- BP 3 info sotre in another table. with current field catalog we are getting ST -- BP1. Our requirment is we need to show the ST  -- BP3 How we can achive this.
    Regards,
    Srini

    Hi,
    I don't think its possible to create fieldcatalog for different tables,
    but if you want to do so create a dummy table which has all the fields which you want in fieldcatalog.
    populate the data from different table to that dummy table
    then create fieldcatalog for that table and pass it in the function module...
    Regards,
    Siddarth

  • How to create a table cell occupy more than one row using PDF.

    Hi,
    I want create a pdf report,which contains a table cell occupied more than one line.
    just like html language: <rowspan = 2>
    merge cells in one row is allowed,we can use merge cells command(like colspan in html).
    but how to mege cells in one column?

    Hi,
    I want create a pdf report,which contains a table cell occupied more than one line.
    just like html language: <rowspan = 2>
    merge cells in one row is allowed,we can use merge cells command(like colspan in html).
    but how to mege cells in one column?

  • More than one fact tables...

    Hi.
    I have tried OLAP until now with only one fact table.
    But now I have more than one. To start i added one more.
    I am always using SOLVED LEVEL...LOWEST LEVEL.
    I am always receiving the following error when creating the cube with this measures:
    "exact fetch returns more than requested number of rows"
    What shall I look for when dealing with more than one fact table?
    Thanks.
    ODDS
    :: ... and still have a very poor performance ...

    1.
    Well ... I saw the global star schema and we have two fact tables there!!!
    Do I have to build different cubes for each fact table always?
    2.
    I have built cubes, created a java client and a jsp client.
    Performance is much better in JSP using the AppServer(sure!).
    The power of the JSP client is more limited i presume.
    I wonder if I can do things such setCellEditing for a crosstab in both.
    3.
    Some aggregation questions:
    Everytime I create a cube using CWM2 and also a AW using AWM wizards with that cube I have one aggregation plan by default that processes everything online.
    After that I create and deploy my own aggregation plan.
    My question is: If I don't want to aggregate anything!??! I want to see, for instance, in BiBeans the lowest level values only. And everything at the top levels empty.
    I am missing something 'cause I still have everything aggregated !!!
    Thanks.
    ODDS

  • Table cell with more than one component

    how can i make table cell with more than one component
    like below, cell in column 3 contains few button
    col0 | col1 | col2 |
    a | b |[btn1] [btn2] [btn3]|
    a | b |[btn1] [btn2] |
    and when i click on the any of the button a dialog box pop up saying something..

    Here's link to someone who did a lot with tables. Not sure about multiple buttons, but it should get you started.
    http://www2.gol.com/users/tame/swing/examples/SwingExamples.html

  • More than one item table in HIERSEQ_LIST_DISPLAY

    Hi ,
    Is it possible to have moe than one item table in HIERSEQ_LIST_DISPLAY.
    if we have more than one item table with different structures then what is the best way to disply them.
    Thanks and Regards,

    thank you

  • More than one Detail table in the Master Detail forms!

    Hi,
    I need to have more than one Detail table in Master Detail Forms.
    I want to see the details of the rows of the first Detail table in the Second Detail table. Please guide me to do this.
    Sincerely yours,
    Mozhdeh

    You can do one of two things
    1) Depends on the nature of your data model. I was able to manage many to many
    relationships using views and instead of triggers. This solution is somewhat complex but can work in certain situations.
    2)Works for situations where master record exists. create a page with mulitple portlets syncronized on some related key.
    create the following package to use on the md forms to place on the one page to be rendered.
    -- this package will facilitate the storage and retrieval of keys used by the related forms.
    create or replace package session_var
    IS
    session_parms portal30.wwsto_api_session;
    g_domain varchar2(2000) := portal30.wwctx_api.get_user;
    function get_id (id in varchar2) return number;
    PROCEDURE SET_ID
    (ID in VARCHAR2
    ,p_val in VARCHAR2
    ,P_URL in VARCHAR2
    END SESSION_VAR;
    create or replace package body session_var
    IS
    --pkg body
    function get_id(id in varchar2) return number is
    l_store_session portal30.wwsto_api_session;
    l_id number;
    begin
    l_store_session := portal30.wwsto_api_session.load_session(
    p_domain => session_var.g_domain,
    p_sub_domain => 'your domain');
    l_id := l_store_session.get_attribute_as_varchar2( p_name => id);
    return l_id;
    end get_id;
    PROCEDURE SET_ID
    (ID in VARCHAR2
    ,p_val in VARCHAR2
    ,P_URL in VARCHAR2
    IS
    l_store_session portal30.wwsto_api_session;
    begin
    l_store_session := portal30.wwsto_api_session.load_session(
    p_domain => session_var.g_domain,
    p_sub_domain => 'your domain');
    l_store_session.set_attribute(
    p_name => id,
    p_value => p_val );
    l_store_session.save_session;
    * Redirect to the page using p_url;
    portal30.wwv_redirect.url(P_URL);
    end set_id;
    END SESSION_VAR;
    --the form master detail form, section  before display page enter the following code and publish as portlet.
    declare
    l_fs varchar2(4000);
    l_s varchar2(4000);
    v_con_id number;
    begin
    v_con_id :=rfq.session_var.get_id('CON_ID'); -- primary key and key used to relate details
    p_session.set_shadow_value( p_block_name => 'MASTER_BLOCK',
    p_attribute_name => 'A_CON_ID', -- attribute on form related to primary key
    p_value => '= '|| v_con_id,
    p_language => portal30.wwctx_api.get_nls_language ,
                   p_index => 1
    l_fs := p_session.get_value_as_varchar2(p_block_name => 'MASTER_BLOCK', p_attribute_name => '_FORM_STATE');
    l_s := p_session.get_value_as_varchar2(p_block_name => 'MASTER_BLOCK', p_attribute_name => '_STATUS');
    if l_fs = 'SAVE' and l_s is null then
    WWV_MASTER_GENSYS_1(p_block_name => p_block_name,
    p_object_name => p_object_name,
    p_instance => p_instance,
    p_event_type => p_event_type,
    p_user_args => p_user_args,
    p_session => p_session);
    p_session.save_session;
    end if;
    if l_fs = 'QUERY_AND_SAVE' and l_s is null then
    WWV_MASTER_GENSYS_1(p_block_name => p_block_name,
    p_object_name => p_object_name,
    p_instance => p_instance,
    p_event_type => p_event_type,
    p_user_args => p_user_args,
    p_session => p_session);
    p_session.save_session;
    end if;
    exception
    when others then
    PORTAL30.wwerr_api_error.add(PORTAL30.wwerr_api_error.DOMAIN_WWV,'app','generic','onLink', p1 => sqlerrm);
    raise;
    end;
    --then create other md forms and publish as portlets in a similar manner.
    -- create a form (form_session_vars) to call procedure session_vars and place the following code in the
    addiontional pl/sql tab
    WWV_GENSYS_1(
    p_block_name => p_block_name ,
    p_object_name => p_object_name,
    p_instance => p_instance ,
    p_event_type => p_event_type ,
    p_user_args => p_user_args ,
    p_session => p_session);
    --then create a page and place the md forms created above as portlets on the page.
    --create a link and target the form_session_vars and in the link target inputs
    enter the values for your user parameters
    id= CON_ID --"your primary key name"
    p_url= url/page/"your_page"
    --finally create a report (QBE or standard).
    in the column formation section use the link created earlier to direct the user to the target page.
    How it works.
    When the link is selected the form_session_Var is called and automatically runs setting the primary key values
    in the user session store. The step is required or the resulting page will not render properly. Then the user is redirected to the page where the portlets are rendered. The portlets start rendering, the before display page calls the session vars package to retrieve the key and put the form into query_update mode returning the data.
    The portlets finish in query_and_save mode with details in update mode, the allowable insert, delete and none actions will be available for the details.
    benefits: The session_Var package code is resuable as well as the form form_session_Var and the link. passing the key name and values are done at the report level and detailed in the report links. the md forms will need to reference their related keys.

  • Reg: how to join more than one cluster table into one

    Hi gurus
    How to join more than one cluster table into one
    amk

    Hi,
    You cannot join cluster tables
    Best way is to select from the header table and then select from the item table table using for all entries of header table.
    regards,
    Advait

  • Can one notification be referenced by more than one PM order

    can one notification be referenced by more than one PM order?
    Thanks

    Hi Zhang Bin
    You can create one order from multiple  notification, but you cannot create multiple order from one notification.
    Exmaple- You can select all notification in IW28, and create one order. All these notification will appear in object list of order.
    Regards
    Anil Kumar

  • Validation: more than one Other Source Dimension Member

    Hi BPC Experts,
    Is it possible to identify more than one Other Source Dimension Member in Validation Business Rules settings? For example, we need to use all DataSources that belong to IFRS roll up. If yes, what is the format?
    Thanks.
    Mila

    Resolved. The format is DIMENSION=MEMBER OR DIMENSION=MEMBER.
    For example,
    C_DATASRC=MJ_MANJE OR C_DATASRC=GAAP_03 OR LOB_IFRS=TEST OR LOB_IFRS=IFRS_INSD.

  • How to apply data into 2 tables AND to more than one record in same table?

    Hello,
    I am trying to apply/insert data into 2 tables AND at the same time apply data to more than one record (in the same table). How would I do this in APEX?
    I have updated using one table with no problem, however, when I try updating with the two tables/ multiple record sets, I get errors.
    I appreciate the help.
    Thanks.
    Linda

    You can achieve what you want using PL/SQL. Can you post ur code?

Maybe you are looking for

  • Moving Average Price for Batch Maintenance

    Hi Experts,       I've created material of which stock is maintain in batch (Valuation category = X & Price Control = V).     Due to batch wise stock, system calculates the moving average price for different batches.     Can we calculate moving avera

  • How to update VBFA while sales order creation using BAPI

    Hi, I am trying to create sales orders for each schedule line items while inquiry creation. This I have done in the user exit in the VA11 program MV45AFF using BAPI "BAPI_SALESORDER_CREATEFROMDAT2". along with the Inquiry, Sales orders are also getti

  • Dynamic parameters in CR XI

    Hi, In my crystal report(version XI), there are 5 parameters. 4 of them are static and one is dynamic. But when i executing the report, it is asking for parameter input values twice!!! Is that the bevaviour of crystal? And... Is it possible to have b

  • Preview app issue with deleting PDF pages

    Greetings- I'm hoping that someone else has encountered or can replicate this issue. If I have a PDF file open in preview and I select multiple pages to delete (using command-click) and the pages are not all sequential it seems like the incorrect pag

  • Updating the AD Process Form Using java code

    Hi, I am having requirement to update AD Process form OU and Groups using Scheduler. Cna any body provide me sample code for updating the process form? Thanks in advance Edited by: 790561 on 22/08/2011 20:03