Dynamic Objects
The Eloquera
DB has added magic to databases.
Dynamic objects can store and retrieve
both structured and unstructured data, seamlessly converting both into each
other.
No matter if you need add another field
or property to some of your objects - your data will accommodate magically.
Some of
the advantages using Dynamic objects:
-
Dynamic object are easy to use and to
program. No more worries about missing field or a property.
Any
number of fields of any type can be added to a dynamic object in runtime
-
Dynamic objects will auto-determine field type and will respect it. Dynamic objects will take a full care of indexing
-
Dynamic objects can cross-reference and
contain each other
-
Dynamic objects are extremely fast
-
Dynamic object can be converted on a fly to the
native object and back
-
Schema free design means ultimate flexibility
Some of
the use cases
-
Blog-software, CMS, wiki-software
-
User registration, profiles
-
Record keeping
-
Problems where data is pre-distilled or
aggregated in runtime
-
Applications where data has a variable
number of attributes of various types
Dynamic objects can be modified in
runtime and can be modified in the future with already stored data thus
providing ultimate data evolution with an extreme simplicity
Dynamic @do = new Dynamic();
@do["Title"] = "Some
title";
@do["Price"] = 14.99;
@do["DateAdded"] = DateTime.Now;
db.Store(@do);
Dynamic res = (from Dynamic d in db where d["Price"] == 14.99 select d).First<Dynamic>();
With .NET 4.0 it is possible to use with dynamic in context
dynamic @do = new
Dynamic();
@do.Title = "Some title";
@do.Price = 14.99;
@do.DateAdded = DateTime.Now;
db.Store(@do);
dynamic res = (from
Dynamic d in
db where d["Price"] == 14.99 select d).First<Dynamic>();
Please note that with LINQ it is
required to use d["Price"] to enforce
expression tree building.
It is possible to discover all fields
that dynamic object contains
Dynamic @do = dynamics[0];
foreach (var field in
@do)
{
Console.WriteLine(String.Format("Field Name {0} Value {1} Type {2}", field.Key, field.Value, field.Type));
}
These are reserved symbols in the field
name, they were chosen to allow SQL queries and to avoid reserved symbols clash
.,%][+-$!*()