What To Do About Chatty Data Models?

I'm working on a legacy app that has some DAOs that are "chatty". There are multiple methods, each with different SQL, that bring back primitive values (e.g., double, String, etc.) This DAO is written in such a way that assembling one DTO to return to the client takes 70 distinct calls, each with its own network roundtrip.
What's the best way to go about correcting this?
Combining those disparate SQL queries into one big JOIN is a daunting task, made complicated by some other features in the implementation.
Is a stored procedure a possible solution? We're using Oracle 8i as the data store.
%

Then to use one stored proc you would need one of the
following...
- Stored proc that returns several result sets (which
I have never tried with Oracle)
- Or a combined result set that allows you to
seperate out the different collections from a single
row (probably with empty fields.)I was thinking the latter.
This sort of thing is one of the cases where MS SQL
Server is a lot easier than Oracle, you create some
temp tables, fill them and then just select them to
get the values. In one case I had to use a 'temp'
table for a complicated collection process in Oracle,
but for Oracle that means that a real table must
exist.Oracle is the platform here. I'm not at all knowledgable re:M$ SQL. Sounds like it could be a fine solution.
Obviously you could create several procs as well.There's some push back on that, too. Views are in vogue. But if I could write a single SELECT to create the VIEW I'd be able to rewrite the Java to bring all the database back in one go, too. It's not that easy.
Why does it need 70 calls? Something like getting
all of the telephone numbers they first get the list
(1 call) then get each tn with a seperate call rather
than using a single select in the first place? That
sort of thing is easily reduced and there is no need
for procs.Sometimes that's what they're doing. (JOINing on the middle tier.) There are other idioms in play, too.
%

Similar Messages

  • Information about adf data model's state management in JSF/ADF faces?

    Dear All,
    i am developing an application with JSF/ADF faces + using
    adf data model (EJB, not adf bc)...
    i want to know more about state management of adf data model..
    1. under what condition, will the data in the binding context
    (methodIterator, variableIterator, accessorIterator..etc) be maintained accross
    http requests? say browse pageA.jspx, pageB.jspx, pageC.jspx..then do data
    in the corresponding pages saved somewhere else until session timeout?
    2. how do the binding context data be saved ?? http session?
    i can't find detail information in the adf bc dev guide and the adf dev guide..
    could anyone give me more information about this?? any better document??
    i have asked these question several times...but seem nobody can give me a
    full picture about the adf data model's state management....it is quite important
    in order to develop good application using adf data model.
    my company have brought oracle's support service...can i get these information
    through metalink (open a SR) ?? or actually no such information available ??
    btw, after playing with adf data model for a few weeks, i do find it is very
    hard to learn it... no complete document, information is just by providing example...
    adf data model do make:
    1. simple logic, supported by adf, more simple in coding
    2. simple logic, not supported by adf, more complex in coding
    3. complex logic, much more complex in coding...brain damage..
    lsp

    Hi,
    actually, these pages don't explain the state management about the adf data model's iterators?
    i want to know the state management of the iterators...for some iterators..it's
    state is maintained across requests...
    please see my previous post: ADF JSF data binding: why state maintained between requests? that Frank Nimphius said:
    "in this case its the iterator that survives the page navigation"...
    in the adf dev guide..section 5.5.5..it says: "Upon each request, the iterator bindings are refreshed to rebind them to the
    underlying RowSetIterator objects. By default, the rowset iterator state and the
    data caches are maintained between requests."
    in dev guide, it seems state is maintained for request for the same page, but not
    accross different pages. but in fact, the rowset iterator do survive...
    any detail document that write down the actual behavior of the iterators?
    thank you.
    lsp

  • What are nested groups in data model?

    I am new to Oracle reports. I am trying to modify the data model query. I don't understand nested groups . i.e There are two groups within one groups. These two groups are linked by dotted line. I don't find any information in online help. Please help me to understand this feature. I appreciate any link which explains this.
    Thanks
    Message was edited by:
    user609146

    Hello,
    If it is something similar to the data model screen shot at :
    http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b13895/orbr_matrix.htm
    then, it is a matrix Report
    Regards

  • Data model that takes part of data to DSO and part to cube

    Hello experts,
    I have a question about the data model I am currently working on. This model is about a reservation agency, where a customer contacts the agency through a sales representative and makes a reservation for a certain event. He later has the option of confirming or cancelling the reservation. We will be receiving data for future reservations every day, with the updated status of future and recently past reservations, sales representative in charge of the reservations, income that will be perceived from each reservation (if the reservation is confirmed) or that was perceived if the event already took place, and more.
    I have found the need to use a DSO to update the reservation status of incoming reservations, as well as other fields. I am loading from a flat file with 20 fields, and the destination is a cube, after the data gets cleansed in the DSO, where there are 2 key fields (reservation code and reservation date).  However, not all the remaining data from the flat file needs to get updated. Out of the other 18 fields, only around 9 may change on an update, while the others will never change (for example, the customer name, confirmation date and event name will not change, while the sales representative, reservation status and income perceived can change from one day to another).
    I was designing a model in which the DSO contained all 18 non-key fields as data fields, so that everything got updated and passed to the cube, but then I thought that perhaps since many fields will not change, it would be better if the DSO only updated those fields that could actually change, while the other fields "jumped" directly to the cube. After the DSO updates the changing fields, the others will already be in the cube. This way, the DSO would receive and have to process less amount of data, making the DSO tables smaller and the process more efficient. But I cannot find a proper way to do this from a single data source, since the data has to pass from the data source to the DSO and then through a transformation from the DSO to the cube.
    Is there a way to accomplish this, or should I just have all fields go through the DSO and from there to the cube?

    Hi, thanks for the suggestion. The reservation code, as of right now, is not master data, and it is unique almost always, except for rare occurences where the same customer makes several reservations, each one for a different date (that is why for the DSO I am using as key fields both reservation date and reservation code). Because of that and the fact that there are lots of reservations made each day, we had defined that object without master data (since the master data table would be huge in a short amount of time). Perhaps I should change it to become master data? Or what should we do?

  • Best FREE data modeling tool

    What is the best FREE data modeling tool?  Thanks.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

    Hi Kalman,
    According to my knowledge, Microsoft Office Visio is helpful for building data model. For more information, please review this article:
    Create a Database Model (also known as Entity Relationship diagram).
    Besides, you can also use other third-party tools such as
    Erwin, SQL Power Architect to design SQL Server database. However, Microsoft cannot make any representations regarding the quality, safety, or suitability of any the third party software or information.
    There is also a discussion about free data modeling tool in the following thread for your reference.
    https://social.msdn.microsoft.com/Forums/en-US/b70d2cdb-dc7f-4e89-a0ae-9dbf5687199e/free-data-modelling-tool?forum=databasedesign
    Thanks,
    Lydia Zhang

  • Will SQL Developer always be free? Evidently Data Modeling extension won't.

    After learning the Data Modeling extension to SQL Developer was actually a for-pay product (only the Early Adopter release is free, evidently), I now wonder:
    Will SQL Developer always be free, or is there a chance it will be converted into a for-pay product? I don't want to invest any more time learning the tool if there will be future license fees to pay.
    I was sad to learn Data Modeling won't be free. Not knowing how much it might cost, I don't want to invest any time at all playing with it.
    Thanks.
    Dana

    Thanks K. Hope to learn more about the Data Modeling extension pricing--not that I'll be able to afford it. Too bad--I see Oracle going in a great direction with SQL Developer being free. It's a shame Data Modeling won't be. Right now, I am stuck using Enterprise Architect--and that's very limited for database design. Evidently it can be modified to do a lot more, but I don't have the skills or time to turn it into something it should do out of the box.
    What other free data modeling tools are out there? I liked Druid III, but that doesn't seem to be under active development. There's an Open Source tool called Power Architect, but it was rather buggy the last time I evaluted it:
    http://www.sqlpower.ca/page/architect
    Maybe it has improved since then (about a year ago).

  • How to rename a View Link in a data model?

    In JDeveloper 9.0.3, I create a simple BC4J project with a master and a detail. The business components are properly created.
    When I try to design the data model for the module, I am able to link the view for the master and the view for the detail, there is no problem to rename the view objects that I select in my data model, but I found no way to rename the view links used between the view objects.
    I always get an automatically generated name, like "FkForeignDetailLink1". This is what I see in the data model, and also in the structure of the module, in the "View Link Members" section.
    I am able to modify the properties of this view link, but not its name. Am I missing something?
    TIA

    to clarify... In the AM wizard, you are trying to rename the instances of view objects and view links?
    If so, you are right, there is no way to rename view links on that panel. We are working on a better way to do that for the next release. The only way I know of to rename the view links is to shut jdev down and edit the XML for the application modele. This can be dangerous if you get it wrong, so make a backup before attempting this. The hint with renaming things OUTSIDE JDeveloper, I already know, but I don't like much.
    As for the AM wizard, I just noticed that I cannot do it inside. But that's no problem for me, as lots of details cannot be done inside the wizard, but there is a way to customize them afterwards. My real problem is that didn't find ANY way of doing it.
    A question for you if I may. Why are you renaming the view link instances? I though most users would use the detail view instance directly. The detail view instance would in turn look up the appropriate view link into, what ever its name was. The only place where I saw the bad view link names displayed in JDev was the Structure pane of the AM, under View Link Members. But there is no way to modify them there. As for the detail view instance, I didn't find a place to get to the view link at design time (in 9.0.3.988).
    Could you be more precise, please?
    Thanks again,
    Adrian

  • Data model in BW 7.0 (NW 2004s)

    Hello friends.
    The question is about the data model in BW 7.0 in comparison with BW 3.0, 3.1 and 3.5. Is is still the same? I mean, the database tables ofcubes and ODSes, are they still the same, with the same structure, naming convention and so on?
    Thanks in advance,
    Kooyot

    hi,
    The data models are same.
    Some enhancements in Data warehousing is here. check it out.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/31/ec1342eb11de2ce10000000a1550b0/frameset.htm
    if it is useful assign points
    Regards,
    Senthil Kumar.P

  • SQL Developer Data Modeler for SQL Server 2008

    I am not able to connect to my SQL Server 2008 from the SQL Developer Data Modeler. Although I do have jtds-1.2.jar on my machine and I can connect the SQL server through the SQL Developer, but still i'm not able to connect through the data modeler. I need to re-engineer and generate data model for some existing schemas.
    Here is what I'm following:-
    File->Data Modeler -> import -> Data Dictionary -> Add new connection -> JDBC ODBC Bridge -> Other Third Party Driver
    now when I'm giving the JDBC URL and the Driver, It throws an error message stating that the driver could not be found.
    Please let me know what I can do to solve this, any help would be appreciated.
    Regards,
    AVA

    I'd try 1st to connect to the db from sqldeveloper (through jtds - no ODBC involved) and see if you can browse your db and issue sql statements in a worksheet. Then export that connection in xml format and import that from the modeler.

  • SQL Developer Data Modeler not drawing foreign key relationships

    I'm having trouble with SQL Developer Data Modeler when I importa a DDL that has foreign keys. I export DDL files from SQL developer and choose various subsets of files. Sometimes Data Modeler will not recognize a foreign key if I include say a dozen files in the DDL file, but it will if I include just a few. Worse, even if the foreign key is recognized, sometimes it is not drawn in the Data Modeler and I have no way to make it be drawn. To be specific, I import a file containing the DDL for just two tables -- I see the foreign key! I import a file containing the DDL for a dozen tables including the two, I don't! Is there something I am not understanding about when Data Modeler will draw foreign keys or is the tool simply quite buggy?
    Much thanks!
    -ttamon

    Hi Philip,
    I believe I have isolated the problem. Apparently if a field is named "FOREIGN..." it interferes with the tool recognizing foreign keys. Try to import a DDL file containing the following text:
    CREATE TABLE "SAMPLE"."SAMPLE_ONE"
    (     "ID" VARCHAR2(255 CHAR) NOT NULL ENABLE,
         "VALUE" VARCHAR2(255 CHAR),
         PRIMARY KEY ("ID")
    TABLESPACE "SAMPLE_DATA" ;
    CREATE TABLE "SAMPLE"."SAMPLE_TWO"
    (     "ID" VARCHAR2(255 CHAR) NOT NULL ENABLE,
         "FOREIGN_NAME" VARCHAR2(255 CHAR),
         PRIMARY KEY ("ID")
    TABLESPACE "SAMPLE_DATA" ;
    CREATE TABLE "SAMPLE"."SAMPLE_THREE"
    (     "ID" VARCHAR2(255 CHAR) NOT NULL ENABLE,
         "VALUE" VARCHAR2(255 CHAR) NOT NULL ENABLE,
         "ALT_ID" VARCHAR2(255 CHAR),
         PRIMARY KEY ("ID")
    TABLESPACE "SAMPLE_DATA" ENABLE,
         CONSTRAINT "FK6DF8294F2288190D" FOREIGN KEY ("ALT_ID")
         REFERENCES "SAMPLE"."SAMPLE_ONE" ("ID") ENABLE
    TABLESPACE "SAMPLE_DATA" ;
    You will discover the foreign key is not recognized or drawn! Now, if you swap the location of the third table (put it up first) everything works fine. This is how I discovered the problem, various subsets would work, others would not. To confirm the problem is with the field named "FOREIGN_NAME" use the DDL as specified above but change the first letter in the word "FOREIGN" to something else, and it will recognize the foreign key. Looks like a bug to me (took me about 4 hours to isolate this!). I am using Oracle SQL Developer Data Modeler version 2.0.0 Build 584.
    -ttamon

  • Historical Data Models

    I'm looking for case studies on historical data models, because I'd like to know how other analysts had overcome this subject.
    Please, can anyone help me?. Thanks

    I'm looking for case studies on historical data models, because I'd like to know how other analysts had overcome this subject.
    Please, can anyone help me?. Thanks There is a book by Oracle Press about "UML and Oracle 8" (don't know the exact title) where UML vs. ER modeling is presented.
    Thru the book you can find a chapter about "Historic Data Modelling". Try a search on Amazon, you'll find the book for sure.
    There is also a book "Developong Time-Oriented Database Applications in SQL" by Richard T. Snodgrass.
    Greeting from Croatia,
    Drago Ganic

  • Searching for Data Modell

    Hello,
    I need some further information about the data modell of SBO. An ERD would be great, but as far as I know there is no such diagram available.
    Searching in this forum gave me the information that that there are two useful files:
    - SBOObjectsTables 6.5.chm
    - DB_Help.chm
    I don´t have access to the marketplace, that´s why it would be great if someone could mail one of these files to me to [email protected]
    Thanks!

    Done

  • How can I print, save or export from Data Modeler

    From Oracle SQL Developer I select Tools > Data Modeler, then drag a few tables on the surface. Both Print and Save options in the File menu are disabled. Also, there's no export option. What is the purpose of Data Modeler. I', using SQL Developer 2.1.0.63.

    It's Data Modeler Viewer included in SQL Developer 2.1. You need SQL Developer 3.0 or 3.1 EA1.
    Philip

  • What is Data Modeler?

    Hi Pals
    What is Data Modeler in ABAP. We use SD11 for it.
    But Why/Where/How we are using the Data Modeler?
    Plz provide a clear view n some tutorials also.
    Thx
    Aalphy

    Hi Aalphy AnLe  ,
    The following websites give complete details about Data Modeler:
    Data Modeler: overview
    http://help.sap.com/saphelp_nw04/helpdata/en/22/bd1781460a11d188fe0000e8323d3a/content.htm
    Example of a Flight Model : Data Modeler
    http://help.sap.com/saphelp_nw70/helpdata/en/cf/21f304446011d189700000e8322d00/content.htm
    cheers!
    gyanaraj
    ****Pls reward points if u find this helpful

  • What's the best way to model the following requirements in a data model?

    I need a data model to represent the following scenario but i just can't get my head around it.
    Class A has many Class B's. Class B's can have many Class C's and vice versa. So ultimately the relationship for the above 3 classes is as follows:
    Class A -- (1 : M) --> Class B --- (M : M) ---> Class C
    And Class C must know about its parent referenced (Class B) and also same applies to Class B where it needs to know who owns it (Class A).
    Whats the best way to construct this? In a Tree? Graph?
    Or just simply:
    Class A has list of Class B and Class B has list of Class C.
    But wouldn't this be tight dependencies?

    Theresonly1 wrote:
    Basically:
    A's owns multiple B's (B's need to know who owns it) BUT a B can be only owned by one A
    B's owns multiple C's AND C's can be owned by multiple B's (this is a many-many relationship, right?) - Again; (C's need to know who owns it)I'd reckon that you'd need some references. First, figure out the names of each tier of class. I would say maybe A is a principal/school, B's are teachers (because typically teachers only teach under one principal/ in one school), and C's are students (because teachers can have multiple students, and each student has multiple teachers). So now that you have the names, make some base classes. If I understand your problem correctly, A's really don't need to know who they own, but B's need to know who owns them, so A's don't need to have much of anything. B's have a reference to the A that owns them, but not much else because they don't need to know who they own. C's own nothing, but they are owned by multiple B's, so they have an Array of refrences to each of the B's that own them. I'd use an ArrayList, considering each could have a different amount of B's, but you could do it with an array if you tried. I'll leave it up to you how you implement everything, but I'll give you some guides to how I might do it:
    public class Principal{
    public class Teacher{
          public Principal owner;
          public Teacher(Principal owner){
                this.owner=owner;
    public class Student{
          public Teacher[] owners;
          public Student(Teacher owner...){
                owners=owner;
          public void addOwner(Teacher newOwner){
                //basically copy and paste the old array into a temporary one
                //with an extra spot, add newOwner to the end of that, then
                //make the owner array refrence that array.
    }In Student, I'm pretty sure thats how you allow an undetermined number of parameters be used, and I'm pretty sure that it comes out as an array. I hope this helps you!

Maybe you are looking for