Bulk Insert/ Array Insert for Oracle

Posts   
 
    
HoangTang
User
Posts: 5
Joined: 13-Jul-2010
# Posted on: 13-Jul-2010 16:08:13   

We need to be able to do multiple insert in one shot for oracle. Base on our investigation the oracle client support some sort of "Array Insert" where you can do bind to an array to do that.

I am trying to convince our project manager to go with LLBLGen and this is one of his requirement.

Does v3 support any thing like that natively? If not how hard would it be for us to implement it?

This is a critical requirement that we are able to do that. If LLBLGen support this natively then I'll be sooo thrilled. If not any pointer on how to add this in would be great. We've also been watching the following thread closely

http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=15439&HighLight=1 http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=10568&HighLight=1 http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=15195

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 13-Jul-2010 21:08:43   

LLBLGen does not nativly support any of the Bulk Insert functionality in any of the databases it supports - mainly because they are all very different in their implementations.

What sort of volumes of data are you talking about - a few thousand (LLBLGen will be fine saving this many entity records) or a few million ?

As for adding it in - why would you need to ? Many people who need this functionality simple build it along side LLBLGen with the need for it to be part of the LLBLGen functionality.

Matt

HoangTang
User
Posts: 5
Joined: 13-Jul-2010
# Posted on: 13-Jul-2010 23:22:31   

Did you mean without the need?

We are mainly concern with the network latency because of database and service layer are far away from each other (different states). So it's nice to be able to do it all in one shot because the network latency is what kill us. Each of the bulk insert will be around 5 - 30 thousand records each time.

As for why we want it build in, we want to make it as easier as possible for our application developer to insert a collection of data without any hassle. If we can keep it in one place that would be nice and if llblgen can help us facilitate that process that would be even better.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 14-Jul-2010 05:32:11   

InsertEntitiesDirectly (BulkInset) is not supported yet. I think you can build some functionality in top of LLBLGen Framework, although I don't see clear if it will be possible to manage the same entity life cycle (beforeSave, afterSave, validators, auditors, authorization...) for the involved entities. So it would be like a method

void BulkInsertThis(IEntityCollection collectionToBulkInsert)
....

About ODP, I think you are referring to ODP.Net Array Bindings. It doesn't look so difficult.

Are you using LLBLGenPro Runtime as the target framework? Adapter or SelfServicing?

David Elizondo | LLBLGen Support Team
HoangTang
User
Posts: 5
Joined: 13-Jul-2010
# Posted on: 14-Jul-2010 15:18:53   

I've seen Frans in action and I am very impressed with his knowledge. I know llblgen have a good Linq provider/gui so that's why I want to push it for our company. We aren't using it for a moment but once we use it the LLBLGen Pro runtime framework would be the target framework.

Yes I am refering to the ArrayBinding.

Regarding the Adapter or Self Servicing I am not real clear on either yet and if we have to do it on our own some guidance on which would be the ideal would be appreciated. I saw that Frans mention something about an InsertEntities for v3 so I was hoping that even if v3 doesn't support ArrayBinding for Oracle we can somehow intercept that method to do what we want that way we also getting all the other features like validations along with it as well. Again I am not familiar with LLBLGen as yet, so feel free to correct me if I am wrong.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 15-Jul-2010 11:54:08   

HoangTang wrote:

I've seen Frans in action and I am very impressed with his knowledge. I know llblgen have a good Linq provider/gui so that's why I want to push it for our company. We aren't using it for a moment but once we use it the LLBLGen Pro runtime framework would be the target framework.

Yes I am refering to the ArrayBinding.

Array binding is currently not supported. One of the main reasons earlier on was that ODP.NET didn't support it and in the scope of an entity, it didn't make much sense (only where clauses it does). So we didn't build it in. Perhaps in the future.

Regarding the Adapter or Self Servicing I am not real clear on either yet and if we have to do it on our own some guidance on which would be the ideal would be appreciated. I saw that Frans mention something about an InsertEntities for v3 so I was hoping that even if v3 doesn't support ArrayBinding for Oracle we can somehow intercept that method to do what we want that way we also getting all the other features like validations along with it as well. Again I am not familiar with LLBLGen as yet, so feel free to correct me if I am wrong.

I don't recall exactly what you mean with 'InsertEntities' ? The threads you linked to show some examples how to implement some bulk inserts, however when it comes to bulk inserts, in general the tools provided by the DB (to circumvent the SQL processor) are preferable as they're much faster than any SQL query will ever be.

If you're looking for insert based on select, we don't support that currently, however there's a workaround for that posted if I recall correctly, in the last thread you linked to in your start post.

Frans Bouma | Lead developer LLBLGen Pro
HoangTang
User
Posts: 5
Joined: 13-Jul-2010
# Posted on: 16-Jul-2010 19:40:30   

The InsertEntities came for one of your reply on the first thread thought I might have misunderstood your intention. "v3 will have the InsertEntitiesDirectly." is the exact quote from that thread.