I am writing a CAD (Computer-Assisted Design) application. I'll have to ship a library of three dimensional objects with this particular product. They are simple objects comprised of simply three dimensional coordinates and you will find likely to be a maximum of about 300 of these.

I am thinking about utilizing a relational database for this function. But given my simple needs, I'm not going any factor complicated. Till now, I am leaning towards SQLite. It's small, runs inside the client process and it is stated to become fast. Besides I am a poor guy and it is free.

Before I commit myself to SQLite, I simply desire to request your opinion whether it's the ideal choice given my needs. Is also there any equivalent alternative which i need too before making the decision?


I unsuccessful to say earlier the above-stated CAD objects that I'll ship will not be immutable. I expect the consumer to edit them (change dimensions, colors etc.) and save to the library. I additionally expect customers to include their very own recently-produced objects. Kindly think about this inside your solutions.

(Just solutions to date.)

The actual factor to think about is exactly what your program does using the data. Relational databases are made to handle complex associations between teams of data. However, they are not made to perform complex information.

Also, the quantity of data and relative simplicity from it indicates in my experience you could simply employ a set file to keep the coordinates and browse them into memory if needed. By doing this you are able to design your computer data structures to more carefully reflect how you are likely to be by using this data, instead of how you are likely to store it.

Many languages give a mechanism to create data structures to some file and browse them in again known as serialization. Python's pickle is a such library, and I am sure you'll find one for whatever language you utilize. Essentially, just design your classes or data structures as determined because when they are utilized by your program and employ one of these simple serialization libraries to populate the events of this class or data structure.

edit: The necessity the structures be mutable does not really affect much regarding my answer - I still believe that serialization and deserialization is the greatest fix for your problem. The truth that customers have to have the ability to modify and save the structures necessitates a little of planning to make sure that the files are up-to-date completely and properly, but ultimately I think you will finish up investing less effort and time with this particular approach than attempting to marshall SQLite or any other embedded database into carrying this out project for you.

The only real situation where a database could be better is for those who have a method where multiple customers are getting together with and upgrading a central data repository, as well as for a situation like this you would be searching in a database server like MySQL, PostgreSQL, or SQL Server for speed and concurrency.

Additionally you said that you are likely to be using C# as the language. .Internet has support for serialization built in so you ought to be good to go.

It is best to to think about using H2, it is lightweight and fast.

Whenever you say you will have a library of 300 three dimensional objects, I'll assume you mean objects for the code, not models that customers can create.

I have read that object databases are very well suitable for assist with CAD problems, because they are ideal for chasing after lower lengthy reference chains which are sign of complex models. Possibly something similar to db4o could be helpful inside your context.

The number of objects are you currently shipping? Are you able to define all these Objects as well as their coordinates within an xml file? So essentially make use of a distinct xml apply for each object? You can put these xml files inside a directory. This is often a simple structure.