Associative array and Garbage Collection

Hi all
is there any concept of garbage collection in the use of an associative array?

When I create an associative object instance is there any provision in oracle to release and drop this object
in memory after use?

Thank you
Charles

Not sure; Why would you want to?

Oracle manages this kind of thing very well; It is not something I've ever had to consider, really. Even if Oracle does not clear the memory allocated immediately, I am sure that it is marked as available for reuse.

Tags: Database

Similar Questions

  • Difference between an associative array and Nested table

    Hello

    Can you please tell me, what is the main differences between associative array and Nested table. I'm not sure, in this case we are to use.

    Thank you and best regards,
    Sanjeev.

    user13483989 wrote:
    Hello

    Can you please tell me, what is the main differences between associative array and Nested table. I'm not sure, in this case we are to use.

    Did you happen to read the documentation, explain its good enough!
    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e25519/composites.htm#LNPLS005

    Aman...

  • What is the difference between associative arrays and nested tables?

    Hello
    What is the difference between associative arrays and nested tables?

    nested tables cannot be indexed by other than pls_integer and unlike nested tables table associative cananot be declared at the schema level.

    is there any other difference set apart from the diff above 2?

    user13710379 wrote:
    What is the difference between associative arrays and nested tables?

    Name-value pairs (associative) against a list of values (table standard/nested table).

    nested tables cannot be indexed by other than pls_integer

    They are not "indexed" the way in which an associative array is indexed. A standard table is referenced by the position of the cell in the table. This position is essentially the offset of the memory of the cell from the start address of the table.

    Can not solve a cell in an associative array directly via a memory offset index. You place a cell reference value it by his 'name' (a search in the linked list/hash table).

    The following example shows the difference between the pairs of name / value and a list of core values.

    SQL> declare
      2          --// associative arrays are NAME-VALUE pairs
      3          type TArr1 is table of varchar2(10) index by pls_integer;
      4          type TArr2 is table of varchar2(10) index by varchar2(10);
      5
      6          arr1    TArr1;
      7          arr2    TArr2;
      8  begin
      9          arr1(100) := '1st entry';
     10          arr1(1) := '2nd entry';
     11          arr1(5) := '3rd entry';
     12
     13          arr2('john') := 'New York';
     14          arr2('jane') := 'Paris';
     15          arr2('jack') := 'London';
     16
     17  end;
     18  /
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL>
    SQL> declare
      2          --// standard arrays are lists
      3          type TArr3 is table of varchar2(10);
      4          type TArr4 is table of number;
      5
      6          arr3    TArr3;
      7          arr4    TArr4;
      8  begin
      9          arr3 := new TArr3( '1st entry', '2nd entry', '3rd entry' );
     10
     11          arr4 := new TArr4( 100, 1, 5 );
     12  end;
     13  /
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    
  • Interpolation and Garbage Collection problem

    No matter what I I can not solve a problem with AS3 Garbage Collection of tween I'll have it is havoc on my tween instances works correctly/consistently. Some Sprites never tween at all, some do it but only part way. And it different effects almost every time.

    I recently read about AS3 Garbage Collection and badly referenced interpolations and other asynchronous forums is picked up in the Middle process fairly. I feel the inconsistent behavior of signature that the I have read.

    I tried to use the static properties level and not static class to store the references to my Tween instances so that they will not be shown for the GC. No luck. I placed references to these in the class-level tables, I also used static to() TweenMax method, which ensures that there will be the shield of GC and its static constructor instantiation not alt., with persistence: true. I have also set up another package custom; GCSafeTween(), others says it's as it should be, but it does not work in my case.

    To test the GC problem, I edited the two eventListerners() in the Adobes fl.transitions.Tween so that their default weakReference property was false. This is properly the work of Tween. But this is a terrible solution.

    Here is my code. Its a bit stripped down just to show the configuration.
    Thank you for helping me solve this one!


    The problem is finally solved.
    I had another Alpha tween StackDisplay targeting a Sprite that is nested inside the main Sprites that I tried to tween Alpha. I noticed that if I planned other properties of the target Sprites they work always as interpolated. It was only the Alpha which would get stuck from time to time.

    JPSoul thanks for helping me to tackle the problem in a different way and get finally resolved.

    FYI here is the line that caused the issue:

  • What is the preferred means of data transmission as a type of record between the nested table of pl/sql program or an associative array

    What is the preferred means of data transmission in the associative array of the nested table record vs

    Choose between Nested Tables and associative arrays

    The two nested tables and associative arrays (formerly index - by tables) use similar index notation, but they have different characteristics when it comes to persistence and ease of passing parameters.

    Nested tables can be stored in a column of data, but can of associative arrays. Nested tables can simplify the SQL operations where you would normally join a single-column table with a larger table.

    Associative arrays are appropriate for relatively small lookup tables where the collection can be constructed in memory whenever a procedure is called or a package is initialized. They are good for the collection of the information volume is unknown beforehand, because there is no fixed limit on their size. Their index values are more flexible, as associative array indices can be negative, can be no sequential and can use values of string instead of numbers.

    PL/SQL automatically converts between the bays of the host and the associative arrays that use values of digital keys. The most effective way to move the collections to and from the database server is to implement data values in associative arrays, and then use these associative arrays with erections in bulk (the FORALL statement or BULK COLLECT clause).

    With the help of documents and Collections of PL/SQL

    Read this:

    How to pass the record set as a parameter of the procedure.

    https://community.Oracle.com/thread/2375173?TSTART=0

  • Associative arrays

    Quoting docs.oracle.com lines


    Associative arrays are used to represent sets of data of arbitrary size, with quick search of an individual element without its position in the table and without
    having to loop through all the elements in the array. Here is a small example

    DECLARE
    TYPE population_type IS TABLE OF NUMBER INDEX OF VARCHAR2 (64);
    country_population population_type;
    continent_population population_type;
    howmany NUMBER;
    that VARCHAR2 (64);
    BEGIN
    country_population ('Greenland'): = 100000; -Creates the entry
    country_population ('Iceland'): = 750000; -Creates the entry
    -Research associated with a value chain
    howmany: = country_population ('Greenland');
    continent_population ('Australia'): = 30000000;
    continent_population ('Antarctica'): = 1000; -Creates the entry
    continent_population ('Antarctica'): = 1001; -Replaces the previous value
    -Returns "Antarctic" which comes first in alphabetical order.
    who: = continent_population. FIRST;
    -Returns "Australia", which comes last in the alphabetical order.
    who: = continent_population. LAST;
    -Returns the value corresponding to the last key, in this
    -case of the Australia population.
    howmany: = continent_population (continent_population. LAST);
    END;
    /



    my doubt is in what regards the statement "with a quick search of an individual element without its position in the table".can someone give a small relevant example. Therefore the associative arrays is also appropriate for relatively small lookup tables where the collection can be constructed in memory eachtime, a procedure is called? Thanks in advance...

    >
    my doubt is in what regards the statement "with a quick search of an individual element without its position in the table".can someone give a small relevant example.
    >
    Think of it as gradually close equivalent to a hash of key/value pairs. When you want to insert an item provide you the key, Oracle axe key to find the entry in the hash table. It doesn't matter if the entry is the first, last, or any other arbitrary position in the table.
    >
    Therefore the associative arrays is also appropriate for relatively small lookup tables where the collection can be constructed in memory eachtime, a procedure is called?
    >
    The scope of the variables of the procedure is only the duration of the procedure. They are built when the procedure is called and destroyed when the procedure ends.

    If any associative array created in the procedure must be small to minimize the impact on the performance of the table fill. If the procedure performs complex calculations or ETL one record at a time, it is more efficient to get a value from the array instead of having to re - query a database table for him.

    For example, for the United States, a list of 50 State and their full name abbreviations that can be stored in an associative array and procedure could extract the code of the State of a data element, and quickly find the name of the State of the table. It would be faster than executing a query on the database on a lookup table.

  • Table of multiplication using associative arrays

    DB version: 10.2.0.1.0

    Here is a code for the multiplication of 14 up to 100 table. How can I store these values in an associative array and each element of the Bulletin Board so that it produces the same output as the code below.
    Declare
    --TYPE v_number_type IS TABLE OF number INDEX BY PLS_INTEGER;
    
    v_number     number:= 14;
    v_multiplied_by     number:= 1;
    v_result     number;
    begin
    
         for i in 1..100
         loop
              v_result:=     v_number * v_multiplied_by;
              dbms_output.put_line(v_number||' multiplied by '||v_multiplied_by||' = '||v_result);
              v_multiplied_by:=v_multiplied_by + 1;
         end loop;
     
     end;
     /
    Result would be
     14 multiplied by 1 = 14
     14 multiplied by 2 = 28
     14 multiplied by 3 = 42
     14 multiplied by 4 = 56
     14 multiplied by 5 = 70
     .
     .
     .
     
    Published by: user609308 on March 12, 2009 03:09
    Including the
     tags                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    It's a bad habit to "select into... of double" where you could just assign a value.
    It's your code, that boiled down to this:

    DECLARE
       TYPE v_number_type IS TABLE OF VARCHAR2(40)
          INDEX BY PLS_INTEGER;
    
       v_number     PLS_INTEGER   := 14;
       v_res_type   v_number_type;
    BEGIN
       FOR i IN 1 .. 100 LOOP
          v_res_type(i) := TO_CHAR(v_number) || ' multiplied by ' || TO_CHAR(i) || ' = ' || TO_CHAR(v_number * i);
       END LOOP;
    
       FOR j IN v_res_type.FIRST .. v_res_type.LAST LOOP
          DBMS_OUTPUT.put_line(v_res_type(j));
       END LOOP;
    END;
    /
    
  • How to prepare list for garbage collection after drag and drop operation

    Hi all

    I have a view in a mobile application that contains a list with the help of drag / move. The problem I encounter is that the NativeDragManagerImpl maintains a reference to this list in its _dragInitiator and _relatedObject properties. It is not a memory leak by - say, because the reference will be replaced the next time make drag and drop is used, however, my view that preclude any garbage collection, causing an unacceptable peak memory.

    Here is an example which illustrates the problem (app default AIR using Flex 4.5.1):

    Main.MXML

    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:local="*"
                                                         xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark" width="800"
                                                         height="600">
    
    
              <fx:Script>
                        <![CDATA[
                                  protected function start_clickHandler(event:MouseEvent):void
                                  {
                                            var element:ListGroup = new ListGroup();
                                            this.panel.addElement(element);
                                  }
    
                                  protected function stop_clickHandler(event:MouseEvent):void
                                  {
                                            this.panel.removeAllElements();
                                  }
                        ]]>
              </fx:Script>
    
    
              <s:Panel id="panel" top="100" left="100" bottom="100" right="100" title="Drag Drop Test">
                        <s:controlBarContent>
                                  <s:Button label="Start" click="start_clickHandler(event)" />
                                  <s:Button label="Clear" click="stop_clickHandler(event)" />
                        </s:controlBarContent>
              </s:Panel>
    
    
    </s:WindowedApplication>
    
    

    ListGroup.mxml

    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
                         xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%">
              <s:layout>
                        <s:HorizontalLayout />
              </s:layout>
              <s:List id="sourceList" width="100%" height="100%" dragEnabled="true" dragMoveEnabled="true" dropEnabled="true">
                        <s:dataProvider>
                                  <s:ArrayCollection>
                                            <fx:String>Item 1</fx:String>
                                            <fx:String>Item 2</fx:String>
                                            <fx:String>Item 3</fx:String>
                                            <fx:String>Item 4</fx:String>
                                  </s:ArrayCollection>
                        </s:dataProvider>
              </s:List>
              <s:List id="targetList" width="100%" height="100%" dragEnabled="true" dragMoveEnabled="true" dropEnabled="true">
              </s:List>
    </s:Group>
    
    

    If you drag items to the list on the right, there is always at least one instance of ListGroup stuck in memory for the duration of execution (as seen in the profiler).

    Is there a way to perform cleanup on the DragManager (or in fact the underlying DragManagerImpl) upward to a time of my choosing? Thoughts or ideas will be greatly appreciated!

    Thanks a lot for your time!

    I think I'd be monkey-patch NativeDragManagerImpl.  And create a bug report.

  • Delete / external swf or the files in the flash file main to unload and load a new swf file and memory garbage collection.

    I can't delete / unload the example swf files external when the carousel.swf (portfolio) appears and press the button about the content overlaps the carousel (portfolio). How can I delete / unload an external swf file in the main flash file and load a SWF, so that at the same time remove garbage collection memory operation?

    This is the error messages I receive: "TypeError: Error #2007: child parameter must be non null.»

    at flash.display::DisplayObjectContainer/removeChild()

    " to index_fla::MainTimeline/Down3().

    Import nl.demonsters.debugger.MonsterDebugger;

    var d: MonsterDebugger = new MonsterDebugger (this);

    stage.scaleMode = StageScaleMode.NO_SCALE;

    internship. Align = StageAlign.TOP_LEFT;

    stage.addEventListener (Event.RESIZE, resizeHandler);

    is the charger for the portfolio page swf

    var loader: Loader;

    var loader2:Loader;

    var loader3:Loader;

    var loader1:Loader;

    resize the content

    function resizeHandler(event:Event):void {}

    resizes the portfolio page to Center

    Loader.x = (stage.stageWidth - loader.width) *. 5;

    Loader.y = (stage.stageHeight - loader.height) *. 5;

    resizes on page to Center

    loader3.x = (stage.stageWidth - 482) *.5 - 260;

    loader3.y = (stage.stageHeight - 492) *.5 - 140;

    * loader2.x = (stage.stageWidth - 658.65) *. 5;

    loader2.y = (stage.stageHeight - 551.45) *. 5; * /

    }

    addEventListener (Event.ENTER_FRAME, onEnterFrame, false, 0, true);

    function onEnterFrame(ev:Event):void {}

    var requesterb:URLRequest = new URLRequest ("carouselLoader.swf");

    Charger = null;

    loader = new Loader();

    Loader.Name = "carousel1.

    Adds gallery.swf in the scene at the beginning of the film

    loader.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioError);

    function ioError(event:IOErrorEvent):void {}

    trace (Event);

    }

    try {}

    Loader.Load (requesterb);

    } catch (SecurityError: error) {}

    trace (Error);

    }

    addChild (loader);

    Loader.x = (stage.stageWidth - 739) *. 5;

    Loader.y = (stage.stageHeight - 500) *. 5;

    stopover gallery.swf duplication and more on enter frame

    removeEventListener (Event.ENTER_FRAME, onEnterFrame);

    }

    PORTFOLIO BUTTON

    Add eventlistner so that gallery.swf can be loaded

    MovieClip (root),.nav.portfolio.addEventListener (MouseEvent.MOUSE_DOWN, down, false, 0, true);

    function Down(event:MouseEvent):void {}

    Re add listener for contact.swf and about.swf

    MovieClip (root).nav.info.addEventListener (MouseEvent.MOUSE_DOWN, Down1, false, 0, true);

    MovieClip (root).nav.about.addEventListener (MouseEvent.MOUSE_DOWN, Down3, false, 0, true);

    discharge of entry gallery.swf frame if users press portfolio in nav button

    var applicant: URLRequest = new URLRequest ("carouselLoader.swf");

    Charger = null;

    loader = new Loader();

    Loader.Name = "carousel."

    loader.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioError);

    function ioError(event:IOErrorEvent):void {}

    trace (Event);

    }

    try {}

    Loader.Load (requester);

    } catch (SecurityError: error) {}

    trace (Error);

    }

    addChild (loader);

    Loader.x = (stage.stageWidth - 739) *. 5;

    Loader.y = (stage.stageHeight - 500) *. 5;

    removeChild (getChildByName ("about"));

    removeChild (getChildByName ("carousel1"));

    delete eventlistner and prevents duplication of the gallery.swf

    MovieClip (root).nav.portfolio.removeEventListener (MouseEvent.MOUSE_DOWN, down);

    }

    INFORMATION BUTTON

    Add eventlistner so that info.swf can be loaded

    MovieClip (root).nav.info.addEventListener (MouseEvent.MOUSE_DOWN, Down1, false, 0, true);

    function Down1(event:MouseEvent):void {}

    This adds the EventListener for portfolio so that the end user can re-post if they wish.

    MovieClip (root),.nav.portfolio.addEventListener (MouseEvent.MOUSE_DOWN, down, false, 0, true);

    MovieClip (root).nav.about.addEventListener (MouseEvent.MOUSE_DOWN, Down3, false, 0, true);

    var applicant: URLRequest = new URLRequest ("contactLoader.swf");

    loader2 = null;

    loader2 = new Loader();

    loader2. Name = "contact".

    loader2.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioError);

    function ioError(event:IOErrorEvent):void {}

    trace (Event);

    }

    try {}

    loader2. Load (requester);

    } catch (SecurityError: error) {}

    trace (Error);

    }

    addChild (loader2);

    loader2.x = (stage.stageWidth - 658.65) *. 5;

    loader2.y = (stage.stageHeight - 551.45) *. 5;

    delete eventlistner and prevents duplication of the info.swf

    MovieClip (root).nav.info.removeEventListener (MouseEvent.MOUSE_DOWN, Down1);

    }

    ON THE BUTTON

    Add eventlistner so that info.swf can be loaded

    MovieClip (root).nav.about.addEventListener (MouseEvent.MOUSE_DOWN, Down3, false, 0, true);

    function Down3(event:MouseEvent):void {}

    This adds the EventListener for portfolio so that the end user can re-post if they wish.

    MovieClip (root),.nav.portfolio.addEventListener (MouseEvent.MOUSE_DOWN, down, false, 0, true);

    MovieClip (root).nav.info.addEventListener (MouseEvent.MOUSE_DOWN, Down1, false, 0, true);

    var applicant: URLRequest = new URLRequest ("aboutLoader.swf");

    loader3 = null;

    loader3 = new Loader();

    loader3. Name = "a connection"

    loader3.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioError);

    function ioError(event:IOErrorEvent):void {}

    trace (Event);

    }

    try {}

    loader3. Load (requester);

    } catch (SecurityError: error) {}

    trace (Error);

    }

    addChild (loader3);

    loader3.x = (stage.stageWidth - 482) *.5 - 260;

    loader3.y = (stage.stageHeight - 492) *.5 - 140;

    removeChild (getChildByName ("carousel"));

    removeChild (getChildByName ("carousel1"));

    delete eventlistner and prevents duplication of the info.swf

    MovieClip (root).nav.about.removeEventListener (MouseEvent.MOUSE_DOWN, Down3);

    }

    Stop();

    You call unload() on objects that you cancelled - where the error.

    You should do something like:

    {if (loader2)}

    loader2. Unload();

    }

    As for the null value passed into the function - null is a default value. In this way, you can call the low past nothing:

    Down()

    Or you can use it as a handler in which case it will be called by the Auditor:

    Down (mouseEventInstnace);

  • Garbage Collection, external swf and XML

    I did tons of research on the AS3 garbage collection. I have a decent knowledge of it, but I CAN'T find any info about the deletion of xml data. The worst thing is, I have no control over the version of the file (AS2 or AS3) swf file I'm loading. Unfortunately, I'm loading AS2 swf (with an outside provider that will not show you any code) in a film of AS3. When I run garbage collection, the data from the xml file / is not deleted and I can't understand how get rid of it. The problem is, once a file is loaded which calls an xml file, no other files cannot load an xml.

    If anyone knows how to clear the XML, please fill me in.

    Thank you!

    Heather

    The code is:

    **************UPDATE*************************************

    Hey people,

    Good news. I just read an announcement of Grant Skinner regarding what my problems were.

    For more details, go to his blog @ http://www.gskinner.com/blog/archives/2008/07/unloadandstop_i.html

    Be sure to read the update as well.

    See you soon,.

    Heather

  • Difference between the nested table and an associative array

    Hello
    While going through the link http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/05_colls.htm
    I came across the statement that
    Nested tables can be stored in a column of data, but of associative arrays

    So I tried the following statement for the associative arrays where he works
    create type t_nm is table of number index by binary_integer
    The t_nm of type above name is stored in USER_TYPES.


    So how can we say that associative arrays can not be stored in DB.

    Please correct me if I'm wrong.

    Thank you

    Published by: smile on April 8, 2011 02:42
    SQL> drop type t_num;
    
    Type dropped.
    
    SQL> create type t_num table of number index by binary_integer;
      2  /
    
    Warning: Type created with compilation errors.
    
    SQL> desc t_num;
    ERROR:
    ORA-24372: invalid object for describe
    
    SQL> set lines 999
    SQL> select * from user_types;
    
    TYPE_NAME                      TYPE_OID                         TYPECODE                       ATTRIBUTES
    ------------------------------ -------------------------------- ------------------------------ ----------
    T_NUM                          57417E92AD25409CB858D339570A0F56 OBJECT                                  0 
    
    SQL> select object_name, object_type, status from user_objects where object_name = 'T_NUM';
    
    OBJECT_NAME                                                                                                                      OBJECT_TYPE         STATUS
    -------------------------------------------------------------------------------------------------------------------------------- ------------------- -------
    T_NUM                                                                                                                            TYPE                INVALID
    
    SQL> 
    

    You might have missed the error into a TOAD.

    Concerning

    REDA

  • Settlement and associative array (?)

    I adapt a class as explained in 'Flash Application Design Solution'. The code is used to power a system of menus.

    In the original code, the dashboard menu system is hardcoded in this way:
    var MenuData:Array = [{title: 'Advanced Flash Interface Design'}, {title: 'Flash 3D Cheats Most Wanted'}, {title: 'Flash 8 Essentials'}, {title: "Flash Cartoon Animation"}];

    This is an associative array?

    In my code, I would rather use an XML file to populate MenuData, but something is missing in my understanding. The code below does not work since there is no title 'label' associated with my table data.

    I found the solution:
    MenuData.push ({title: photos . attributes.nom});

  • Associative array

    I have a table proj_test .i want to recover the data in the associative array.

    How to do?

    create table proj_test as  
      select 1 as id, 1 as rn, 'Fred' as nm from dual union all  
      select 1,2,'Bloggs' from dual union all  
      select 2,1,'Scott' from dual union all  
      select 2,2,'Smith' from dual union all  
      select 3,1,'Jim' from dual union all  
      select 3,2,'Jones' from dual  
    
    

    You need not Associative array if you do a bulk of collect. You can use the nested PL/SQL table type.

    11g and more

    declare

    is of type tbl table of the proj_test % rowtype;

    tbl l_tbl;

    Start

    SELECT id, rn, nm bulk collect into l_tbl

    of proj_test;

    because me in 1.l_tbl.count

    loop

    dbms_output.put_line

    (

    RPAD (to_char (l_tbl (i) USER.USER), 10, ' ')

    || RPAD (to_char (l_tbl (i). (RN), 10, ' ')

    || l_tbl (i) .nm

    );

    end loop;

    end;

    Before 11 g

    declare

    type id_tbl is table of the proj_test.id%type;

    type rn_tbl is table of the proj_test.rn%type;

    type nm_tbl is table of the proj_test.nm%type;

    id_tbl l_id;

    l_rn rn_tbl;

    l_nm nm_tbl;

    Start

    SELECT id, rn, nm bulk collect into l_id, l_rn, l_nm

    of proj_test;

    because me in 1.l_id.count

    loop

    dbms_output.put_line

    (

    RPAD (to_char (l_id (i)), 10, ' ')

    || RPAD (to_char (l_rn (i)), 10, ' ')

    || l_nm (i)

    );

    end loop;

    end;

  • Associative array as a type of database

    As it is very well create an associative array inside a stored procedure:

      type urltype  is table of varchar2(32767) index by varchar2(30);
    
    

    Can it be created as a type of database at the level of the schema?

    Brian.McGinity wrote:

    As it is very well create an associative array inside a stored procedure:

    1. type urltype is the table of index varchar2 (32767) by varchar2 (30);

    Can it be created as a type of database at the level of the schema?

    Non - associative arrays are a function of PL/SQL.

    See table 5-1 in the doc of the PL/SQL language for a description of each type of collection and where (pl/sql, sql, etc.) they can be used.

    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e25519/composites.htm#CHDBHJEI

  • Associative arrays... items in the index

    I can control the index of an associative array like that...
     TYPE aat_id IS TABLE OF PLS_INTEGER INDEX BY PLS_INTEGER;
      aa_ids aat_id;
    
    BEGIN
    
         aa_ids(1) := 3;
         aa_ids(2) := 8;
         aa_ids(2) := 10;
         
    aa_ids.delete(2);
    
    dbms_output.put_line(aa_ids.count);
    
    END;
    How can I control the index in the statement of collection in bulk as follows... so that I can delete records using this index
     SELECT decode(mod(rownum,2),1,1,2), object_name BULK COLLECT INTO aa_recs
         FROM   all_objects WHERE  ROWNUM <= 6;
    Thank you
    HESH.

    HESH wrote:

    but I have to play with the collected values, I want to delete the values in bulk without a loop through the list there at - it a trick possible to do this?

    Using not PL/SQL and bays of PL/SQL at all - just using simple native SQL.

    Before bulk collection and construction of an associative array, for the use of the values in table for future SQL operations, I rather to store the collection of values in a TWG (global temporary table) instead. A TWG can be indexed - and can thus provide much better access to the data as an associative array. He played better. It can be used via SQL, native mode.

    The best place for the data is in the database. Not in the PL/SQL layer. This means that in SQL tables and not in PL/SQL tables or collections.

    There are very few situations in PL/SQL, which require the use of associative arrays. If few, the majority of the PL/SQL code using associative arrays, IMO do badly. And what you've posted so far, I do not see a specific requirement for associative arrays.

    So be sure you use the correct feature - and make sure that it is also well put to use in your code.

    PS. HESH is a strange name. I'm used to HESH meaning High Explosive Squash Head (used for the filming of shielding). :-)

Maybe you are looking for