• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Bob update

In the meta data we define for each type of dinner, what the default set of dinner items are.

So for cooked breakfast we have :

Fried tomato
Bacon
Beans
Sausage
Mushrooms

Is there a vegetarian option?

And technically is Breakfast a type of dinner?

I would look at your requirements as they are not up to scratch.
 
I have considered your problem domain and I can say that I feel the best way to implement your solution would be to use LinqToSql
thus preserving n-tier architecture and negating use of thes cursors.

I have to be honest with you and say that this problem domain is frankly pretty trivial
when compared to some of the solutions I have to pull out of my hat when I am required to do so by my clients. And these soultions I provide these soutions all come without these cursors. Never.

LinqToSQL Not an option as it's not part of the BPM framework and would require a custom BO layer. Customisation is not an option as it has been deliberately scoped out by the client.

Next.
 
OK so this is the example where the cursor is being used :

The screen in question creates a row in a table called dinner. There is a child table called dinner_item which will hold all of the dinner items.

In the meta data we define for each type of dinner, what the default set of dinner items are.

So for cooked breakfast we have :

Fried tomato
Bacon
Beans
Sausage
Mushrooms

So when we create a dinner row, we want to automajically populate the dinner items from the meta data. So the cursor would open the list of dinner_items from the meta data, and then pop one row in the dinner_item table.

It could be done from the application layer, but this would not only perform better but would be easier to change the stored procedure than rush out a new version of the app.

The stored procedure debate trundles on, but we were forced into using stored procs as Oracle doesn't have an identity field, so we need to use sequences so this is all wrapped up in the insert stored proc, and the new id value returned as an output variable.

This app you're writing, it's not for Granada Service Stations by any chance is it?
 

Advertisers

Back
Top