Is there anything better than serialized XML for storing a simple C # database that can be compiled in my own build?

I am making a simple application, than I need to store a simple data structure. Something similar to working for serialized XML, but .. I remember reading somewhere about something that was better for working, but simple enough to compile in my own application.

I looked at SterlingDB, but the seams are like overkill, and I would be in pain to compile it in my assembly

Do you know anything better than serialized XML storage?

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

+4
source share
4 answers

You can use the binary "protocol buffers" format on Google. Mark Gravell built the .net implementation. (note, I never used it myself):

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

(from the Protobug web page):

It is intended for:

  • small size - efficient data storage (much smaller than xml)
  • process cheaply - both on the client and on the server
  • platform independent - portable between different programming architectures.
  • extensible - to add new data to old messages

protobuf-net is a .NET implementation that allows you to efficiently and easily serialize your .NET objects. 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)

+2
source

iBoxDB built-in database of nosql objects, less than 200 thousand, includes many functions, full managed code, not a single "DllImport", embeds a DLL in a compiled C # executable here

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

+1
source

As long as the amount of data is not too large, you can simply add the DataSet to your project and edit it in the DataSet Designer . It is strongly typed, you can query it using LINQ, and it has methods for saving and loading from embedded XML.

0
source

Source: https://habr.com/ru/post/1387641/


All Articles