Best way to do a Object which holds a collection of another object type.

I'm writing a caching object to store another object. The cache is only valid for a session, so I want a store the data in a nested table.
I have try to simplify my example down to its core.
How do I make this work and what is the best to index the index the items stored for fastest retrieval.
CREATE OR REPLACE TYPE ty_item AS OBJECT (
id_object VARCHAR2 (18),
ORDER MEMBER FUNCTION compare (other ty_item)
RETURN INTEGER
CREATE OR REPLACE TYPE BODY ty_item
AS
ORDER MEMBER FUNCTION compare (other ty_item)
RETURN INTEGER
IS
BEGIN
IF SELF.id_object < other.id_object
THEN
RETURN -1;
ELSIF SELF.id_object > other.id_object
THEN
RETURN 1;
ELSE
RETURN 0;
END IF;
END;
END;
CREATE OR REPLACE TYPE ty_item_store AS TABLE OF ty_item;
CREATE OR REPLACE TYPE ty_item_holder AS OBJECT (
CACHE ty_item_store,
MEMBER FUNCTION get (p_id_object IN VARCHAR2)
RETURN REF ty_item,
MEMBER FUNCTION find (p_id_object IN VARCHAR2)
RETURN REF ty_item,
MEMBER FUNCTION ADD (p_id_object IN VARCHAR2)
RETURN REF ty_item
CREATE OR REPLACE TYPE BODY ty_item_holder
AS
MEMBER FUNCTION get (p_id_object IN VARCHAR2)
RETURN REF ty_item
IS
rtn REF ty_item;
BEGIN
rtn := find (p_id_object);
IF rtn IS NULL
THEN
rtn := ADD (p_id_object);
END IF;
RETURN rtn;
END;
MEMBER FUNCTION find (p_id_object IN VARCHAR2)
RETURN REF ty_item
IS
rtn ty_item;
BEGIN
SELECT VALUE (ch)
INTO rtn
FROM CACHE ch
WHERE ch.id_object = p_id_object;
RETURN rtn;
END;
MEMBER FUNCTION ADD (p_id_object IN VARCHAR2)
RETURN REF ty_item
IS
item ty_item;
BEGIN
item := ty_item (p_id_object);
INSERT INTO CACHE
VALUES (item);
END;
END;
/

Best way to do a Object which holds a collection of another object type. The best place for data in a database is.. no real surprise.. in tables. If that data is temporary of nature, global temporary tables cater for that.
Storing/caching data using PL/SQL requires very expensive private process memory (PGA) from the server. This does not scale.
I'm writing a caching object to store another object. Irrespective of how l33t your haxor skillz are, you will not be able to code as a sophisticated, performant and scalable PL/SQL data cache, as what already exists (as the database buffer cache) in Oracle.
The cache is only valid for a session, so I want a store the data in a nested table.Not sure how you take one (session local data) to mean the other (oh, let's use a nested table).
Session local data can be done using PL/SQL static variables. Can be done using name-value pairs residing in a context (Oracle namespace). Can be done using a global temporary table.
The choice is dependent on the requirements that need to be addressed. However, the term +"caching+" has very specific connotations that say that a global temporary table is likely the best suited candidate.

Similar Messages

  • What is the best way to manage my iPhoto, which is taking up too much space on my MacBook Pro?

    What is the best way to manage my iPhoto, which is taking up too much space on my MacBook Pro?
    Specifically, I'd like to keep some of my favorite pictures on the laptop while moving the rest to an external hard drive. Is there a way to tag just a few pictures inside an event/album as "favorite", while storing the rest in an EHD, but still keep them connected to the same event/album? I'd like to have just the favorite pictures on the laptop, but when I have the EHD connected,  be able to view all my pictures in the same place, and not have to browse through separate hard drives. Ideally, whether or not a picture is designated as "favorite" will determine where it resides.
    Is this at all possible?
    I have only 7 GB left on my HD and I'm desperately needing a solution!
    Thanks!

    You need two libraries to do this. One on the external with all your Photos. One on the internal with a subset - your favourites. You do it this way to make backing up easier - that is, back up the library with everything, so you're only backing up one.
    Make sure the drive is formatted Mac OS Extended (Journaled)
    1. Quit iPhoto
    2. Copy the iPhoto Library from your Pictures Folder to the External Disk.
    Now you have two full versions of the Library.
    3. On the Internal library, trash the Events/albums/photos you don't want there
    Now you have a full copy of the Library on the External and a smaller subset on the Internal
    Some Notes:
    As a general rule: when deleting photos do them in batches of about 100 at a time. iPhoto can baulk at trashing large numbers at one go.
    You can choose which Library to open: Hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Choose Library'
    You can keep the Library on the external updated with new imports using iPhoto Library Manager

  • What is the best way is to create a web app item collection which will contain only the listings where addressstate="ABC".

    What is the best way is to create a web app item collection which will contain only the listings where addressstate="ABC".

    How many systems have you used Robert?
    This is the only system you can not have all item data at least in JSON format and all of it. Big commerce has a lower limit and as I have said in every post related to a limit - I understand the function, but you can still make the requests as just one example (front and back)
    Same with API Robert.
    Firstly - the SOAP API request on say products gets you ALL the products, if you do something through a REST API request you can  make the requests to get all the items to complete your process of what your doing - You have to otherwise the API is pointless.
    Ok if the normal modules can not iterate through if there is a module_data solution, and web apps will get there hopefully sooner then later and you do have the sql query (where) for your filter which is great BUT, if you want to implement a solution across everything you cant do that with the liquid implementation.
    This also flows through to the JSON everywhere in concept which is fundamentally flawed for the same reason... And again referring other like services where a hard API has a limit but the JSON request returns everything.
    How those work varies from the method of request, some will only update every day, xxx time (Depending on cost of the plan) so its a cached version of data, to the ones that limit that request to x number of times per set time/day.
    That is how the actual rest of the world works, varied solutions but they are solutions. BC know they have a few limitations, there clearly is the need for things, there are a varied set of options... It is just a matter of engaging in it and offering up a solution for it, silence just creates frustration.

  • Best Way to Migrate a configuration from one sun webserver to another

    Hi,
    What is the best way to migrate a configuration from one Sun Webserver to another? I am using Webserver 7 Update 5 on Linux. If I just copy the configuration directory, the administration server doesn't know it. Thanks!

    I found my answer.. I found this link - http://forums.sun.com/thread.jspa?threadID=5317534

  • What's the best way to move my contacts from my current iPhone5 to another iPhone?

    What's the best way to move my contacts from my current iPhone5 to another iPhone?

    Use iCloud. First, on your iPhone, open Settings > iCloud, and enable Contacts, so your contacts will appear on all your devices logged in iCloud.
    Then, on the other iPhone, open Settings > iCloud, log in with your Apple ID and enable Contacts, so they will show up on this phone.

  • What is the best way to get PATHS from one Photoshop psd file to another?

    Hi! New on the site, and I signed up specifically to ask the best way to import one .psd file into another, including the paths on the paths palette.
    Almost all of my Photoshop drawings make heavy use of vector paths, which I then stroke using using PS natural-media brushes and the "stroke paths" function (usually with "simulate pressure" checked.) Also, my .psd files tend to be, um, HUGE... and I typically break up a whole drawing into separate PS files and then assemble all of them into one final finished graphic.
    I have no trouble moving raster stuff from file to file. Just put all the layers I want to transfer into a group and drag the group to the other .psd. Works fine, including layer masks. But I have not found a good way to get vector paths from the Paths palette of one .psd to another. Of course I can select paths and copy them to the Win clipboard, switch to the other .psd, and paste them back in. The drawback to that method is that I lose the correct size relation between the results of previously done "stroke paths" operations (on raster layers) and the paths that generated them. Sometimes the copied-in paths are way too large, sometimes way too small, never Just Right.
    As I'm sure most of you know, if you resize an entire Photoshop document from within PS, any paths it contains are correctly resized along with everything else. That's no longer true after grouped raster layers are dragged over to another document but paths are copied and pasted in. The size connection is lost. (Location placement, too.)
    I WANT those paths! After I bring a piece of a drawing into the full final drawing, what looked good when I was working on it separately often doesn't look right any longer and I want to re-stroke those paths using different brush diameter, opacity, etc., or maybe even a completely different brush.
    I've tried bring outside .psd files in as smart objects with the Place command but either that doesn't work or I'm not doing it right. Using Place, the paths in the Placed document don't come in at all.
    I'll be very grateful for any hints or strategies any of you knowledgeable folks can give me. Thanks very much!
    Jim
    Note, PS CS3 extended on Win 7 pro.

    Denny
    1. Connect the two macs - firewire, ethernet, sneakernet as suits you - and copy the iPhoto Library Folder from Old Machine to New Machine. Drag it from Home/Pictures to the same location on the new machine.
    2. Because all the files 'belong' to the account on the old machine, you have to update the file permissions: hence Download BatchMod from
    http://macchampion.com/arbysoft/
    And apply it to the iPhoto Library Folder using the settings found here:
    http://homepage.mac.com/toad.hall/.Pictures/Forum/BatChmod.png
    (Credit to Old Toad for this one).
    Note: This must be run on the new machine after copying the files over.
    3. Then launch iPhoto on the new machine.
    Regards
    TD

  • What is the Best way To Copy and paste data from 1 book to another

     I have 18 sheets in 5 different books that I want to extract data from specific cells.  What is the best way to do this?  Example:  1 sheet is called Numbers E-O1 data in 13:WXYZ. The data updates and moves up 1 row every time I enter
    a new number. So let's say I enter the number 12. Through a lot of calculations the output goes in 13:WXYZ. To what I call a counter which is a 4 digit number.  Anyways, how can I send that 4 digit number to a totally different sheet?  To bullet
    what I'm talking about
    data in cells Row 13:WXYZ in book called Numbers sheet E-O1
    send data to book called "Vortex Numbers" Sheet E-O row 2001:CDEF
    What formula or Macro can I use to make this work?
    thank you!

    Hello Larbec,
    Syntax:
    '[BookName]SheetName'!Range
    Enter in cell  2001:CDEF:
    ='[Numbers]E-O1'!13:WXYZ
    This assumes that the file is open in Excel. Otherwise you need to add the path:
    'ThePath[BookName]SheetName'!Range
    Best regards George

  • Extending view object which does not have any entity object associated with

    Dear all
    I am interested in extended on of the standard pages VO object in JDeveloper OA extension
    the standard page is oracle/apps/pos/supplier/....suppSummaryPG
    and one of the view which I am interested to extend is suppSummVO
    the problem is that when I copy xml files and java files from apps server to
    my local jdevelope folder , I am not able to open that suppSummVO, the changes which
    I find from other VO object and this(suppSummVO) object is that, this VO does not have any
    Entity Object associated with it and the only query is return on this VO , is it the reason that
    I am not able to open it Jdeveloper, but the real issue is that how can I extends this type of VO
    in my OAExtension.
    Regard
    Noman

    Its the same way of extending VO with EO's or without EO's.
    Sometimes if the .class files arn't decompiled we get weird jbo errors. So use cavaj/jad to decompile those Impl.class, RowImpl.class files and keep them in the same folder as vo.xml in myprojects and try extending that VO.
    Thanks,
    Ravi

  • Best way to move securities from one Active Directory (AD) to another ?

    Hi experts,
    We are currently moving all our employees from several Active Directories (AD) to a Global active directory (GAD). So user accounts and all our BPC securities set up will keep being the same. Only the active directory has to be changed.
    What would be the best way to proceed to migrate all our current securities from our various AD to our new GAD ?
    We are on SAP BPC MS 7.0 SP3, SQL Server 2008
    Thanks for your help.
    Best regards,
    Ludovic

    If the name of somain will remain the same then you don't have to do anything from BPC point of view.
    You just to make sure that doing ping of "domain name" it will respond the new active directory GAD not the old one.
    If the domain name was changed then from BPC point of view we are speaking actually about complete different users.
    So the security must to be redone for all users.
    domain1\user1 is different by dmain2\user1.
    Regards
    Sorin Radulescu

  • Making objects appear after a click on another object

    Hi everyone,
    I have a text box with some text on a slide. I would like my text box to appear after I click on an object that I created (an arrow for example). How do I do that?
    Builds offers for my object to appear - after click, after first object appears or at the same time the previous object appears.
    Am I missing something?
    Thanx in advance!
    Vladimir, Croatia

    Hi Vladimir,
    Welcome to Apple forums.
    If you specifically want the (arrow) object to be the only place to click for this text then create a new slide (perhaps a duplicate). Select Arrow object, then open the Hyperlinks Inspector palette. Tick enable hyperlink and choose link to slide. In the bottom option enter the slide number of the new slide. This keeps the link pretty secure even if you add slides in between the original and the other.
    If you don't mind clicking anywhere, then just select any of the build-in options with the text selected.
    Message was edited by: wideEyedPupil
    Message was edited by: wideEyedPupil

  • I want to use my iPad(4) as the remote for controlling my powerpoint presentation that is on my macbook pro(2012 no retina display). Not sure which is the best way to do so or which app to use.

    Going to be connecting my macbook pro to a projector. in the room there is no wifi either)

    Keynote Remote, but you will need wifi. You can set up an ad-hoc wifi network from your Macbook itself ("Create Network" from the Wifi menu), which the iPad can connect to.
    https://itunes.apple.com/us/app/keynote-remote/id300719251?mt=8
    Matt

  • Best way to make a smooth scrolling list of 100's of objects ?

    Hi there.I need a smooth scrolling list! for eg the scrolling list of contacts in iOS.
    I can make a scrolling list by just vertically moving a huge sprite that contains all of the elements as movie clips but this is slow !
    how could I make something that doesnt slow down depending on the size of that data ?
    Thanks
    Luke

    I made a simplified test and it also was running slower without
    import flash.display.MovieClip;
    import hiResStats.net.hires.debug.Stats;
    import flash.display.BitmapData;
    import flash.display.Bitmap;
    import com.greensock.*;
    import flash.events.*;
    var stats:Stats = new Stats();
    var holder:MovieClip = new MovieClip();
    addChild(holder);
    for (var i=0; i<1000; i++) {
    var newitem:item = new item();
    newitem.label.text=String(Math.random());
    var bmp:BitmapData=new BitmapData(320,60);
    bmp.draw(newitem);
    var bitmap:Bitmap=new Bitmap(bmp);
    bitmap.y=i*60;
    holder.addChild(bitmap);
    var blitMask:BlitMask=new BlitMask(holder,0,0,320,480,true,true);
    addChild(stats);
    addEventListener(Event.ENTER_FRAME,go);
    function go(e:Event) {
    holder.y-=10

  • Best way to learn iWork? Which source?

    I'd like to know a good source to learn iWork thoroughly.. Online.
    Paid and Free.
    Certification might be cool.

    I used only these resources :
    Keynote User Guide
    Numbers User Guide
    Pages Users Guide
    iWork Formulas and Functions User Guide.
    For users really fluent with English, Apple deliver also several videos
    All these resources are available for free thru the Help menus.
    For me, the videos are perfectly useless. I'm unable to understand the spoken explanations.
    Yvan KOENIG (VALLAURIS, France) vendredi 17 février 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.3
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • Best way to copy large VM files from one drive to another?

    Hi all, I am wondering what the best and fastest way there is to copy a large VM file from one drive to another (external drive to internal drive). Should the .pvm folder (in my case with Parallels) be zipped first? The files I need to copy range from 50 to 70gb. thx for any insight! ps. Even Bombich admits it's difficult for CCC to do...not clear why, but it does slow a full clone down to a crawl. I also have Chronosync at my disposal, but suspect the same is true there as well. Cheers!
    coocoo

    I don't think it matters much which way you do the job. I use Parallels to compress by drives on a regular basis. If you want to copy a dynamic VM, which can grow to just about any size as required, to another drive you will use about the same amount of time zipping the VM - transfering the VM - unzipping the VM, as you would just moving the VM.
    I've moved my VM files to a second partition that does not get cloned to my bootable backup that I create with SuperDuper. I've excluded my entire VM folder from Time Machine and just make zipped backups for each system after any large Service Pack Updates from Microsoft, or any intricate program installations. These get copied to a second partition on my Time Machine drive manually.
    My VM's sizes are kept under control by using common Documents-Movies-Music folders for the Mac and the VM's. My VM's do not have the data files the programs use, they are on my Mac and get backed up every hour with Time Machine.
    Reinstalling a VM just means deleting the broken copy, unzipping my latest backup, and putting into the same folder that Parallels knows to use. The data files are always accessible, even if they were created after my latest VM backup.

  • Best way to move redo log from one disk group to another in ASM?

    Hi All,
    Our db is 10.2.0.3 RAC db. And database servers are window 2003 server.
    We need to move more than 50 redo logs (some are regular and some are standby) which are not redundant from one disk group to another. Say we need to move from disk group 1 to 2. Here are the options we are thinking about but not sure which one is the best from easiness and safety prospective.
    Thank you very much for your help in advance.
    Shirley
    Option 1:
    1)     shutdown immediate
    2)     copy log files from disk group 1 to disk group2 using RMAN (need to research on this)
    3)     startup mount
    4)     alter database rename file ….
    5)     Open database open
    6)     delete the redo files from disk group 1 in ASM (how?)
    Option 2:
    1)     create a set of redo log groups in disk group 2
    2)     drop the redo log groups in disk group 1 when they are inactive and have been archived
    3)     delete the redo files associated with those dropped groups from disk group 1 (how?) (According to Oracle menu: when you drop the redo log group the operating system files are not deleted and you need to manually delete those files)
    Option 3:
    1)     create a set of redo members in disk group 2 for each redo log group in disk group 1
    2)     drop the redo log memebers in disk group 1
    3)     delete the redo files from disk group 1 associated with the dropped members

    Absolutely not, they are not even remotely similar concepts.
    OMF: Oracle Managed Files. It is an RDMBS feature, no matter what your storage technology is, Oracle will take care of file naming and location, you only have to define the size of a file, and in the case of a tablespace on an OMF DB Configuration you only need to issue a command similar to this:
    CREATE TABLESPACE <TSName>; So the OMF environment creates an autoextensible datafile at the predefined location with 100M by default as its initial size.
    On ASM it should only be required to specify '+DGroupName' as the datafile or redo log file argument so it can be fully managed by ASM.
    EMC. http://www.emc.com No further commens on it.
    ~ Madrid
    http://hrivera99.blogspot.com

Maybe you are looking for