Dealing with Denormalized Tables - jdev 11.1.2.3 redhat 5.8

Hello:
In a Legacy oracle system, we have many tables that are not in 3rd normal form. i.e. they are denormalized.
Example: A student has many teachers and a teacher has many students... a classic many-to-many. The normal solution would be to create an association table to hold the intersection.
However in a legacy system, we have the student table that has columns of teacher1, teacher2, teacher 3, teacher4, teacher5, teacher6, teacher7 and no association table.
Without modifying the table structures, what is the best way to deal with this in a ADF application. My guess would be to create 7 view links and write code to implement
any logical rules.
Does anyone have other ways around this problem?
Thanks for the help.

Hi,
how about using a database view
e.g.
select student_id, teacher1 from your_table
UNION
select student_id, teacher2 from your_table
UNION
select student_id, teacher3 from your_table
Create an entity and view object based on the database view. If you need teachers to be updateable, create stored procedures and override the entity object doDML method for insert/update/delete
Frank

Similar Messages

  • Best way to deal with Mutating table exception with Row Level Triggers

    Hello,
    It seems to be that the best way to deal with Mutating Table exception(s) is to have to put all the trigger code in a package & use it in conjunction with a Statement level trigger .
    This sounds quite cumbersome to me . I wonder is there any alternative to dealing with Mutating table exceptions ?
    With Regards

    AskTom has a good article about this,
    http://asktom.oracle.com/tkyte/Mutate/index.html

  • Can ui:table deal with large table?

    I have found h:dataTable can do pagination because it's data source is just a DataModel. But ui:table's datasouce is a data provider which looks some complex and confused.
    I have a large table and I want to load the data on-demand . So I try to implement a provider. But soon I found that the ui:table may be load all data from provider always.
    In TableRowGroup.java, there are many code such as:
    provider.getRowKeys(rowCount, null);
    null will let provider load all data.
    So ui:table can NOT deal with large table!?
    thx.
    fan

    But ui:table just uses TableDataProvider interface.TableData provider is a wrapper for the CachedRowSet
    There are two layers between the UI:Table comonent and the database table: the RowSet layer and the Data Provider layer. The RowSet layer makes the connection to the database, executes the queries, and manages the result set. The Data Provider layer provides a common interface for accessing many types of data, from rowsets, to Array objects, to Enterprise JavaBeans objects.
    Typically, the only time that you work with the RowSet object is when you need to set query parameters. In most other cases, you should use the Data Provider to access and manipulate the data.
    What can a CachedRowSet (or CachedRowSetprovider?)
    do?Check out the API that I pointed you to to see what you can do with a CachedRowSet
    Does the Table cache the data itself?
    Maybe this way is convenient for filter and order?
    Thx.I do not know the answers to these questions.

  • Dealing with DB table-entries in ABAP OO

    Hi everybody,
    in ABAP-Reports (normally) we have deal a lot with DB table entries.
    Is there a "state of the art" for doing this with ABAP OO?
    An easy example:
    Asuming I want to select table  entries into an
    internal table from BUT000.And than I want to write: the entries.
    How would this look like in ABAP OO?
    show the internal ZTable be my object?
    or should every BUT000-Table-record be my object?
    Regards Mario
    null
    Message was edited by:
            Mario Müller

    Hello Mario,
    A very good question. This is what is called as modeling.
    I shall give you an approach into this. There is no right and wrong way of doing it. Probably, only a more desriable or better way !!
    How you model it depends on what your object is.
    If you have an internal table of sales orders, still in real world the services or methods are on a single sales order. So the object here is a single sales order.
    => I would model the class to deal with one sales order. (this more or less answers your question)
    2. Just to take this a little further.
    What I would do is have 3 different layers of abstraction.
    A UI class, a business layer class and a DB class.
    UI class can only talk to business class, business can talk to DB class. And the DB class is a static class.
    The UI class is only responsbile to do the display job.
    The UI will display multiple sales orders for eg, so u have an internal table of instances to the business layer.
    The business layer itself does validation, processing for each sales order.
    The business layer can also have soem static methods (or class methods) to select multiple records from Database. This is static, as it is not acting on one sales order, but you are returning multiple. This method should simply call a method of the DB layer.
    The DB layer is meant only to read from DB and write to DB.
    Hope this helps. Remember to reward points, if it does.
    For more highlights into this, refer to some material on design approach or design pattern.
    Best Rgds,
    Prashanth.
    SAP.

  • XSU: Dealing with large tables / large XML files

    Hi,
    I'm trying to generate a XML file from a "large" table (about 7 million lines, 512Mbytes of storage) by means of XSU. I get into "java.lang.OutOfMemoryError" even after raising the heap size up to 1 Gbyte (option -Xmx1024m of the java cmd line).
    For the moment, I'm involved in an evaluation process. But in a near future, our applications are likely to deal with large amount of XML data, (typically hundreds of Mbytes of storage, which means possibly Gbytes of XML code), both in updating/inserting data and producing XML streams from existing data in relationnal DB.
    Any ideas about memory issues regarding XSU? Should we consider to use XMLType instead of "classical" relational tables loaded/unloaded by means of XSU?
    Any hint appreciated.
    Regards,
    /Hervi QUENIVET
    P.S. our environment is Linux red hat 7.3 and Oracle 9.2.0.1 server

    Hi,
    I'm trying to generate a XML file from a "large" table (about 7 million lines, 512Mbytes of storage) by means of XSU. I get into "java.lang.OutOfMemoryError" even after raising the heap size up to 1 Gbyte (option -Xmx1024m of the java cmd line).
    For the moment, I'm involved in an evaluation process. But in a near future, our applications are likely to deal with large amount of XML data, (typically hundreds of Mbytes of storage, which means possibly Gbytes of XML code), both in updating/inserting data and producing XML streams from existing data in relationnal DB.
    Any ideas about memory issues regarding XSU? Should we consider to use XMLType instead of "classical" relational tables loaded/unloaded by means of XSU?
    Any hint appreciated.
    Regards,
    /Hervi QUENIVET
    P.S. our environment is Linux red hat 7.3 and Oracle 9.2.0.1 server Try to split the XML before you process it. You can take look into XMLDocumentSplitter explained in Building Oracle XML Applications Book By Steven Meunch.
    The other alternative is write your own SAX handler and send the chuncks of XML for insert

  • Finding duplicates:Minus set operator in dealing with internal tables

    Dear experts,
    I am newbie to ABAP developement,i have been given an assignment to find the duplicate list of vendors in lfa table.
    Now duplicate list doesnot means that text tokens will be just exact to conclude them as duplicate ,it could also be like
    1111 Vendor ABC
    1222 ABC Vendor
    If anybody has clue ,how to work on such a problem ,plz come forward.
    Right now i just tried initially how to find exact duplicates,i found  on change command,it do works.
    Then i am trying a new way which should just do the same thing.
    I did as per this algorithm
    1.Compute wholesome list in one internal table itab1
    2.Used delete adjacent duplicates in itab2.
    3.I feel itab3=itab1-itab2 will contain all duplicates in itab3.
    Can anyone give me a hint.How can i do A-B ?.

    Hi Arul,
    There is no special aided SET operations upon internal tables in ABAP. Concerning your particular task I would say that you can try INSERT statement for each record in your internal table without preliminary comparing them with DB table. If there is a record in DB table with the same key then sy-subrc after INSERT will be non zero (actually 4) and no real insert would occur. So, only those records would be inserted which have no counterpart in DB table.
    Best regards, Sergei

  • How to deal with two tables in the Data Base

    Hi Experts,
    IF WE WANT TO GET THE DATA FROM THE TWO TABLES, WHAT QUERY SQL STATEMNET SHOULD HAVE TO WRITE AND ANY CONFIGURATION CHANGES NEED TO BE DONE AND WHAT SETTINGS NEED TO BE DONE IN THE ESR .
    PLEASE EXPLAIN ME ON THIS .
    THANKS IN ADVANCE.
    RAM

    If you are using the same database and referencing two tables then you dont need special configuration for it. You use single jdbc adapter. In ESR you create two statment structure one for each table. This is one option. The second option is use join statment and write query and in this case one statment data structure.
    Please go through the help sap link for the jdbc document structure.
    http://help.sap.com/SAPHELP_NW04s/helpdata/EN/2e/96fd3f2d14e869e10000000a155106/content.htm
    The second option can be done using the below structure.
    <StatementName>
    <anyName action=u201D SQL_QUERYu201D >
    <access>SQL-String with optional placeholder(s)</access>
    <key>
      <placeholder1>value1</placeholder1>
      <placeholder2>value2<placeholder2>
    </key>
    </anyName > 
    </StatementName>

  • Best data component to deal with mysql table

    Hi.
    I have an LMS (learning management system) with a lot of info in a mysql dbb with a few tables.I also use a lot of php.
    I was told flash data components aren't the best in the world so what should I do?
    Somebosy mentioned that I should use Flex data components as they were built for this sort of thing and are a lot more powerful. So where do I get one of those for ie: do I have to download anything as I only have Flash Cs5.5. Then how do I get that component into flash?
    Or would it be better to use a third party plugin for displaying tables. Somebody mentioned that excel and its pivot tables are amazing and simple.
    At the end of the day I also want clients to be able to see a dashboard.

    I am looking into various methods.
    Excel has a powerful pivot table which is amazing for tables, graphs etc... in a few drags with no programming.
    My brother uses it in Lloyds bank for number crunching millions of rows so it's even more than I need.
    I don't know of anybody mentioning excel if they use flex ie: maybe I am mixing both worlds. I will look into flex data components as there are tuts on lynda.com and using mxml. Basically a knowledgeable prgm told me I have to know at least as much as the programmer that I subcontract to. Therefore I have been reading my butt off. I am very weak on databases so that's my next field of research.
    THANKS.

  • How to deal with Join Table in SAP Query

    Hi buddy,
    I create a Infoset ZTest by some infotype, one of them is 0185, and 3208.
    In 0185 there is a ICTYP and 3208 also SUBTY, and they are Join by that fields.
    It means, add a new record in P0185 with ICTYP = 'RS', there is a new record add in P3208 automaticly.
    Now, in my SAPQuery, I just need to input a ICTYP, and select the result. It always have unnessary records in output.
    Fg.  in P0185 have two records, ICTYP are 'RS', 'FR', so, in P3208 also have.
    And input 'RS' as input selction paramters, it check the records which ICYTP is RS in P0185, but it won't do the check in P3208, because, in selction screen, it just have P0185-ICTYP.
    So, the output will have problem.
    I want to know how to fix this issue, or add some extra code in the SAPQuery....
    Really thanks .

    hi,
    The pdf below gives the steps to create drill down report.
    http://www.sappoint.com/abap/eis.pdf
    also check.
    <a href="http://72.14.203.104/search?q=cache:k-SFYy_rjPIJ:www.hrexpertonline.com/archive/Volume%252003%2520(2">http://72.14.203.104/search?q=cache:k-SFYy_rjPIJ:www.hrexpertonline.com/archive/Volume%252003%2520(2</a>
    regs,
    jaga

  • Access inputValue of Column in Table - jdev 11.1.2.3 redhat 5.8

    Hello:
    In HR Schema:
    I dropped a DEPARTMENTS data control collection as a read only table on a page. In the Source I see references to the columns such as <af:outputText value="#{row.DepartmentName}" id="ot2"/>
    Outside the table I, drop a AF:outputText on the page and set its value to "#{row.DepartmentName}" , but it always shows a blank... What am I doing wrong???
    How can I access a column value in the currently selected row in the table in both EL and Java?
    Thanks much.

    It's not necessary to write your own selctionListener. All you have to do is to add a attributeValue the column in the binding section of the pageDef.
    One easy way to accomplish this is to drag the VO you used for the table and drop it on the page as ADF Form (you can use a read only form if you don't plan to change the values). This will create the bindings for all columns values of the selected row in the pageDef. Now, as you don't need the form, switch to source mode and remove all fields you do't need from the page. This will leave the bindings in the pageDef, but remove the not needed fields from the visual page.
    Now when you select a row in the table the framework will load the values of the row into the attributeValues wher you can easily access them.
    Timo

  • How to deal with deadlock on wwv_flow_data table when http server times out

    There are some threads about a deadlock on the wwv_flow_data table. None of them contain a real explanation for this behaviour. In my case I will try to explain what I think is happening. Maybe it helps somebody who is hitting the same matter.
    In my case with APEX 3.2.1 I am navigating from one page to another. Doing this APEX will lock the table wwv_flow_data. As soon as the other page is shown the lock will be released. But now this other page contains a bad performing query (standaard report region). After 5 minutes the http server (modplsql) will time out and present the message "No response from the application server" on the screen. In the meanwhile the query is still running on the database server and the lock stays on the wwv_flow_data table.
    Normal user behaviour will be that the user will use the back button to return to the previous page and tries it again to navigate to the other page or
    the user will try to refresh the page with the bad performing query.
    And voila now you will have a deadlock on the wwv_flow_data table since a second session is trying to do the same thing while the first hasn't finished yet.
    How to deal with it?
    First of all. Have a good look at the bad performing query. Maybe you can improve it that it will succeed before the http server will timeout.
    In my case the 11gr1 optimizer couldn't handle a subquery factoring clause in the best way. After changing it back to a classical inline query the problem was solved.
    Secondly you could increase the timeout parameter of the http server. Although this not the best way.
    Maybe it would better if APEX in a next version would release the lock on the table wwv_flow_date earlier or do a rollback just before the moment that the http server is timing out.
    regards,
    Mathieu Meeuwissen

    Hello Shmoove,
    I saw your reply here and you probably understand the problems the HTTP 100 response may cause.
    I am trying to send image that was taken by getSnapshot. The problem is that the server respond with this HTTP 100 message.
    I suspect that the reason that my server doesn't recognize the file that I'm sending from J2me is that the "server to client" response to the 100 message comes after the second message of (see what the TCPIP viewer shows down here):
    POST /up01/up02.aspx HTTP/1.1
    Content-Type: multipart/form-data; boundary=xxxxyyyyzzz
    Connection: Keep-Alive
    Content-length: 6294
    User-Agent: UNTRUSTED/1.0
    Host: szekely.dnsalias.com:80
    Transfer-Encoding: chunked
    400: Client to Server (126 bytes)
    78
    --xxxxyyyyzzz
    Content-Disposition: form-data; name="pic"; filename="david.jpg"
    Content-Type: application/octet-stream
    400: Connected to Server
    400: Server to Client (112 bytes)
    HTTP/1.1 100 Continue
    Server: Microsoft-IIS/5.1
    Date: Wed, 23 Mar 2005 00:47:02 GMT
    X-Powered-By: ASP.NET
    Any help will be appreciated,
    David

  • How to deal with the growing table?

    Every tables are growing in any applications. In some applications, tables become larger and larger quickly. How to deal with this problem?
    I am developing an application system now. Should I add a lot of delete commands in the code for each table?

    junez wrote:
    Every tables are growing in any applications. In some applications, tables become larger and larger quickly. How to deal with this problem?
    I am developing an application system now. Should I add a lot of delete commands in the code for each table?Uh, well, yes if you continually add rows to a table the table will grow ... sooner or later you will want to delete rows that are no longer needed. What did you expect? You have to decide what the business rules are to determine when a row can be deleted, and make sure your design allows for such rows to be identified. This is called ..... analysis and design.

  • Requesting guidance on how best to deal with removal of CreateElementSteps for tables when option to 'script validation for new constraints' is enabled during schema compare

    I have a DeploymentPlanModifer subclass that is responsible for removing certain tables from a deployment plan under specific conditions. It is relatively trivial to find the
    CreateElementSteps I need and subsequently remove them via
    DeploymentPlanModifier.Remove(), but...
    ... if in my comparison I have enabled the 'Script validation for new constraints' option, the deployment plan will contain a
    DeploymentScriptDomStep with a Batch containing AlterTableConstraintModificationStatements for tables with foreign key constraints. My problem starts here - there will be an orphaned
    AlterTableConstraintModificationStatement for each of the tables that I removed. Obviously, execution of the generated script comes to a grinding halt when asking SQL Server to to alter a table that is never created.
    I'm able to get around this by digging around in the aforementioned batches and removing the orphaned alter statements, but this seems really hacky, which makes me think I'm missing the proper way of dealing with this.
    So... if anyone is aware of a more correct way of avoiding this problem, I would really appreciate finding out more about it.
    Thanks in advance for any help. :-)

    Hi Greg. Unfortunately there is not an easy solution here. Walking the deployment model, spotting potential issues and excluding them really is what you have as an option here. The alternative is to pre-process the dacpac to have it in the form you want,
    but I'm not sure if this is an option in your case and it also has limitations.
    Regards,
    Kevin

  • Issues dealing with the Qualified tables

    Hi,
    I am facing below issues while dealing with the Qualified tables.
    Issue # 1. Trying to get the data from the Qualified table through the Main table. Qualified table is set as supporting ResultDefinition. I am able to get the value for only the non-qualifier fields but not the qualifier fields.
    Exception: com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: Qualifier values are not part of a qualified lookup record
    Issue # 2. Need to define the search on the fields of a Qualified table with Main table in the ResultDefinition. I am able to define the search on qualifier fields but not the non-qualifier fields.
    Exception:com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: Field not found
    I would like to know the standard ways to address these issues.
    Thanks,
    Surendra

    Hello,
    I was wondering if this issue is solved now. I'm still facing the problem when executing the RetrieveLimitedQualifierValuesCommand:
    com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: Field not found
    Are there other ways to manipulate qualifier field values? Workarounds... alternatives...
    Is it related to the MDM Java API version?  If yes, is there a fix?
    Thanks a lot for your input!
    Regards,
    Pedro

  • Dealing with tables from different databases?

    Hi. I'm a newbie to Visual Studio 2012 and stuck on how to interact with different datasets.
    I am building a report that is associated with with two tables, each from a different database. The
    master_flat table with the primary key matter_number is from the first database and it contains all the columns I need that should show up in the report layout I've built. However,
    billing_table with the primary key matter_number contains a flag that I go by which I must use to determine whether each matter should come through in the reporting or not. 
    I've set the master_flat as dataset1 and the billing_table as dataset2. Now, what is the best way in Visual studio 2012 to filter by the matters that has flag "N" in dataset2?
    Thanks

    We are way out of sync.  Lets synchronize.  I'm not sure which question you are refering to.  Is it the "C# or VBnet"  question or is it the "One or two database Question".  It seem like it would be the database question since you
    should know which programming language you are using.
    Open SQL Server Management Studio (SSMS).  After login, there is an explorer where you can browse the databases, tables, and fields in the tables.  You should be able to view how you build the database.  If you right click any tables and then
    "Script Table As : Select To : New Query Editor Window".  There is an execute button to run the query.  You can aslo edit the query.  I usually test all my qeuries in SSMS before actually using them in an application.  I would get a JOIN
    SQL working in SSMS.
    If you let me know if you are using VBnet or C# I will write a simple LINQ.  Even better if you supply me the names of the columns of the two tables.
    jdweng

Maybe you are looking for

  • Sync single song via iTunes with my iPhone 5 & can't sync music with my iPhone

    Hey there, I have two questions about iTunes and my iPhone 5. 1) I have my full music library connected with iTunes and most songs are not bought via iTunes. Now I have alle artists listet up with their albums.      Can I now sync only one single son

  • Mod_security: Access denied with code 400 in R12

    Hi , I'm getting "Page cannot be found" error during my below navigation in R12 -- Steps To Reproduce: The issue can be reproduced at will with the following steps: 1. Responsibility: Oracle Configurator Developer 2. Create Rules, Apply and Save 3. G

  • Table name for Query

    Hi Experts, I want to find out total queries for some data targets for this i am using "RSBCTCB_QUERY" table but i am getting  Query technical name only, i want Description also.. so can you please give me table name for this? Many thanks David

  • Problems downloading DNL_CUST_PROD1

    Hi all, Can anyone please help me with the below. Problem : Start initial download for DNL_CUST_PROD1 , the monitor shows it is successful , but the relevant tables are not populated. Nothing appears in the queues. We are facing this problem for the

  • BPM (beats per minute) song info  where do you get it?

    Where can one get BPM info for songs and is it possible to have the songs in my library updated with that info like I can with the album artwork ? thanks.