| Home | .NET Object Database | Schindler Call Center | Youth Hostel | Contact | Sitemap | |||||||
| Download | Source Code Example | Database Schema | Tipps and Tricks | LINQ to SQL | |||||||
|
Signumsoft .NET Object DatabaseSignumsoft .NET Object Database is a data storage solution to store object oriented data on a Microsoft SQL Server. O/R Mapping happens already on the database. The component builds a solid bridge between the object oriented world and the power of relational databases. (See also: Source Code Example) How it worksNo object relational mapping logic is needed. O/R Mapping happens with pre-generated SQL Views already on the database. Generated database SQL views are always identical to classes in program code! With .NET reflection the object structure and class hierarchy is scanned. The class hierarchy of an application is mirrored on the relational database. Therefore the relational database "knows" whether a class inherits from an other class or not. An SQL view is generated for every class. Every record in such a view represents on object instance. This enables an instant object oriented view to the database. Database structureData is stored in a generic way. Therefore the structure of the database needs never to be changed even if the object hierarchy changes and, or new fields (properties) are added to a class. No object relational mapping (ORM, O/R, OR-Mapper) is necessary! This reduces database administration to a minimum and guarantees compatibility and synchronization between the object model and the relational model. If you want to know how exactly the generic data store works: take a look behind the scene and check out the Signumsoft .NET Object Database Schema. BenefitsSignumsoft Object Database can easily be used together with .NET DataGridView components, ASP.NET Tables and reporting tools. An object oriented storage solution is guaranteed. It can also be used in connection with LINQ to SQL. (See also: Visual Studio 2008 and LINQ to SQL)
Hello World ApplicationThe Signumsoft Object Database API is provided with a simple hello world application. It's called MyHospital and contains three simple classes: Person, Patient and Doctor. The class Person contains two fields FirstName and LastName. The class Patient inherits from Person. Since a Patient is sick, it has a field Sickness. And the class Doctor inherits from Person as well. And since a doctor gets money, it has a field Salary. He also takes care of patients. So he gets a list of patients to take care of. ClassDiagram for Hello World Application - MyHospital:
After you start the application it scannes all classes which inherit from ObjectX. Based on this information the CacheClassTree is built and the following SQL Views are generated:
Generated Database SQL Views are always identical to program code classes:
The included Hello World Application shows how to modify and persist data programmatically. It also shows how to modify data the SQL way without compromising the object oriented approach. This is possible because the generated SQL Views are identically with the classes in the code! And it shows how DataGridView can display object oriented data directly from the database! Note: If you open View_Person you will see all Persons plus all Patients again. This is true because the class Patient inherits from Person. ObjectXObjectX is the base class of all persistent classes. In order to provide your own class just inherit from ObjectX. Important: The inherited class has to implement at least one private (or public) constructor with a signature like this:
public ObjectX(Database database, Guid
objectId) This is the constructor called by Signumsoft Object Database when object gets deserialized. This allows a transparent persistence mechanism.
Lists, Dictionaries and ArraysSignumsoft Object Database API is 100% managed code and fully supports generics. Lists, Arrays and Dictionaries can be serialized and can be used in the data model. TransactionsThe Signumsoft Object Database API is based on the ADO.NET framework. The class Database provides a property SqlConnection. This can be used to call BeginTransaction, Commit or Rollback for complex business transactions. RoadmapFollowing is a list of functions and features which are planed for future versions:
Releases and DownloadsCurrent and most stable release is Signumsoft.ObjectDatabase b2.1 (Beta 2.1).
Requirements: Microsoft SQL Server 2005; .NET Framework 2.0; Visual Studio 2005 or Visual Studio 2008. Visual Studio 2008 and LINQ to SQL:Signumsoft .NET Object Database works fine with VS 2008. The following inheritance technique is NOT needed in connection with Signumsoft .NET Object Database: "LINQ to SQL supports single-table mapping, whereby an entire inheritance hierarchy is stored in a single database table. The table contains the flattened union of all possible data columns for the whole hierarchy." (Source: MSDN). The main difference between LINQ to SQL and Signumsoft .NET Object Database is this: .NET Object Database considers program code classes as the "absolute" master and the mapping happens already on the database. Inheritance has not to be defined by 'hand'. FeedbackFor feedbacks to Signumsoft .NET Object Database API and or this article please go to: Contact. Or send an email to: info@signumsoft.com. |
|||||||
| © 2008 by Signumsoft® - All rights reserved. | |||||||