4

I'm making a simple app than needs to store a simple structure of data. Something that looks like a job for a serialized XML, but .. I remember reading somewhere about something that was better for the job, but simple enough to be compiled in my own app.

I've looked at SterlingDB but seams like an overkill and I would be a pain to make it compile in my own assembly

Do you know something better than a serialized XML store?

edit: I know about SQLite, Compact SQL, db4o, but I'm looking for something tiny.

Eduardo Molteni
  • 38,786
  • 23
  • 141
  • 206

4 Answers4

2

You could use Google's "protocal buffers" binary format. Marc Gravell built a .net implementation. (note, I've never used it myself):

http://code.google.com/p/protobuf-net/

(from the Protobug web page):

It is designed to be:

  • small in size - efficient data storage (far smaller than xml)
  • cheap to process - both at the client and server
  • platform independent - portable between different programming architectures
  • extensible - to add new data to old messages

protobuf-net is a .NET implementation of this, allowing you to serialize your .NET objects efficiently and easily. It is compatible with most of the .NET family, including .NET 2.0/3.0/3.5, .NET CF 2.0/3.5, Mono 2.x, Silverlight 2, etc.

(end of quote)

JMarsch
  • 21,484
  • 15
  • 77
  • 125
1

iBoxDB embedded nosql Object Database, less than 200K, includes many features, full of managed code, no any 'DllImport', embed a DLL into a compiled C# executable in here

Embedding DLLs in a compiled executable , http://iboxdb.codeplex.com/

Community
  • 1
  • 1
Bruce
  • 51
  • 1
0

SQLite

http://system.data.sqlite.org

Bueller
  • 2,336
  • 17
  • 11
0

As long as the quantity of data isn't too large, you could just add a DataSet item to your project and edit it in the DataSet Designer. It's strongly typed, you can query it with LINQ, and it has methods for saving to and loading from XML built in.

JamieSee
  • 12,696
  • 2
  • 31
  • 47
  • It's the same that an object structure serialized. Was hoping for something slightly better – Eduardo Molteni Dec 22 '11 at 22:00
  • @EduardoMolteni You can also apply a binary serializer to this if you want and it does meet the criteria of no external dll or extra code needed. Beyond that I'm not really sure what you want. You could maybe store the data in a regular collection and just use a binary serializer on it, if it's that simple. Can you expand on your criteria? Also, maybe an example of the information you're trying to work with? – JamieSee Dec 23 '11 at 00:00