Alternative to Dataset??

A

amarjeetlokhande

Hi,
I am part of a team building a stock exchange software - Order
Management system'.
The current system that we have supports 200,000 orders per day.
All of this data is needed in memory.Ofc ourse this system was built in
VC++.
what I want to know is :

- Is there a alternative to storing data in dataset?
- this alternative doesnt have to be as flexible and as feature filled
as the dataset.
-can you suggest some ideas for the same.
I have been tinkering around with specifalised business objects and
using them to store the data.
 
R

Rick

I think you've addressed the major alternative yourself, custom
business objects.

There are also objects called EntitySets that utilize custom business
objects in datasets, but I've never delved into them. There a book,
something like Enterprise Application Development in C# or Distributed
Application Development in C# that explains EntitySets. But be advised,
they are really wierd and any code you put in a Typed DataSet will be
overriden by the Designer if opened.

Rockford Lohkta has several versions of a book that use Smart Business
Objects and a Framework to use them. If you search for his name, you'll
find many examples of them. They are pretty feature filled, but you'll
be able to see the general premise about them if you want to use cusom
business objects.

Without knowing exactly what you are asking:

Custom business objects (Domain Objects) maintain state and behaviour.
This means that a CBO based on a database table, will most likely
contain a property for each field in that table. When the object loads
or saves, it assigns the state values from the table for a single
record.

These CBO's will generally be associated with a Custom Business Object
Collection in which the collection will only hold objects of type CBO.
You also maniplute object state when you add or remove objects from the
collection (I.e. you add a new CBO to the collection, you may flag the
instance of that CBO with IsNew = true, or when you remove a CBO from
the collection the collection really just moves from the 'really' list
to a 'deleted' list and marks it IsDeleted = true: That way when the
Collection's save method is called, it can loop through the deleted
list and calling the CBO's Delete method, and then the collection loops
through the real list and calls the appropriate methods of the CBO to
Add or Update)

One great thing about CBO's is you can implement business rules right
in the CBO and/or CBOC (making sure that an Order CBO has at least 1
OrderDetail CBO in the Orders.OrderDetailsCollection.)

Also, you can specialize your CBO's and CBOC's if you only need read
only data, which will speed things up as you are passing the CBO/CBOC
around the application.

I'm sorry if I didn't address you needs, if you expand a bit maybe I or
someone else could answer further.

-Rick
 
W

W.G. Ryan - MVP

I'd look at the inner workings of a dataset as a starting point for my
custom business objects. the WSE 3.0 library has a pretty nice model for
dealing with a stock trading system, it's not what you need specifically
but it will be a good starting place for design.

Custom business objects are the answer and LINQ is going to make it all the
better. Rocky Lhotka's updated book on Business Objects is a real winner.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top