ADF search from multiple database

JDev 11.1.1.3
ADF BC & ADF Faces
I am having a requirement to build advance search functionality, wherein the result data will come from multiple databases. Let's say I have two different database DB1 and DB2. On click of 'search' button I need to query both the databases and populate the data in a single result table. what should be the approach?
Any pointer will be appreciated.
~Abhijit

You've essentially done my POJO approach using the AM as your POJO. Yes you can do it. No, it's not going to be horribly efficient. You'll also have to handle when the newly-created root AM gets closed - on second thought - I hate this approach. Me too - it's just a highly customised one-off solution suitable only as the last resort.
At least in this way, you'll have a chance of having the DB doing the filtering.Right on - let the framework do its job like it's designed to.
I also summarised my thoughts on this thread: Re: Oracle ADF Business Component - Various data source...
It's still 'nice and easy' to show 'search results' from different data sources in separate disjoint (but parameterised) 'regions', with each region displaying a task flow pointing to a different database.
The non-trivial bit is when there's a requirement to combine two data sets - especially large ones (and then make it behave like a normal collection).
I'd mostly never go down this route unless there's an exceptionally compelling need to do so.
On a case by case basis, i might consider:
1. Having a 'primary' database and expose a webservice on the 'secondary' one. Then fetch of a large data set from the secondary and filter it 'in memory' to match with the primary rows...
2. Normal/Materialised views over db links etc. -
Jang Vijay Singh

Similar Messages

  • Workspace to parse SQL statements from multiple database schema's

    Hi ,
    When go through the following link of workspace admin user :
    Home>HTML DB Workspace Administration>Manage Services>Schema Reports>Workspace Schemas there I saw "Your workspace has the privilege to parse SQL statements using the following database schemas. Note that the terms database schema and database user can be used interchangeably.
    " at the right pane.
    So how can i make my workspace to parse SQL statements from multiple database schema's ?That must be listed there .But i have only one schema in view ? Can i make it multiple ?If then How ?
    Anybody have an idea ?
    ROSY

    Assign as many schemas to your workspace as you want using the administration app. Read about it in the doc.
    Scott

  • Need to get data from multiple database instances in a single query

    Hi,
    I need a small favour from you guys. The prob is as follows:
    I need to get name, row_id from table A from schema 1 and gbu_name, name from table B from schema 2 where a.name = b.name. I wrote the query in the following manner:
    SELECT a.name, a.row_id, b.gbu_name
    FROM Schema1.A as a, Schema2.B as b
    Where a.name = b.name
    But this query is not working and the error is like " The table does not exists".
    Please update me how to avoid the error and get the right sort of result.
    Thanks & Regards,
    Debabrata

    Ah, youre actually asking different things.
    In your topic title, you say youre running separate instances
    In your body text, you say you are under different user/schema
    So tell me, do you have more than one database or not? How many entries in your TNS file?
    I would say, for "multiple database instances"
    SELECT
      a.id, b.id
    FROM
      tableA a
      INNER JOIN
      tableB@OTHER_DATABASE_LINK_NAME b  <--NOTE!
      USING(id)And of course you will have to look up CREATE PUBLIC DATABASE LINK sql..
    Message was edited by:
    charred

  • To fetch Data from multiple database tables!

    How to fetch Data from fields of multiple database tables!
    Give me one example!

    use <b>join....</b>
    c the SAPHELP docs...
    FROM tabref1 [INNER] JOIN tabref2 ON cond
    Effect
    The data is to be selected from transparent database tables and/or views determined by tabref1 and tabref2. tabref1 and tabref2 each have the same form as in variant 1 or are themselves Join expressions. The keyword INNER does not have to be specified. The database tables or views determined by tabref1 and tabref2 must be recognized by the ABAP Dictionary.
    In a relational data structure, it is quite normal for data that belongs together to be split up across several tables to help the process of standardization (see relational databases). To regroup this information into a database query, you can link tables using the join command. This formulates conditions for the columns in the tables involved. The inner join contains all combinations of lines from the database table determined by tabref1 with lines from the table determined by tabref2, whose values together meet the logical condition (join condition) specified using ON>cond.
    Inner join between table 1 and table 2, where column D in both tables in the join condition is set the same:
    Table 1                      Table 2
    A
    B
    C
    D
    D
    E
    F
    G
    H
    a1
    b1
    c1
    1
    1
    e1
    f1
    g1
    h1
    a2
    b2
    c2
    1
    3
    e2
    f2
    g2
    h2
    a3
    b3
    c3
    2
    4
    e3
    f3
    g3
    h3
    a4
    b4
    c4
    3
    |--|||--|
        Inner Join
        |--||||||||--|
        | A  | B  | C  | D  | D  | E  | F  | G  | H  |
        |--||||||||--|
        | a1 | b1 | c1 | 1  | 1  | e1 | f1 | g1 | h1 |
        | a2 | b2 | c2 | 1  | 1  | e1 | f1 | g1 | h1 |
        | a4 | b4 | c4 | 3  | 3  | e2 | f2 | g2 | h2 |
        |--||||||||--|
    Example
    Output a list of all flights from Frankfurt to New York between September 10th and 20th, 2001 that are not sold out:
    DATA: DATE   LIKE SFLIGHT-FLDATE,
          CARRID LIKE SFLIGHT-CARRID,
          CONNID LIKE SFLIGHT-CONNID.
    SELECT FCARRID FCONNID F~FLDATE
        INTO (CARRID, CONNID, DATE)
        FROM SFLIGHT AS F INNER JOIN SPFLI AS P
               ON FCARRID = PCARRID AND
                  FCONNID = PCONNID
        WHERE P~CITYFROM = 'FRANKFURT'
          AND P~CITYTO   = 'NEW YORK'
          AND F~FLDATE BETWEEN '20010910' AND '20010920'
          AND FSEATSOCC < FSEATSMAX.
      WRITE: / DATE, CARRID, CONNID.
    ENDSELECT.
    If there are columns with the same name in both tables, you must distinguish between them by prefixing the field descriptor with the table name or a table alias.

  • SELECT query from multiple databases

    Hi,
    Is it possible to run a SELECT query using multiple DBs' tables, like outer joining them. One of the DBs is Sybase.
    Thanks in advance

    A TopLink session can span multiple databases if they can be accessed through a single connection. A single select would require the database to handle the aggregation as mentioned in the other post.
    Alternatively TopLink's session broker will support making a single session present persistent types from multiple independent databases. This approach will not support a single SELECT spanning the databases though.
    Doug

  • Finding same column name from multiple database tables

    I am needing to find all tables in a database that contain the same column. ie: which tables in database A have col_a in it.
    Is it possible to do a sql code to qry all of this?
    Thanks

    No, Ignacio did not, at least, not really. ;)
    The usage of ALL_TAB_COLUMNS only has info for tables which the actual user has access to.
    If you need to be sure that you search each and every table, you have to use DBA_TAB_COLUMNS (or the connected user must be a super hero...).
    Just wanted to point that out.
    Regards,
    Guido

  • Multiple database members in a single Grid Row

    Hi All,
    I have created an FR report (9.3x) and getting the below error while trying to run the report via Web Preview.
    5217: Error Processing Results;hasPovDims=1;povXML=<?xml version="1.0"?><datasources><datasource name="FIN QA" dsid="-117fcde3_132fd17f2f6_-771b" allowEdit="1"><dim name="Versions" dimIndex="0" dsName="FIN QA" keyDimName="Versions" memberName="Versions" displayName="Versions: Versions"/><dim name="Scenarios" dimIndex="4" dsName="FIN QA" keyDimName="Scenarios" memberName="Scenarios" displayName="Scenarios: Scenarios"/><dim name="Components" dimIndex="5" dsName="FIN QA" keyDimName="Components" memberName="Components" displayName="Components: Components"/><dim name="Customers" dimIndex="6" dsName="FIN QA" keyDimName="Customers" memberName="Customers" displayName="Customers: Customers"/><dim name="Assets" dimIndex="7" dsName="FIN QA" keyDimName="Assets" memberName="Assets" displayName="Assets: Assets"/></datasource><datasource name="FINDEF QA" dsid="-607fb334_128b79d246e_-7d0a" allowEdit="1"><dim name="Time Periods" dimIndex="1" dsName="FINDEF QA" keyDimName="Time Periods" memberName="Time Periods" displayName="Time Periods: Time Periods"/><dim name="Scenario" dimIndex="3" dsName="FINDEF QA" keyDimName="Scenario" memberName="SC_Actual" displayName="Scenario: SC_Actual"/><dim name="Versions" dimIndex="4" dsName="FINDEF QA" keyDimName="Versions" memberName="VR_Input_Version" displayName="Versions: VR_Input_Version"/><dim name="Customers_Region" dimIndex="6" dsName="FINDEF QA" keyDimName="Customers_Region" memberName="CU_NA" displayName="Customers_Region: CU_NA"/><dim name="Assets" dimIndex="7" dsName="FINDEF QA" keyDimName="Assets" memberName="Assets_NA" displayName="Assets: Assets_NA"/></datasource></datasources>
    In my report I have selected 2 rows where I have selected @descendants of ccounts from one database which is FIN QA and in the second row I have selected @children of Accounts from another database which is FINDEF QA. I am using only ONE GRID here.
    Is it not possibe to run a FR report by select members from multiple databases in a single grid??
    Please have your valuable inputs.

    Yes it possible to retrive data from multiple database using single grid.
    Also there are few limitations namely:
    Database connections must be of the same type (for example, both must be Essbase database connections or both must be Financial Management database connections).
    Mismatched number of dimensions in the database connections may cause retrieval errors.
    For more details refer to this link for details:-
    http://www.oracle.com/technetwork/middleware/financial-management/tutorials/obe-multipledbs-086586.html
    Cheers
    Vikas Naidu

  • Can join queries in Oracle 8i and above span multiple databases

    Hi,
    In Oracle 8i and above, can join queries span multiple databases??
    For eg., I have two databases A and B, and say database A has table A_T and
    database B has table B_T. Assume that both the databases are on the same
    server.
    Can I run a join query from my application using OCI calls that spans across
    tables from multiple databases, namely, A_T and B_T?
    My query probably looks like this - Select * from A.A_T, B.B_T;
    Thank you,
    Sashi

    In Oracle 8i and above, can join queries span multiple databases??
    For eg., I have two databases A and B, and say database A has table A_T and
    database B has table B_T. Assume that both the databases are on the same
    server.
    Can I run a join query from my application using OCI calls that spans across
    tables from multiple databases, namely, A_T and B_T?
    My query probably looks like this - Select * from A.A_T, B.B_T;If you create a database link from database A to B your SQL would look something like this:
    select * from A.A_T, B.B_T@dbB where A.A_T.PK = B.B_T.PK@dbB
    The Oracle manuals should have the information you need on creating a database link.

  • Discoverer Reporting Solution for Multiple Databases

    I have to build oracle discoverer reports (single point of access) for four different applications. Each application is having separate databases. So whether i should create separate EULs for each applications (in respective databases) or Should i create a single EUL in any one of the databases and then use db links to connect rermaining databases (for reports from the other applications).
    Can u suggest me which method will work good if you see the performace?. I need a dingle point of access for all the discoverer reports.
    The worksheets need to be deployed with oracle portal for access of reports in a single click. Is there any way to pre configure the db credentila for each worksheet...?

    Hi
    My replies below make the assumption that you are not allowed to do any ETL and therefore the data from each database has to be pulled as is. If you do have ETL capability the situation changes dramatically.
    In addition to what Sharon has said the cost based optimiizer will have a difficult job rewriting your query efficiently if you use database links, and if you attempt to have queries with some tables from one database and some from another the optimizer will not work at all. I mean. How could it? How could the optimzier in database A know anything about the statistics in databases B, C or D? Wherever the EUL is, that is where the driving optimizer will be so choose wisely obi-wan :-)
    For me it's more about user needs than IT needs. If the business has a need to combine data from multiple databases then having a single EUL with database links would be a necessity. However, if they really are disparate systems with nothing in common such as say having Peoplesoft HR in one and E-Busines Suite Inventory in another with perhaps an in-house tracking system in another then I would look at having separate EULs, one in each.
    Having one EUL across non-related systems means you have to mix users and roles and can be hard to manage. It actually becomes messy when just two databases are involved never mind four. So even though you might think it is more difficult to maintain 4 EULs, if the objects really are different and you have differing roles and usernames it actually will probably be simpler. They will be simpler to backup, simpler for exporting and importing and it will be faster for Discoverer to maintain workbooks as there will be fewer of them. Plus your system will have access to its local optimzier thereby ensuring the SQL is efficient.
    If you are going to use one EUL you need to start out on a sound foundation. This means using libraries to control access too business areas and workbooks. You'll need to adopt some simple naming standards to keep things separate and manageable. I wrote a paper about libraries a few years ago and it is available free of change here on my website: http://ascbi.com/downloads.htm. The paper is called Discoverer Libraries - a Concept.
    Best wiishes
    Michael

  • Querying from a database

    Hi,
    I would like someone to help me coding the search from a database.
    I have a html document which asks for a title or an author. My servlet should execute the query using the given title or author retrieving data from the database.
    I am trying to execute this query which i know as in sql.
    Select Authors.FirstName, Authors.LastName, Titles.Title from Titles, Authors, AuthorISBN where (FirstName = req.getParameter("keyword") OR Title =req.getParameter("keyword") ) AND Authors.AuthorID=AuthorISBN.AuthorID AND AuthorISBN.ISBN=Titles.ISBN
    I am getting sqlexceptions if i execute this query in the jdbc. Please someone help me in coding this in jdbc appropriately.
    Thank you.

    You are getting errors because that string is not valid SQL. Write a string expression that does produce valid SQL, something like this:
    String sql = "Select Authors.FirstName, Authors.LastName, Titles.Title from Titles, Authors, AuthorISBN where (FirstName = " + req.getParameter("keyword") + " OR Title = " + req.getParameter("keyword") + " ) AND Authors.AuthorID=AuthorISBN.AuthorID AND AuthorISBN.ISBN=Titles.ISBN;
    You'll have to hack around with it to make it work. I am willing to bet you don't get it right the first time. Use System.out.println(sql) to check what you are producing.

  • Multiple database vendor

    What is the best way to search across multiple databases vendor (oracle and SQL server)?

    What is the best way to search across multiple
    databases vendor (oracle and SQL server)?Code a Factory class to handle this. And have all the drivers available. :-)

  • Including multiple databases per connection

    I have linked tables accross multiple databases and would
    like to include all applicable tables (from multiple databases) in
    a single dreamweaver database connection. Is this possible. I can't
    put all tables in a single database because one of the databases is
    a mirror of a quoting application and gets backed up to regularly
    which is why I need to keep intact.

    >microsoft access, is this what you are asking
    Yes, that is what I was asking. But I really don't know the
    answer for MS Access as I've never tried. I've worked with linked
    tables in Access, but not from ASP. Why don't you just give it a
    try. It should take a few minutes to test.

  • One model, multiple databases?

    Hi,
    is it possible to have ADF entities from different databases in one Business Component Projects?
    If so, where do I specify which connection should each entity use?
    Ragards
    Jernej

    What is your architecture ? EO are not relevant so they are ignored
    project_1
    +am_p1_1
    +vo_p1_1
    project_2
    +am_p2_1
    +vo_p2_1
    project_view
    - depedency p1
    - depedency p2
    You may be able to build your ui from vo_p1_1 using vo_p2_1 as lov after the ui is generated by extending the corresponding item.
    I think it is not possible, but i'm not sure, to declare vo_p2_1 as lov at the model level (in project_2).
    If it is important or easier for you, you may just create a view in the project_1 corresponding database instance that use a dblink ot project_2 corresponding instance. You may use this view to as a lov directly at model level as it is table from your instance. All sql transactional aspects regarding distributed transactions are (nicely) managed by the database.

  • Search with multiple criteria

    I have searched high and low on the internet o find a way to
    do a search through multple fields but the more I lookthe more i
    get confused. here is the problem. i want to do a search where the
    user can input a data element and select the matching type and
    display he results.below is the code that i have for my search
    page, but I am confused about the more important parts of the fom -
    the actual search variables.
    If you look t the code below you see that I have a test field
    named "recordID" and a drop down list named "select".
    I want to dispay the results in which 'recordID' looks in
    table thatis equal to 'select'.
    an example of what I want is at the following link.
    http://www.phpscriptsearch.com/

    DizzDizzy wrote:
    > I went to
    http://www.webassist.com/professional/products/productdetails=
    =2Easp?PID=3D117&CouponID=3Dss2008&RID=3D590&WAAID=3D92
    > but i could not find the solution there
    Hi Dizz:
    Under the banner you'll find links for Overview, Features,
    System=20
    Requirements, Support. When you click on the Features link,
    the MooFX=20
    Accordian javascript class runs to update the content on the
    page. The=20
    bullet points are clickable to similarly update the content
    on the page. =
    Click on the bullet point "Pro search and sort enhancements"
    and read=20
    the paragraph at the bottom under the screen shots:
    Sophisticated search capabilities
    DataAssist integrates the advanced search functionality
    previously=20
    available in Database Search. Now you can combine advanced
    Google-style=20
    keyword searches (across multiple database columns) with
    price, date or=20
    number ranges =96 all without coding.
    Please take a look at the feature tour:
    http://www.webassist.com/professional/products/featuretour/media_117.asp
    As for the Prof's requirements, the form submits two values,
    a recordID=20
    and a selection to either search by company or by store
    number.
    If Prof has a table named company and another named store
    number, the=20
    way you'd search these tables would be to have another table
    that=20
    contains the selectcategories with a column containing the
    values=20
    "company" and "storeNumber" along with ID columns that relate
    to a=20
    categoryID column in the companies table and the storeNumber
    column in=20
    the Stores table. Using this relationship Prof can create a
    reccordset=20
    on his results page that returns the values using an INNER
    JOIN to=20
    combine the tables in the recordset. Similarly by
    constructing the=20
    relationships properly as to his records (let's say he's
    searching 45RPM =
    singles - anybody remember those thingies?) His company table
    can have=20
    an ID column that references his product table where a
    companyID is=20
    stored. Again, a JOIN statement is used to include the
    product=20
    information, including the ProductID in the Recordset.
    Similarly for the =
    Stores table, again, the Products table has a column that
    identifies the =
    store that carries that productID. If more than one store
    carries the=20
    product, the column should be a storesID column that
    references a=20
    ProductStores table which references the stores that carry
    the product=20
    by a common ID. Again, using the JOIN (this recordset query
    would get=20
    complex) the necessary data can be returned.
    The DataAssist Search Server Behavior applies a sophisticated
    WHERE=20
    clause to the recordset. so that the requested records can be
    returned=20
    to the page. Prof is not needing a tool to build database
    management, so =
    I can see his point... but if this is something you do
    regularly,=20
    DataAssist will pay for itself over and over in time saved.
    And WebAssist is conducting a 50% off sale through next
    Friday, so it's=20
    a good time to get on board. Here's a link to the discount
    page for all=20
    the products:
    http://www.webassist.com/professional/products/productresults.asp?CouponI=
    D=3Dss2008&RID=3D590&WAAID=3D92=20
    enthusiastically,
    mark haynes.

  • Consolidate multiple database

    Hi,
    I'm trying to load data from multiple database with the same structure.
    Key are unique for a single database, but can have duplicates when merged, so i need to use a surrogate key.
    Something like this
    DB1
    CustomerID CustomerName
    1 John
    2 Mark
    DB2
    CustomerID CustomerName
    1 Paul
    The target table should look like this
    GlobalID OriginalID DatabaseName CustomerName
    1 1 DB1 John
    2 2 DB1 Mark
    3 1 DB2 Paul
    I cant figure out how to handle the "DatabaseName" source.
    AFAIK it should be a Source column, but should be different any time I run the interface (a variable maybe)?
    Can you point me the right way to handle a situation like this?
    Regards,
    Corrado

    Hi Corrado,
    Bit lengthy reply after a long.
    You can handle this with 1 temp staging table, 3 interfaces and 2 Varaibles.
    Variable 1:
    Name : SRC_DB1
    Schema : <logical schema points to DB1>
    Query:
    select '<%=odiRef.getInfo("DEST_SCHEMA")%>' from dual
    Variable 2:
    Name : SRC_DB2
    Schema : <logical schema points to DB2>
    Query:
    select '<%=odiRef.getInfo("DEST_SCHEMA")%>' from dual
    Temp Staging table structure let me say it as TEMP_CUST would be same as ur target table except Global Id column.
    Interface 1:
    Source : DB1.Sourcetable
    Target : TEMP_CUST
    Mapping:
    OriginalID : Sourcetable.OriginalID
    DatabaseName : '#SRC_DB1'
    CustomerName : Sourcetable.CustomerName
    KMs:
    LKM : As u wish
    IKM: IKM SQL Control Append (With Truncate yes, if required)
    Interface 2:
    Source : DB2.Sourcetable
    Target : TEMP_CUST
    Mapping:
    OriginalID : Sourcetable.OriginalID
    DatabaseName : '#SRC_DB2'
    CustomerName : Sourcetable.CustomerName
    KMs:
    LKM : As u wish
    IKM: IKM SQL Control Append (With Truncate NO)
    Interface 3:
    Source : TEMP_CUST
    Target : TARGET_CUST
    Mapping:
    Global ID : sequence.nextval (execute on target)
    OriginalID : TEMP_CUST.OriginalID
    DatabaseName : TEMP_CUST.DatabaseName
    CustomerName : TEMP_CUST.CustomerName
    IKM: IKM SQL Control Append (With Truncate NO)
    Create an Package and drag and drop ,
    SRC_DB1 (refresh mode), SRC_DB2 (refresh mode), INterface1, interface 2 and Interface3.
    Try this and let me know how its goes.
    Thanks,
    Guru

Maybe you are looking for

  • I've done something stupid..... again

    Hello. Thank you to all who helped me out very late last night but I now have another question. By accident I've deleted my "Movies" volume under my home folder. I have created a new one now but I have a blank folder in my side bar which always says

  • Is it required to keep the older versions of JAVA

    I see that all the updates are visible as installed , and take up a large ammount of valuable disk space , is it necessary that all the updates be retained Inidviually on the disk , IS IT POSSIBLE to remove the earlier updates and retain only the lat

  • Uploding logo

    Hi everybody, I want to upload a logo to sapscript. I execute the program RSTXLDMC for uploading .tiff file. Image is currently .tiff file.When I execute the program: Error message displays as: TIFF FORMAT ERROR: No baseline for Tiff 6.0 file. How ca

  • Can't Open iPhoto Library on External Hard Drive

    Hi, please help! I currently have 2 iPhoto libraries. 1 is on my external hard drive- and isn't recognized by iPhoto anymore. And the other is a newer one, on my internal hard drive. Here's what I did: I copied my entire iPhoto library to my external

  • OS X Lion help

    I have no way of backing up my computer (only have a 3.98GB flash drive) and it needs to have Lion reinstalled to clean the disk up a bit. Any ideas on what to do??