Creating a combined chronology based on several chronologies in several tables

Hello
I need to extract a timeline for a customer based on valid_from and valid_to dates in several tables.
For example: I have a table named customers with an id, a valid_from a valid_to date and a table named contracts with contrat_name and customer_id and valid_from valid_to:

CUSTOMERS:
ID | VALID_FROM | VALID_TO
1. 01.03.2010 | 01.01.4000

CONTRACTS:
CONTRACT_NAME | CUSTOMER_ID | VALID_FROM | VALID_TO
Contracted | 1. 01.03.2010 | 01.10.2010
ContractB | 1. 01.10.2010 | 01.01.4000

The following statement would now give me the correct chronology:
Select customer cus.id, con.contract_name, greatest(cus.valid_from,con.valid_from) least(cus.valid_to,con.valid_to) valid_to valid_from
customers cus
stupid contracts on cus.id = con.customer_id inner join;

CUSTOMER | CONTRACT | VALID_FROM | VALID_TO
1. Contracted | 01.03.2010 | 01.10.2010
1. ContractB | 01.10.2010 | 01.01.4000

It works, but I get a problem whenever I have a point from the time there is no contract for a client, but I would always like to have these periods in my calendar:

Suppose the following data and the same select statement:

CUSTOMERS:
ID | VALID_FROM | VALID_TO
1. 01.03.2010 | 01.01.4000

CONTRACTS:
CONTRACT_NAME | CUSTOMER_ID | VALID_FROM | VALID_TO
Contracted | 1. 01.05.2010 | 01.10.2010
ContractB | 1. 01.12.2010 | 01.03.2011

What I would now get would be:
CUSTOMER | CONTRACT | VALID_FROM | VALID_TO
1. Contracted | 01.05.2010 | 01.10.2010
1. ContractB | 01.12.2010 | 01.03.2011

But what I get is the following:
CUSTOMER | CONTRACT | VALID_FROM | VALID_TO
1. null | 01.03.2010 | 01.05.2010
1. Contracted | 01.05.2010 | 01.10.2010
1. null | 01.10.2010 | 01.12.2010
1. ContractB | 01.12.2010 | 01.03.2011
1. null | 01.03.2011 | 01.01.4000

What I won't is generate a result with contract = null any time, there is no contract because I actually want to join the chronology of several different tables into one and it would be very complicated to assume things based on what data can or can not be found in a specific table.

Thanks for any help or ideas,
Kind regards
Thomas

Hi, Thomas,.

Whenever you have a problem, after the sample data in a form that people can use to recreate the problem and test their ideas. CREATE TABLE and INSERT statements are great.
For example:

CREATE TABLE     customers
(     customer_id     NUMBER (6)     PRIMARY KEY
,     valid_from     DATE          NOT NULL
,     valid_to     DATE          NOT NULL
);

INSERT INTO customers (customer_id, valid_from, valid_to) VALUES (1, DATE '2010-03-01', DATE '4000-01-01');
INSERT INTO customers (customer_id, valid_from, valid_to) VALUES (2, DATE '2010-03-01', DATE '4000-01-01');

CREATE TABLE     contracts
(     contract_name     VARCHAR2 (15)     NOT NULL
,     customer_id     NUMBER (6)
,     valid_from     DATE          NOT NULL
,     valid_to     DATE          NOT NULL
);

INSERT INTO contracts (contract_name, customer_id, valid_from,        valid_to)
     VALUES            ('Contract 1a', 1,           DATE '2010-03-01', DATE '2010-10-01');
INSERT INTO contracts (contract_name, customer_id, valid_from,        valid_to)
     VALUES            ('Contract 1b', 1,           DATE '2010-10-01', DATE '4000-01-01');

INSERT INTO contracts (contract_name, customer_id, valid_from,        valid_to)
     VALUES            ('Contract 2a', 2,           DATE '2010-05-01', DATE '2010-10-01');
INSERT INTO contracts (contract_name, customer_id, valid_from,        valid_to)
     VALUES            ('Contract 2b', 2,           DATE '2010-12-01', DATE '2011-03-01');

If a customer contracts of n, then you might need as much as 2n + lines 1 output for this client:
(a) 1 row showing the period, not from the date of customers both valid_from 1st contract begins
(b) n lines indicating the periods under contracts
(c) n lines indicating the period right after each contract, until the following starts (or valid_to of the client, if there is no next contract)
However, you will have lines for periods not contacted ((a) or (c)) if their mandate is 0 days.

This sounds like a job for the UNION. Make a UNION 3 lanes in a subquery to generate (a), (b), and (c), and then put a WHERE clause on the combined, results to filter the lines not length 0.
In the query subsidiary UNION, (a) can be done with a query GROUP BY, and (c) can be done using the analytical function of LEAD.

WITH     union_data     AS
(
     SELECT       ua.customer_id
     ,       NULL               AS contract_name
     ,       MIN (ua.valid_from)     AS valid_from
     ,       MIN (oa.valid_from)     AS valid_to
     FROM       customers     ua
     JOIN       contracts     oa     ON     ua.customer_id     = oa.customer_id
     GROUP BY  ua.customer_id
     --
    UNION ALL
     --
     SELECT       customer_id
     ,       contract_name
     ,       valid_from
     ,       valid_to
     FROM       contracts
     --
    UNION ALL
     --
     SELECT       uc.customer_id
     ,       NULL               AS contract_name
     ,       oc.valid_to          AS valid_from
     ,       LEAD ( oc.valid_from
                 , 1
                 , uc.valid_to
                 ) OVER ( PARTITION BY  uc.customer_id
                    ORDER BY      oc.valid_from
                     )          AS valid_to
     FROM       customers     uc
     JOIN       contracts     oc     ON     uc.customer_id     = oc.customer_id
)
SELECT       *
FROM       union_data
WHERE       contract_name     IS NOT NULL
OR       valid_from     < valid_to
ORDER BY  customer_id
,       valid_from
;

Output:

CUSTOMER_ID CONTRACT_NAME   VALID_FROM VALID_TO
----------- --------------- ---------- ----------
          1 Contract 1a     01.03.2010 01.10.2010
          1 Contract 1b     01.10.2010 01.01.4000

          2                 01.03.2010 01.05.2010
          2 Contract 2a     01.05.2010 01.10.2010
          2                 01.10.2010 01.12.2010
          2 Contract 2b     01.12.2010 01.03.2011
          2                 01.03.2011 01.01.4000

Published by: Frank Kulash, April 20, 2011 06:51
Examples added

Tags: Database

Similar Questions

  • Create a trigger instead of update several tables in a view

    Dear everybody

    I am trying to create a trigger that updates instead of to day joined several tables in a view, but I can't get my trigger to work. The create view command was as follows:
    CREATE OR REPLACE VIEW VIEW_MI_JOIN_GC
    AS
    SELECT MAP_INDEX.mi_prinx,
           index_type_id,
           original_map_publication_id,
           original_map_sheet_number_id,
           name_of_feature,
           geog_coordinates_id,
           GEOG_COORDINATES.mi_prinx AS "mi_prinx_polygon",
           GEOG_COORDINATES.geographical_coordinates,
           GEOG_COORDINATES.mapinfo_style_row
     FROM MAP_INDEX
      JOIN GEOG_COORDINATES
       ON geog_coordinates_id=GEOG_COORDINATES.mi_prinx;
    The view above connects a polygon table to the table of function names which means that a polygon appears several times in a view, even though one version of the polygon exists in the base table. This means the direct update of view cannot take place, since 1 polygon can appear multiple times in a view. The two original base tables and their columns names are:
    MAP_INDEX
    ---------
    MI_PRINX
    INDEX_TYPE_ID
    ORIGINAL_MAP_PUBLICATION_ID
    ORIGINAL_MAP_SHEET_NUMBER_ID
    NAME_OF_FEATURE
    MAPINFO_STYLE_ROW
    GEOGRAPHICAL_COORDINATES
    GEOG_COORDINATES_ID
    
    GEOG_COORDINATES
    ----------------
    MI_PRINX
    GEOGRAPHICAL_COORDINATES
    MAPINFO_STYLE_ROW
    Relax, I created was as follows:
    CREATE OR REPLACE TRIGGER TRIG_VIEW_MI_JOIN_GC
       INSTEAD OF UPDATE ON VIEW_MI_JOIN_GC
          REFERENCING NEW AS NEW
     FOR EACH ROW
    BEGIN
     UPDATE MAP_INDEX
      SET mi_prinx = :NEW.mi_prinx,
          index_type_id = :NEW.index_type_id,
          original_map_publication_id = :NEW.original_map_publication_id,
          original_map_sheet_number_id = :NEW.original_map_sheet_number_id,
          name_of_feature = :NEW.name_of_feature,
          mapinfo_style_row = :NEW.mapinfo_style_row,
          geographical_coordinates = :NEW.geographical_coordinates,
          geog_coordinates_id = :NEW.geog_coordinates_id
       WHERE geog_coordinates_id = :OLD.geog_coordinates_id;
     UPDATE GEOG_COORDINATES
      SET mi_prinx = :NEW.mi_prinx,
          geographical_coordinates = :NEW.geographical_coordinates,
          mapinfo_style_row = :NEW.mapinfo_style_row
       WHERE mi_prinx = :OLD.mi_prinx;
    END;
    /
    The idea is that when I draw a new polygon in MapInfo and assign him a revised number geog_coordinates_id and the number of mi_prinx_polygon, which are the same, once I have save the view as then it updates the underlying tables. Geographical_coordinates and mapinfo_style_row of map_index table columns are columns with ancient polygon data which while not having currently new data inserted into them, are required for the previous data they contain. These data are currently being added to the geog_coordinates table with other scripts. The idea is that all the data is then read using a view and updates made to the view, triggering instead of relaxing, so data are not duplicated but still visible as if it were.

    When I created first the relaxation above in SQLdeveloper it seems to run constantly. Then my computer crashed, not related to this work, and I lost session because I did not commit it. I was not ready to commit it because I believe that something is wrong.

    I am in the trigger syntax correctly and I go about it in the right way? I want to only update the rows that have changed, that's why I was using: NEWS and: OLD.

    Kind regards

    Tim

    Published by: user467357 on November 18, 2008 18:07
    I modified my script a little because there were a few errors. for example. start and old as old and view name typo

    Something like this->

    satyaki>
    satyaki>select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    
    Elapsed: 00:00:01.78
    satyaki>
    satyaki>
    satyaki>create table MAP_INDEX
      2   (
      3        mi_prinx                    NUMBER(10) not null,
      4        index_type_id                NUMBER(6) not null,
      5        original_map_publication_id  NUMBER(6) not null,
      6        original_map_sheet_number_id NUMBER(6) not null,
      7        name_of_feature              VARCHAR2(80) not null,
      8        mapinfo_style_row            VARCHAR2(80),
      9        geographical_coordinates    SDO_GEOMETRY,
     10        geog_coordinates_id          NUMBER(10),
     11        constraints pk_mi_prinx primary key(mi_prinx)
     12   );
    
    Table created.
    
    Elapsed: 00:00:04.39
    satyaki>
    satyaki>create table GEOG_COORINDATES
      2   (
      3     mi_prinx NUMBER(10) not null,
      4     geographical_coordinates SDO_GEOMETRY,
      5     mapinfo_style_row VARCHAR2(80),
      6     constraints pk_mi_prinx_n primary key(mi_prinx)
      7   );
    
    Table created.
    
    Elapsed: 00:00:00.30
    satyaki>
    satyaki>
    satyaki>CREATE OR REPLACE VIEW VIEW_MI_JOIN_GC
      2  AS
      3  SELECT MAP_INDEX.mi_prinx,
      4         MAP_INDEX.index_type_id,
      5         MAP_INDEX.original_map_publication_id,
      6         MAP_INDEX.original_map_sheet_number_id,
      7         MAP_INDEX.name_of_feature,
      8         MAP_INDEX.geog_coordinates_id,
      9         GEOG_COORINDATES.mi_prinx AS "mi_prinx_polygon",
     10         GEOG_COORINDATES.geographical_coordinates,
     11         GEOG_COORINDATES.mapinfo_style_row
     12   FROM MAP_INDEX , GEOG_COORINDATES
     13   WHERE MAP_INDEX.geog_coordinates_id=GEOG_COORINDATES.mi_prinx;
    
    View created.
    
    Elapsed: 00:00:00.32
    satyaki>
    satyaki>
    satyaki>insert into MAP_INDEX values(
      2                                 &mi_prinx,
      3                                 &index_type_id,
      4                                 &original_map_publication_id,
      5                                 &original_map_sheet_number_id,
      6                                 '&name_of_feature',
      7                                 '&mapinfo_style_row',
      8                                 null,
      9                                 &geog_coordinates_id);
    Enter value for mi_prinx: 1
    old   2:                                &mi_prinx,
    new   2:                                1,
    Enter value for index_type_id: 44
    old   3:                                &index_type_id,
    new   3:                                44,
    Enter value for original_map_publication_id: 5678
    old   4:                                &original_map_publication_id,
    new   4:                                5678,
    Enter value for original_map_sheet_number_id: 356
    old   5:                                &original_map_sheet_number_id,
    new   5:                                356,
    Enter value for name_of_feature: AA
    old   6:                                '&name_of_feature',
    new   6:                                'AA',
    Enter value for mapinfo_style_row: GG
    old   7:                                '&mapinfo_style_row',
    new   7:                                'GG',
    Enter value for geog_coordinates_id: 9
    old   9:                                &geog_coordinates_id)
    new   9:                                9)
    
    1 row created.
    
    Elapsed: 00:00:00.16
    satyaki>/
    Enter value for mi_prinx: 2
    old   2:                                &mi_prinx,
    new   2:                                2,
    Enter value for index_type_id: 55
    old   3:                                &index_type_id,
    new   3:                                55,
    Enter value for original_map_publication_id: 6789
    old   4:                                &original_map_publication_id,
    new   4:                                6789,
    Enter value for original_map_sheet_number_id: 357
    old   5:                                &original_map_sheet_number_id,
    new   5:                                357,
    Enter value for name_of_feature: BB
    old   6:                                '&name_of_feature',
    new   6:                                'BB',
    Enter value for mapinfo_style_row: 10
    old   7:                                '&mapinfo_style_row',
    new   7:                                '10',
    Enter value for geog_coordinates_id: 8
    old   9:                                &geog_coordinates_id)
    new   9:                                8)
    
    1 row created.
    
    Elapsed: 00:00:00.04
    satyaki>
    satyaki>commit;
    
    Commit complete.
    
    Elapsed: 00:00:00.03
    satyaki>
    satyaki>
    satyaki>insert into GEOG_COORINDATES values(&mi_prinx,null,'&mapinfo_style_row');
    Enter value for mi_prinx: 9
    Enter value for mapinfo_style_row: FFG
    old   1: insert into GEOG_COORINDATES values(&mi_prinx,null,'&mapinfo_style_row')
    new   1: insert into GEOG_COORINDATES values(9,null,'FFG')
    
    1 row created.
    
    Elapsed: 00:00:00.07
    satyaki>/
    Enter value for mi_prinx: 8
    Enter value for mapinfo_style_row: GGT
    old   1: insert into GEOG_COORINDATES values(&mi_prinx,null,'&mapinfo_style_row')
    new   1: insert into GEOG_COORINDATES values(8,null,'GGT')
    
    1 row created.
    
    Elapsed: 00:00:00.05
    satyaki>
    satyaki>commit;
    
    Commit complete.
    
    Elapsed: 00:00:00.02
    satyaki>
    satyaki>select * from VIEW_MI_JOIN_GC;
    
      MI_PRINX INDEX_TYPE_ID ORIGINAL_MAP_PUBLICATION_ID ORIGINAL_MAP_SHEET_NUMBER_ID NAME_OF_FEATURE                                                                  GEOG_COORDINATES_ID mi_prinx_polygon GEOGRAPHICAL_COORDINATES(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
    ---------- ------------- --------------------------- ---------------------------- -------------------------------------------------------------------------------- ------------------- ---------------- ---------------------------------------------------------------------------------------------------------------
             1            44                        5678                          356 AA                                                                                                 9                9
             2            55                        6789                          357 BB                                                                                                 8                8                                                                                                                 
    
    Elapsed: 00:00:00.09
    satyaki>
    satyaki>
    satyaki>CREATE OR REPLACE TRIGGER TRIG_VIEW_MI_JOIN_GC
      2  INSTEAD OF UPDATE ON VIEW_MI_JOIN_GC
      3  FOR EACH ROW
      4  DECLARE
      5   m_info_svw  varchar2(80);
      6  BEGIN
      7   m_info_svw :=  :NEW.mapinfo_style_row;
      8
      9   UPDATE MAP_INDEX
     10    SET mi_prinx = :NEW.mi_prinx,
     11        index_type_id = :NEW.index_type_id,
     12        original_map_publication_id = :NEW.original_map_publication_id,
     13        original_map_sheet_number_id = :NEW.original_map_sheet_number_id,
     14        name_of_feature = :NEW.name_of_feature,
     15        mapinfo_style_row = m_info_svw,
     16        geographical_coordinates = :NEW.geographical_coordinates,
     17        geog_coordinates_id = :NEW.geog_coordinates_id
     18     WHERE geog_coordinates_id = :OLD.geog_coordinates_id;
     19   UPDATE GEOG_COORINDATES
     20    SET mi_prinx = :NEW.geog_coordinates_id,
     21        geographical_coordinates = :NEW.geographical_coordinates,
     22        mapinfo_style_row = m_info_svw
     23     WHERE mi_prinx = :OLD.geog_coordinates_id;
     24  END;
     25  /
    
    Trigger created.
    
    Elapsed: 00:00:00.20
    satyaki>
    satyaki>select * from VIEW_MI_JOIN_GC;
    
      MI_PRINX INDEX_TYPE_ID ORIGINAL_MAP_PUBLICATION_ID ORIGINAL_MAP_SHEET_NUMBER_ID NAME_OF_FEATURE                                                                  GEOG_COORDINATES_ID mi_prinx_polygon GEOGRAPHICAL_COORDINATES(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
    ---------- ------------- --------------------------- ---------------------------- -------------------------------------------------------------------------------- ------------------- ---------------- ---------------------------------------------------------------------------------------------------------------
             1            44                        5678                          356 CC                                                                                                 9                9
             2            55                        6789                          357 BB                                                                                                 8                8                                                                                                                 
    
    Elapsed: 00:00:00.09
    satyaki>
    satyaki>select mi_prinx,mapinfo_style_row from GEOG_COORINDATES;
    
      MI_PRINX MAPINFO_STYLE_ROW
    ---------- --------------------------------------------------------------------------------
             9 FFG
             8 GGT
    
    Elapsed: 00:00:00.07
    satyaki>select * from MAP_INDEX;
    
      MI_PRINX INDEX_TYPE_ID ORIGINAL_MAP_PUBLICATION_ID ORIGINAL_MAP_SHEET_NUMBER_ID NAME_OF_FEATURE                                                                  MAPINFO_STYLE_ROW                                                                GEOGRAPHICAL_COORDINATES(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), S
    ---------- ------------- --------------------------- ---------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------
             1            44                        5678                          356 CC                                                                               HHH
             2            55                        6789                          357 BB                                                                               HHH                                                                                                                                                  
    
    Elapsed: 00:00:00.12
    satyaki>
    satyaki>update VIEW_MI_JOIN_GC
      2    set name_of_feature = 'DD'
      3  where mi_prinx = 1;
    
    1 row updated.
    
    Elapsed: 00:00:00.05
    satyaki>
    satyaki>select * from VIEW_MI_JOIN_GC;
    
      MI_PRINX INDEX_TYPE_ID ORIGINAL_MAP_PUBLICATION_ID ORIGINAL_MAP_SHEET_NUMBER_ID NAME_OF_FEATURE                                                                  GEOG_COORDINATES_ID mi_prinx_polygon GEOGRAPHICAL_COORDINATES(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
    ---------- ------------- --------------------------- ---------------------------- -------------------------------------------------------------------------------- ------------------- ---------------- ---------------------------------------------------------------------------------------------------------------
             1            44                        5678                          356 DD                                                                                                 9                9
             2            55                        6789                          357 BB                                                                                                 8                8                                                                                                                 
    
    Elapsed: 00:00:00.08
    satyaki>
    satyaki>select mi_prinx,mapinfo_style_row from GEOG_COORINDATES;
    
      MI_PRINX MAPINFO_STYLE_ROW
    ---------- --------------------------------------------------------------------------------
             9 FFG
             8 GGT
    
    Elapsed: 00:00:00.06
    satyaki>
    satyaki>update VIEW_MI_JOIN_GC
      2     set mapinfo_style_row = 'OOOO'
      3     where mi_prinx = 1;
    
    1 row updated.
    
    Elapsed: 00:00:00.05
    satyaki>
    satyaki>select mi_prinx,mapinfo_style_row from GEOG_COORINDATES;
    
      MI_PRINX MAPINFO_STYLE_ROW
    ---------- --------------------------------------------------------------------------------
             9 OOOO
             8 GGT
    
    Elapsed: 00:00:00.06
    satyaki>
    satyaki>select mapinfo_style_row from MAP_INDEX;
    
    MAPINFO_STYLE_ROW
    --------------------------------------------------------------------------------
    OOOO
    HHH
    
    Elapsed: 00:00:00.06
    satyaki>
    

    Hope this will help you.

    Kind regards.

    LOULOU.

  • Unable to create cache with several tables group

    Hello

    I need to create a group of cache with several tables, which are referential to the other.

    There are 2 related tables and table 1 child...
    While trying this thing, it gives me an error:

    8222: multiple parent tables found

    It is not possible to use several tables of root in a single cache group? Is there another way to use it?

    Script, I used is:

    create a cache group asynchronous writethrough TEST. CG1
    of the TEST. ROOT1)
    KEY PRIMARY ID VARCHAR2 (8 BYTES),
    NAME VARCHAR2 (50 BYTE),
    DESCRIPTION VARCHAR2 (255 BYTE),
    POLICYTYPEID VARCHAR2 (7-BYTE)),

    TEST. ROOT2)
    PARAMTYPEID VARCHAR2 (5 BYTES) PRIMARY KEY,
    PARAMETERUSAGE VARCHAR2 (1 BYTE),
    NAME VARCHAR2 (25 BYTE),
    DESCRIPTION VARCHAR2 (255 BYTE)),

    TEST. CHILD1)
    PARAMDETAILID NUMBER (20) PRIMARY KEY,.
    ID VARCHAR2 (8 BYTE),
    PARAMETERUSAGE VARCHAR2 (1 BYTE),
    DISPLAYVALUE VARCHAR2 (255 BYTE),
    OPERATORID VARCHAR2 (5 BYTE),
    VENDORID NUMBER (20).
    FOREIGN KEY REFERENCES TEST. ROOT1 (ID),
    TEST KEY (PARAMETERUSAGE) REFERENCES STRANGERS. ROOT2 (PARAMETERUSAGE));

    You can't have multiple root within a group of cache tables. The requirements for tables in the group a cache are very strict; There must be only one top-level (root table) table and there may possibly be several children tables. Tables of the child should be linked through foreign keys to the root table or a child table above in the hierarchy.

    The solution for your case is among the tables of root and the other root table in a separate cache group and the child table in a cache group. If you do this, you must take care of a few things:

    1. you cannot define foreign keys between the tables of groups of different cache in TimesTen (keys may exist in Oracle) so the application must enforce referential integrity itself for these cases.

    2. If you load data in a cache group (using LOAD the GROUP CACHE or "load we demand") and Timesten will not automatically load the corresponding data in the other group of cache (since he doesn't know the relationship). The application must load the data into the other group of cache explicitly.

    There is no problem with transactional consistency when changes are pushed to Oracle. TimesTen maintains and reinforces the coherence transactional regardless of how the tables are arranged in groups cache correctly.

    Chris

  • Implementation of dumps for several table

    Hello
    Is it possible to configure the < dumps-plan > element or implement dumps to get data from multiple
    table. Currently the sample xml and dumps in the tutorial is configured to a single table.

    Thank you
    -Trapani

    Hi Thiru,

    As Rob mentioned, you can implement dumps to do just about anything you want: do a join between tables, run several queries for data from multiple tables or even access non-base data system, such as an existing system or a web service to retrieve the data. Consistency really cares how you implement your cache store and where you get the data, as long as you return a single object to the load method, which must be inserted in the cache the cache store is set up for (or in the case of loadAll, many objects in a map).

    However, what I didn't understand not your question is if you want to load the data of several related tables to create a single object (an aggregate in DDD terminology), or if you want to create different entity objects based on the data in each table and put them all in the cache. Normally, you should have a cache by entity type, while the latter is discouraged until you know exactly why you do and are recommended to create a separate for each entity type cache and use different cache stores for them. Otherwise, you will encounter issues if you try to index your cache or run queries on it, because these characteristics depend on the schema of compatible entry.

    However, if you load an aggregate, you can decide to store the entire aggregate object in a single cache, in which case you will probably eventually query several tables related to construct an instance of an aggregate, or you may decide to store root cluster in its own cache, and separate the low related entities in caches, once again a cache by entity type. The choice should really depend on the size of small entities within an aggregate and access model data, so it is difficult to provide general guidance. However, if you do not end up storing weak entities in separate caches, it is usually advantageous to use the key association to ensure that they are located in the same partition as their aggregate root.

    Kind regards
    ALEKS

  • My only intention is to create a model/site based URM where we can provide functionality to scan for users. We want a distributed feature where users can scan the images remotely and commit to the WCC:Records / URM. Is it possible to be thr

    My only intention is to create a model/site based URM where we can provide functionality to scan for users. We want a distributed feature where users can scan the images remotely and commit to the WCC:Records / URM.

    Is it possible to be done through Oracle distributed Document capture (ODDC) and if it is possible how to connect ODDC with the client browser. Please suggest

    Ok. So, the answer is certainly: Yes, it is possible.

    The part of analysis, this is exactly what ODDC is good for. Unless you have the license already, however, you may have to go with the product to Capture Oracle WebCenter (large companies), which provides the necessary also.

    Regarding the validation and storage, ODDC/ODC/WebCenter Capture can commit images scanned at several depots, including University Complutense of MADRID (URM can be considered a Complutense University of MADRID with a specific purpose / several modules or components under voltage and configured). So, technically, he has no problem.

    When I have little doubt, however, is the meaning of the scenario - declaring an item as a record is an important event in the life cycle of the document - a record is often (or always) cannot be changed to ensure the integrity and non-repudiation of information. In this perspective, a direct validation of a recording of a scanning system (where errors such as bad scans, lack of pages, etc can be expected, particularly if the scanning is performed by the end user in a distributed fashion - so, not very experienced) seems a little dangerous.

  • I want to create a combined pdf file so I can print 4 items per page to save on printing. Do I need a plugin for that?

    I want to create a combined pdf file so I can print 4 items per page to save on printing. It's something my printer guy did to save me from printing. However, I just bought a printer xp Epsom 200 advertised on the box that it was a feature. It turns out that it is a feature of adobe. I'm confused, why he has been announced. In any case, I have Adobe suite with PSCS5 hace. How can I do this?

    In the dialog box print of Acrobat and the free reader, you can select Multiple option to print multiple pages on a single physical page.

    If you have a file with these pages you will need to use Acrobat for that. You can use the Adobe PDF printer (on a Windows machine, at least) to generate a new PDF with several pages of the former on each page.

  • I create a form based on two tables that have sequences also. When I create insert only row is inserted in the fields in table first and second fields of the table are empty. Why?

    Mr President.

    I create a form based on two tables that have sequences also. When I create insert only row is inserted in the fields in table first and second fields of the table are empty. Why?

    formdoubletables.png

    the page source is

    <?xml version='1.0' encoding='UTF-8'?>
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                    xmlns:f="http://java.sun.com/jsf/core">
      <af:panelFormLayout id="pfl1">
        <af:group id="Group">
          <af:inputText value="#{bindings.VoucherId.inputValue}" label="#{bindings.VoucherId.hints.label}"
                        required="#{bindings.VoucherId.hints.mandatory}" columns="#{bindings.VoucherId.hints.displayWidth}"
                        maximumLength="#{bindings.VoucherId.hints.precision}"
                        shortDesc="#{bindings.VoucherId.hints.tooltip}" id="it1">
            <f:validator binding="#{bindings.VoucherId.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.VoucherId.format}"/>
          </af:inputText>
          <af:inputDate value="#{bindings.VoucherDate.inputValue}" label="#{bindings.VoucherDate.hints.label}"
                        required="#{bindings.VoucherDate.hints.mandatory}"
                        columns="#{bindings.VoucherDate.hints.displayWidth}"
                        shortDesc="#{bindings.VoucherDate.hints.tooltip}" id="id1">
            <f:validator binding="#{bindings.VoucherDate.validator}"/>
            <af:convertDateTime pattern="#{bindings.VoucherDate.format}"/>
          </af:inputDate>
          <af:inputText value="#{bindings.Credit.inputValue}" label="#{bindings.Credit.hints.label}"
                        required="#{bindings.Credit.hints.mandatory}" columns="#{bindings.Credit.hints.displayWidth}"
                        maximumLength="#{bindings.Credit.hints.precision}" shortDesc="#{bindings.Credit.hints.tooltip}"
                        id="it2">
            <f:validator binding="#{bindings.Credit.validator}"/>
          </af:inputText>
        </af:group>
        <af:group id="g1">
          <af:inputText value="#{bindings.Lineitem.inputValue}" label="#{bindings.Lineitem.hints.label}"
                        required="#{bindings.Lineitem.hints.mandatory}" columns="#{bindings.Lineitem.hints.displayWidth}"
                        maximumLength="#{bindings.Lineitem.hints.precision}" shortDesc="#{bindings.Lineitem.hints.tooltip}"
                        id="it3">
            <f:validator binding="#{bindings.Lineitem.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.Lineitem.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.VoucherId1.inputValue}" label="#{bindings.VoucherId1.hints.label}"
                        required="#{bindings.VoucherId1.hints.mandatory}"
                        columns="#{bindings.VoucherId1.hints.displayWidth}"
                        maximumLength="#{bindings.VoucherId1.hints.precision}"
                        shortDesc="#{bindings.VoucherId1.hints.tooltip}" id="it4">
            <f:validator binding="#{bindings.VoucherId1.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.VoucherId1.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Debit.inputValue}" label="#{bindings.Debit.hints.label}"
                        required="#{bindings.Debit.hints.mandatory}" columns="#{bindings.Debit.hints.displayWidth}"
                        maximumLength="#{bindings.Debit.hints.precision}" shortDesc="#{bindings.Debit.hints.tooltip}"
                        id="it5">
            <f:validator binding="#{bindings.Debit.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Credit1.inputValue}" label="#{bindings.Credit1.hints.label}"
                        required="#{bindings.Credit1.hints.mandatory}" columns="#{bindings.Credit1.hints.displayWidth}"
                        maximumLength="#{bindings.Credit1.hints.precision}" shortDesc="#{bindings.Credit1.hints.tooltip}"
                        id="it6">
            <f:validator binding="#{bindings.Credit1.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Particulars.inputValue}" label="#{bindings.Particulars.hints.label}"
                        required="#{bindings.Particulars.hints.mandatory}"
                        columns="#{bindings.Particulars.hints.displayWidth}"
                        maximumLength="#{bindings.Particulars.hints.precision}"
                        shortDesc="#{bindings.Particulars.hints.tooltip}" id="it7">
            <f:validator binding="#{bindings.Particulars.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Amount.inputValue}" label="#{bindings.Amount.hints.label}"
                        required="#{bindings.Amount.hints.mandatory}" columns="#{bindings.Amount.hints.displayWidth}"
                        maximumLength="#{bindings.Amount.hints.precision}" shortDesc="#{bindings.Amount.hints.tooltip}"
                        id="it8">
            <f:validator binding="#{bindings.Amount.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.Amount.format}"/>
          </af:inputText>
        </af:group>
        <f:facet name="footer">
          <af:button text="Submit" id="b1"/>
          <af:button actionListener="#{bindings.CreateInsert.execute}" text="CreateInsert"
                     disabled="#{!bindings.CreateInsert.enabled}" id="b2"/>     
          <af:button actionListener="#{bindings.Commit.execute}" text="Commit" disabled="#{!bindings.Commit.enabled}"
                     id="b3"/>
          <af:button actionListener="#{bindings.Rollback.execute}" text="Rollback" disabled="#{!bindings.Rollback.enabled}"
                     immediate="true" id="b4">
            <af:resetActionListener/>
          </af:button>
        </f:facet>
      </af:panelFormLayout>
    </ui:composition>
    
    
    
    

    Concerning

    Go to your VO Wizard, select the tab of the entity and to check if both the EO is editable or not.

    See you soon

    AJ

  • In Acrobat Pro XI, how can we create a combined document that is NOT a portfolio but just a regular multi-page PDF file?

    I need help someone to create a combined PDF of 'regular', not a wallet... which seems to have changed in the XI version, please help.

    No, it's the same thing. In the dialog box files to combine press Options and select 'Single PDF' as file Type.

  • What services do I need create and combine PDF files?

    Hola, tengo el adobe export in PDF, por one ano. y sin embargo if quiero unite archivos en UN solo Pdf me as soon as I have that registrarme there pay.

    ASI casi todas options than quiero emplear con...

    me gustaria that alguien me explicara than opcines... tengo con el Adobe export. Yo utilizo el exportar archivos nor convertirlos only.

    a saludo thanks

    Hi alfonsoa30012808,

    ExportPDF online service allows you to convert PDF files to Word or Excel format. If you want to create or combine PDFs, you want to consider Adobe Acrobator Adobe PDF Pack .

    Best,

    Sara

  • ¿Dear sirs, I can create with 'Photoshop Elements 12', a multi-page PDF file? I can create a file 'pdf', but not several pages. Thank you

    Gentlemen of ¿Dear,

    I can create a multi-page PDF file with 'Photoshop Elements 12'?

    I can create a file 'pdf', but not several pages.

    Thank you

    Valentin Uriarte

    Unfortunately, the last few versions of PES are much less talented to work with multi-page files, and you can do this in PSE 12.

  • effect based on several keys at once

    effect based on several keys at once

    Hello everyone, I develop an interface and I need several buttons have to be pressed at the same time

    The buttons are divided into sections, each section is in a HBox.

    I need a button for each section with effect remains to be pressed... I don't know how.

    I tried to put them door effect but obviously losing the effect when I press another button.

    I have five sections: section mapping, lighting section, motion of the section, section grids and symbology section. In each of them, you have to press a button

    Joint is a photo so they can get a better idea of what I need

    In advance thank you very much.

    Sorry for the bad English


    http://img119.imagenar.com/119/411d7e59/616c3fbc/GUI-GIS.PNG

    biochemistry43 wrote:
    And I can handle these tooglegroups with css. The interface I'm FXML

    The ToggleGroup defines the sets of buttons are mutually exclusive: one button within a group can be selected.

    You can set the FXML ToggleGroups (see http://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/introduction_to_fxml.html#define_elements). They are not visual components, just logical groupings toggle or radio buttons, sort of css does not really apply.

    Not sure, but I think you have to toggle-buttons press them again to turn them off or not?

    Yes, turn the buttons turns on with a single click and then on the road again with another click. (The selected state is "activated" by clicking.) If the button toggle is part of a group of rocker, when you select all the other boxes of the rocking group be deselected.

    But I may have misunderstood what you are trying to do...? I'm not sure.

  • can I create a saturation mask based on a gradient map?

    Hello

    can I create a saturation mask based on a gradient map?

    for example a gradient from blue to 2441f6 to 6075f6

    and have a mask of luminocity base this gradient

    can I do it?

    How can I do?

    Thank you

    see you soon

    Gradient cards are not used to the color of the sample, but for her recolor, so that you cannot use to create the selection, use the selection to limit the gradient map for the blue areas of the sky.

    You can HIDE a gradient map using the saturation of the sky for her recolor, based on current saturation of the sky.

    Select the sky with your preferred method, he jumps into a new layer (CTRL + J)

    Use the technique in the tutorial linked to extract the brightness, it should land on its own layer.

    This layer and remove the selective color.

    Now add your Wo gradient map layer, enter the two colors you like.

    Display the layer with the saturation converted into a layer. Select all, copy.

    ALT-click the layer mask to your gradient map adj layer and the dough. You will need to paint black areas that you don't want affected.

    I tried here, and had yielded results satisfactory semi in view of the very high compression of your file and also because the colors are quite unrealistic.

    Here is a picture showing the mask of saturation and results on the side:

  • Performance in the treatment of the based on a game, several tables from target

    Welcome.

    I have question about a treatment based on a game, when mapping have several tables in the target. I noticed that OWB generate SQL code that usually build a query for each table in the target insertion. Suggest that each table has results from different stages of the treatment, so multi table insert cannot be used. Looking for generated code PL/SQL, I feel that each insert query managed independently and so each make analyses of source table and joins on its own.
    To make my question more concrete, I will introduce two simple examples of stream ETL:
    1) start-> (table scan)--> (joins)--> (inserting into the table t1)
    2) start-> (table scan)--> (joins)-> two targets: (insert into table t1)
    -> two targets: (deduplicator)--> (insertion in table t2)
    Admit, that scans and joins are very expensive comparing to insert rows. Thus, it is usually, if oracle performs scans of tables 2 and joined in example 2) and example 2) take twice longer than example 1)?
    Or fact Oracle is so smart that it can cache the result of entering the first query and use it again in the second query?

    Best regards
    Pawel

    Hi Pawel,

    Thus, it is usually, if oracle performs scans of tables 2 and joined in example 2) and example 2) take twice longer than example 1)?

    Yes, you are right

    Or fact Oracle is so smart that it can cache the result of entering the first query and use it again in the second query?

    Nor the database Oracle or OWB don't is not to intermediate capabilities query result caching.
    While the Oracle database feature "result cache queries", but it must match exactly to SQL source and it store only the final query result...

    Kind regards
    Oleg

  • Capture the content of the pdf presentation and create a new document based on the data?

    Are there programs that can capture the content of the pdf presentation and create a new document based on that? I want to convert the data from a pdf form to fill in an auto-generated shipping label. Thank you!

    Only field names that match exactly. You can use JavaScript and hidden fields to match the names of domain if necessary.

  • How to create a new sequence based on the properties of the images?

    I thought there was a way to have the first automatically creates a new sequence based on the properties of the images rather than having to manually choose the predefined sequence.

    For example, I cancelled out of dialog sequence preset and imported a video I want to change. Rather than manually choose a predefined sequence, I would like to say first to create the sequence for me by looking at metadata (resolution, fps, etc) and creating the correct order for that specific item.
    I have CS4; Was it a new feature introduced in CS5?
    Thank you!

    Yes.  It's new for CS5.

    -Jeff

Maybe you are looking for