tag:blogger.com,1999:blog-56795900757335905812024-03-19T04:55:02.780+00:00Old OrientDB BlogThis was the old OrientDB Blog, but it isn't maintained anymore. All the posts were moved to <a href="http://orientdb.com/blog">OrientDB Blog</a>.Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-5679590075733590581.post-26511290441120746032013-12-27T10:27:00.003+00:002013-12-27T10:27:51.150+00:00Posts copied to http://www.orientechnologies.com/blog <div dir="ltr" style="text-align: left;" trbidi="on">
London, December 27th 2013<br />
<br />
Now the new web site <a href="http://www.orientechnologies.com/">www.orientechnologies.com</a> is online, we've copied all the posts to the web site's Blog section:<br />
<br />
<a href="http://www.orientechnologies.com/blog/">http://www.orientechnologies.com/blog/</a><br />
<br />
This blogger will not be updated anymore.<br />
<br />
Luca Garulli<br />
CEO at Orient Technologies<br />
the Company behind OrientDB<br />
http://about.me/luca.garulli<br />
<div>
<br /></div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-14418976881961617512013-12-20T15:03:00.000+00:002013-12-20T15:06:06.559+00:00OrientDB: working with types<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;">London, December 20th 2013</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">OrientDB Team is working on SQL language to provide more powerful functions to works against types. Since OrientDB can work in schema-less mode, it's hard to know the real type of a value. For example when you work with numbers, you could have different type stored. How to know if a number is a Long or an Integer?</span><br />
<h4 style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;"><u><b>.type() method</b></u></span><u style="font-family: Arial, Helvetica, sans-serif;"><b> (since 2.0)</b></u></h4>
<span style="font-family: Arial, Helvetica, sans-serif;">Here comes the new <b>type()</b> method (all these methods are available on 2.0-SNAPSHOT, "develop" branch), that returns the OrientDB type of a value. Let's try it against the ROLES property of OUser class.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">select roles.type() from ouser</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<table class="table table-striped table-bordered table-hover table-condensed" ng-show="headers" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-bottom-style: solid; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-spacing: 0px; border-top-color: rgb(221, 221, 221); border-top-left-radius: 4px; border-top-right-radius: 4px; border-top-style: solid; border-width: 1px 1px 1px 0px; color: #333333; line-height: 20px; margin-bottom: 20px; max-width: 100%; width: 100%;"><thead>
<tr><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-left-radius: 4px; border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif;">@rid</span></th><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif;">@version</span></th><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-right-radius: 4px; border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif;">roles</span></th></tr>
</thead><tbody>
<tr class="ng-scope" ng-repeat="result in results"><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-bottom-left-radius: 4px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;"><a href="http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/-2:1" style="color: #0088cc; text-decoration: none;"><span style="font-family: Arial, Helvetica, sans-serif;">#-2:1</span></a></td><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif;">0</span></td><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-bottom-right-radius: 4px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif;">LINKSET</span></td></tr>
</tbody></table>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">It's an LINKSET!</span></div>
<div>
<i><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></i></div>
<div>
<i><span style="font-family: Arial, Helvetica, sans-serif;">NOTE: .type() method works on the SQL pipeline, so it doesn't access to the stored type, but the type loaded in memory and in case of SET, LIST and MAP sometimes can't distinguish between EMBEDDED types and LINK types.</span></i></div>
<div>
<h4>
<span style="font-family: Arial, Helvetica, sans-serif;"><u><b>.javaType() method (since 2.0)</b></u></span></h4>
</div>
<div style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;">When you want to know the respective Java class, you can use the method .javaType(), example:</span></div>
<div style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<span style="font-family: Courier New, Courier, monospace;">select roles.javaType() from ouser</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<table class="table table-striped table-bordered table-hover table-condensed" ng-show="headers" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-bottom-style: solid; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-spacing: 0px; border-top-color: rgb(221, 221, 221); border-top-left-radius: 4px; border-top-right-radius: 4px; border-top-style: solid; border-width: 1px 1px 1px 0px; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14.399999618530273px; line-height: 20px; margin-bottom: 20px; max-width: 100%; width: 100%;"><thead>
<tr><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-left-radius: 4px; border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;">@rid</th><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;">@version</th><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-right-radius: 4px; border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;">roles</th></tr>
</thead><tbody>
<tr class="ng-scope" ng-repeat="result in results"><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-bottom-left-radius: 4px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;"><a href="http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/-2:1" style="color: #0088cc; text-decoration: none;">#-2:1</a></td><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;">0</td><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-bottom-right-radius: 4px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;">com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet</td></tr>
</tbody></table>
</div>
<div>
<div style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;">Now we can access to the type it would be cool to convert values at the fly. OrientDB already has few methods to to this:</span></div>
<div style="text-align: left;">
</div>
<ul style="text-align: left;">
<li><span style="font-family: Arial, Helvetica, sans-serif;">asBoolean()</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">asDate()</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">asDateTime()</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">asDecimal()</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">asFloat()</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">asInteger()</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">asList()</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">asLong()</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">asSet()</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">asString()</span></li>
</ul>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">But we've implemented a generic convert(<type>) method to convert values dynamically.</span></div>
<br />
<h4>
<span style="font-family: Arial, Helvetica, sans-serif;"><u><b>.convert(<type>) method</b></u></span><u style="font-family: Arial, Helvetica, sans-serif;"><b> (since 2.0)</b></u></h4>
</div>
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
</div>
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;">convert() accepts as unique, mandatory, parameter the OrientDB type (OType enumeration) or any Java type recognized by OrientDB. Example using the STRING OrientDB type:</span></div>
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<span style="font-family: Courier New, Courier, monospace;">select roles.convert(STRING) from ouser</span><br />
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<table class="table table-striped table-bordered table-hover table-condensed" ng-show="headers" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-bottom-style: solid; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-spacing: 0px; border-top-color: rgb(221, 221, 221); border-top-left-radius: 4px; border-top-right-radius: 4px; border-top-style: solid; border-width: 1px 1px 1px 0px; color: #333333; line-height: 20px; margin-bottom: 20px; max-width: 100%; width: 100%;"><thead>
<tr><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-left-radius: 4px; border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif;">@rid</span></th><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif;">@version</span></th><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-right-radius: 4px; border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif;">roles</span></th></tr>
</thead><tbody>
<tr class="ng-scope" ng-repeat="result in results"><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-bottom-left-radius: 4px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;"><a href="http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/-2:1" style="color: #0088cc; text-decoration: none;"><span style="font-family: Arial, Helvetica, sans-serif;">#-2:1</span></a></td><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif;">0</span></td><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-bottom-right-radius: 4px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif;">[#4:0=#4:0]</span></td></tr>
</tbody></table>
</div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">And the same using the Java type:</span></div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">select roles.convert(java.lang.String) from ouser</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<table class="table table-striped table-bordered table-hover table-condensed" ng-show="headers" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-bottom-style: solid; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-spacing: 0px; border-top-color: rgb(221, 221, 221); border-top-left-radius: 4px; border-top-right-radius: 4px; border-top-style: solid; border-width: 1px 1px 1px 0px; color: #333333; line-height: 20px; margin-bottom: 20px; max-width: 100%; width: 100%;"><thead>
<tr><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-left-radius: 4px; border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif;">@rid</span></th><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif;">@version</span></th><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-right-radius: 4px; border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif;">roles</span></th></tr>
</thead><tbody>
<tr class="ng-scope" ng-repeat="result in results"><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-bottom-left-radius: 4px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;"><a href="http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/-2:1" style="color: #0088cc; text-decoration: none;"><span style="font-family: Arial, Helvetica, sans-serif;">#-2:1</span></a></td><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif;">0</span></td><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-bottom-right-radius: 4px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif;">[#4:0=#4:0]</span></td></tr>
</tbody></table>
<span style="font-family: Arial, Helvetica, sans-serif;">Since the type is an EMBEDDEDSET, the more interesting thing is converting into a list to get the first value. Example:</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">select roles.convert(EMBEDDEDLIST)[0] from ouser</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<table class="table table-striped table-bordered table-hover table-condensed" ng-show="headers" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-bottom-style: solid; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-spacing: 0px; border-top-color: rgb(221, 221, 221); border-top-left-radius: 4px; border-top-right-radius: 4px; border-top-style: solid; border-width: 1px 1px 1px 0px; color: #333333; line-height: 20px; margin-bottom: 20px; max-width: 100%; width: 100%;"><thead>
<tr><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-left-radius: 4px; border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif;">@rid</span></th><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif;">@version</span></th><th class="ng-scope ng-binding" ng-repeat="header in headers" style="background-attachment: scroll; background-color: #dddddd; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-right-radius: 4px; border-top-width: 0px; padding: 2px 5px; position: relative; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif;">roles</span></th></tr>
</thead><tbody>
<tr class="ng-scope" ng-repeat="result in results"><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-bottom-left-radius: 4px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;"><a href="http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/-2:1" style="color: #0088cc; text-decoration: none;"><span style="font-family: Arial, Helvetica, sans-serif;">#-2:1</span></a></td><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif;">0</span></td><td class="ng-scope ng-binding" ng-repeat="header in headers" ridrender="" style="background-color: #f9f9f9; border-bottom-right-radius: 4px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; padding: 4px 5px; vertical-align: top;"><a href="http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/4:0" style="color: #0088cc; text-decoration: none;"><span style="font-family: Arial, Helvetica, sans-serif;">#4:0</span></a></td></tr>
</tbody></table>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Happy Christmas!</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Luca Garulli</span></div>
<span style="font-family: Arial, Helvetica, sans-serif;">
</span>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">CEO at Orient Technologies</span></div>
<span style="font-family: Arial, Helvetica, sans-serif;">
<div>
the Company behind OrientDB</div>
<div>
http://about.me/luca.garulli<br />
<br /></div>
</span></div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-72920567013134304692013-12-19T15:59:00.000+00:002013-12-19T16:01:54.038+00:00OrientDB: improved SQL filtering<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white; color: #222222;"><span style="font-family: Arial, Helvetica, sans-serif;">London, December 19th 2013</span></span><br />
<span style="background-color: white; color: #222222;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span>
<br />
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;">The more developers use OrientDB, the more use case we receive. One of the most wanted requirements is improving filtering of results, specially on traversing.</span></div>
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;">The OrientDB SQL dialect is powerful enough to mix <b>SELECT</b> and <b>TRAVERSE</b> to create very complex queries, but sometimes such queries are pretty big and hard to read.</span></div>
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;">For this reason we developed the <b>pipeline filtering</b> using <b>brackets</b>, by extending current SQL engine.</span></div>
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; color: #222222;">
<b><span style="font-family: Arial, Helvetica, sans-serif;">Examples</span></b></div>
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; color: #222222;">
<u><span style="font-family: Arial, Helvetica, sans-serif;">Example 1: Get the first friend of mine</span></u></div>
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;">You can get it by using:</span></div>
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; color: #222222;">
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">select expand( out ) from (</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"> select out('Friend') from Profile where name = 'Luca'</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">) limit 1</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"> </span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">But now you can also do this:</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">select out('Friend')<b>[0]</b> from Profile where name = 'Luca'</span><br />
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Much easier and faster on execution!</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
</div>
<div>
<u><span style="font-family: Arial, Helvetica, sans-serif;">Example 2: from GratefulDeadConcerts database traverse all the out() connection and get the first song called 'MONA'</span></u></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">select from (</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"> select expand( out() ) from V</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">) where name = 'MONA' and type = 'song' limit 1</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<table style="border-bottom-color: rgb(221, 221, 221); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-bottom-style: solid; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-spacing: 0px; border-top-color: rgb(221, 221, 221); border-top-left-radius: 4px; border-top-right-radius: 4px; border-top-style: solid; border-width: 1px 1px 1px 0px; color: #333333; line-height: 20px; margin-bottom: 20px; max-width: 100%; width: 100%;"><thead>
<tr><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-left-radius: 4px; border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">@rid</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">@version</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">@class</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">name</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">in_followed_by</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">song_type</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">performances</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">type</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">out_followed_by</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">out_sung_by</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-right-radius: 4px; border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">out_written_by</span></th></tr>
</thead><tbody>
<tr><td style="background-color: #f9f9f9; border-bottom-left-radius: 4px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><a href="http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/9:6" style="color: #0088cc; text-decoration: none;" target="_blank"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">#9:6</span></a></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">19</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">V</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">MONA</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">[2]</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">cover</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">1</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">song</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">[2]</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">[1]</span></td><td style="background-color: #f9f9f9; border-bottom-right-radius: 4px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">[1]</span></td></tr>
</tbody></table>
</div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Executed in <b>0.455</b> seconds.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Now let's use the new way:</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace;">select expand( out()<b>[name='MONA'][type='song'<wbr></wbr>]</b> ) from V</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<table style="border-bottom-color: rgb(221, 221, 221); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-bottom-style: solid; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-spacing: 0px; border-top-color: rgb(221, 221, 221); border-top-left-radius: 4px; border-top-right-radius: 4px; border-top-style: solid; border-width: 1px 1px 1px 0px; color: #333333; line-height: 20px; margin-bottom: 20px; max-width: 100%; width: 100%;"><thead>
<tr><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-left-radius: 4px; border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">@rid</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">@version</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">@class</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">name</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">in_followed_by</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">song_type</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">performances</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">type</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">out_followed_by</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">out_sung_by</span></th><th style="background-color: #dddddd; background-image: none; background-repeat: repeat repeat; border-bottom-color: rgb(196, 196, 196); border-left-color: rgb(196, 196, 196); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(196, 196, 196); border-top-right-radius: 4px; border-top-width: 0px; padding: 2px 5px; vertical-align: bottom;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">out_written_by</span></th></tr>
</thead><tbody>
<tr><td style="background-color: #f9f9f9; border-bottom-left-radius: 4px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><a href="http://localhost:2480/studio/index.html#/database/GratefulDeadConcerts/browse/edit/9:6" style="color: #0088cc; text-decoration: none;" target="_blank"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">#9:6</span></a></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">19</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">V</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">MONA</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">[2]</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">cover</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">1</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">song</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">[2]</span></td><td style="background-color: #f9f9f9; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">[1]</span></td><td style="background-color: #f9f9f9; border-bottom-right-radius: 4px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; margin: 0px; padding: 4px 5px; vertical-align: top;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">[1]</span></td></tr>
</tbody></table>
</div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Executed in <b>0.106 </b>seconds.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Note last execution, in this case, is 4x faster!</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Squared brackets [] allow to:</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">- filtering by <b>one</b> index, example </span><span style="font-family: Courier New, Courier, monospace;">out()[0]</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">- filtering by <b>multiple</b> indexes, example </span><span style="font-family: Courier New, Courier, monospace;">out()[0,2,4]</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">- filtering by <b>ranges</b>, example </span><span style="font-family: Courier New, Courier, monospace;">out()[0-9]</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">- filtering by equal <b>conditions</b> (only equals is supported), example </span><span style="font-family: Courier New, Courier, monospace;">out()[@class = 'Person']</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Brackets [] can be chained, in this case it's like filtering by <b>AND</b> operator. Look at the Example 2.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">For more information about the issue: <a href="https://github.com/orientechnologies/orientdb/issues/1888" style="color: #1155cc;" target="_blank">https://github.com/<wbr></wbr>orientechnologies/orientdb/<wbr></wbr>issues/1888</a></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">This is available in "develop" branch right now and will be part of next release.</span></div>
</div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<span class="HOEnZb adL" style="background-color: white; color: #222222;"><span style="color: #888888; font-family: Arial, Helvetica, sans-serif;"></span></span><br />
<div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Luca Garulli</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">CEO at Orient Technologies</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">the Company behind OrientDB</span></div>
<div>
<a href="http://about.me/luca.garulli" style="color: #1155cc;" target="_blank"><span style="font-family: Arial, Helvetica, sans-serif;">http://about.me/luca.garulli</span></a></div>
</div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-90111657334564731552013-12-09T18:03:00.001+00:002013-12-09T18:03:10.039+00:00Released OrientDB 1.6.2<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><span style="color: #262626; line-height: 16px;">London, </span></span><span style="color: #262626; font-family: Arial, Helvetica, sans-serif; line-height: 16px;">December 9th, 2013</span><br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><span style="color: #262626; line-height: 16px;"><br /></span></span>
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><span style="color: #262626; line-height: 16px;"><br /></span></span>
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><span style="color: #262626; line-height: 16px;">Orient Technologies has </span><span style="background-color: #ffffcc; line-height: 16px;">released</span><span style="color: #262626; line-height: 16px;"> </span><span style="color: #262626; line-height: 16px;">OrientDB v1.6.2. This is a hot-fix for v1.6.1 containing fixes for 22 issues. This is the <a href="https://github.com/orientechnologies/orientdb/issues?milestone=11&page=1&state=closed">Change Log</a>.</span></span><br />
<br /></div>
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #262626;"><span style="line-height: 16px;">To download it go to </span></span><span style="color: #262626; line-height: 16px;"><a href="http://www.orientdb.org/download.htm" style="color: #1155cc; font-weight: bold;" target="_blank">http://www.orientdb.org/<wbr></wbr>download.htm</a> or update your <b>Maven pom.xml</b> to point to the version 1.6.2</span><b style="color: #262626; line-height: 16px;">.</b></span></div>
<div style="background-color: white; color: #222222;">
<br /></div>
<div style="background-color: white;">
<div style="color: #222222;">
<b><span style="font-family: Arial, Helvetica, sans-serif;">Next Online course</span></b></div>
<div style="color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;">Do you wish to attendee a OrientDB course, but you can't get 2 entire days off? Well, we've created a new format for the Online course, the "<i>A week in Graphs</i>" course. about 2 hours each day for 5 days. Apply now to the December edition to get the Early Bird price at £ 250.00 for the entire course:</span></div>
<div style="color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><a href="https://www.eventbrite.co.uk/e/a-week-in-graphs-orientdb-master-development-on-line-course-dec-16-20-registration-8992134717">https://www.eventbrite.co.uk/e/a-week-in-graphs-orientdb-master-development-on-line-course-dec-16-20-registration-8992134717</a></span></div>
<div style="color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;">Have fun with Documents & Graphs.</span></div>
</div>
<div style="background-color: white; color: #222222;">
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Luca Garulli</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">CEO at Orient Technologies</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">the Company behind OrientDB</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://about.me/luca.garulli" style="color: #1155cc;" target="_blank">http://about.me/luca.garulli</a></span><br />
<br /></div>
</div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-7863829508963234292013-11-27T14:42:00.000+00:002013-11-27T14:42:42.357+00:00New survey, help us to improve OrientDB with your feedback!<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;">London, November 27th 2013</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">The OrientDB Open Source project has been built following the users' needs. This survey will help OrientDB team to build a better product based on the received feedbacks. Thank you in advance for your time.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<a href="https://docs.google.com/forms/d/1sne36Nzf2hBPQU6rVy4HBRnd9-p-Ztu9-yeNQum5K2E/viewform"><span style="font-family: Arial, Helvetica, sans-serif;">https://docs.google.com/forms/d/1sne36Nzf2hBPQU6rVy4HBRnd9-p-Ztu9-yeNQum5K2E/viewform</span></a><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Luca Garulli</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">CEO at Orient Technologies</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">the Company behind OrientDB</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">http://about.me/luca.garulli</span><br />
<div>
<br /></div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-46783316992830735032013-11-21T16:39:00.003+00:002013-11-21T16:39:53.182+00:00Released OrientDB v 1.6.1: bugs fixed and some improvements in performance<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #262626; line-height: 16px;">Orient Technologies has </span><span style="background-color: #ffffcc; line-height: 16px;">released</span><span style="color: #262626; line-height: 16px;"> </span><span style="color: #262626; line-height: 16px;">OrientDB v1.6.1. This is a hot-fix for v1.6 so this email will be shorter than usual.</span></span></div>
<div style="background-color: white; color: #222222;">
<span style="color: #262626; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 16px;"><br /></span></span></div>
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #262626;"><span style="line-height: 16px;">To download it goto </span></span><b style="color: #262626; line-height: 16px;"><a href="http://www.orientdb.org/download.htm" style="color: #1155cc;" target="_blank">http://www.orientdb.org/<wbr></wbr>download.htm</a>.</b></span></div>
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; color: #222222;">
<span style="color: #262626; line-height: 16px;"><b><span style="font-family: Arial, Helvetica, sans-serif;">What's new</span></b></span></div>
<div style="background-color: white; color: #222222;">
<ul>
<li style="margin-left: 15px;"><span style="color: #262626; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 16px;">Starting from 1.6.1 OrientDB is distributed in 2 ways:</span></span></li>
<ul>
<li style="margin-left: 15px;"><span style="color: #262626; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 16px;"><b>TAR.GZ</b> for Linux, MacOSX and Unix in general</span></span></li>
<li style="margin-left: 15px;"><span style="color: #262626; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 16px;"><b>ZIP</b> for Windows users</span></span></li>
</ul>
<li style="margin-left: 15px;"><span style="color: #262626; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 16px;"><b>Studio</b> plugin is bundled in server/plugins directory</span></span></li>
<li style="margin-left: 15px;"><span style="color: #262626; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 16px;">The build process now generates a 100% complete OrientDB installation, so get the source code from GitHub (<a href="https://github.com/orientechnologies/orientdb/tree/develop" style="color: #1155cc;" target="_blank">https://github.com/<wbr></wbr>orientechnologies/orientdb/<wbr></wbr>tree/develop</a>) and execute "ant clean install". Now the GratefulDeadConcerts database is automatically generated.</span></span></li>
<li style="margin-left: 15px;"><span style="color: #262626; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 16px;">We've improved <b>performance</b> with SBTree indexes and plocal in general</span></span></li>
</ul>
</div>
<div style="background-color: white; color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;">Full list of closed <span style="background-color: #ffffcc;">issues</span>: <span style="color: #1155cc;"><u><a href="https://github.com/orientechnologies/orientdb/issues?milestone=10&page=1&state=closed" style="color: #1155cc;" target="_blank">https://github.com/<wbr></wbr>orientechnologies/orientdb/<wbr></wbr>issues?milestone=10&page=1&<wbr></wbr>state=closed</a></u></span></span></div>
<div style="background-color: white; color: #222222;">
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<b><span style="font-family: Arial, Helvetica, sans-serif;">Next Online course</span></b></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Do you wish to attendee a OrientDB course, but you can't get 2 entire days off? Well, we've created a new format for the Online course, the "<i>A week in Graphs</i>" course. about 2 hours each day for 5 days. Apply now to the December edition to get the Early Bird price:</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://www.eventbrite.co.uk/e/a-week-in-graphs-orientdb-master-development-on-line-course-dec-16-20-registration-8992134717" style="color: #1155cc;" target="_blank">http://www.eventbrite.co.uk/e/<wbr></wbr>a-week-in-graphs-orientdb-<wbr></wbr>master-development-on-line-<wbr></wbr>course-dec-16-20-registration-<wbr></wbr>8992134717</a></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Have fun with Graphs,</span></div>
</div>
<div style="background-color: white; color: #222222;">
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Luca Garulli</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">CEO at Orient Technologies</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">the Company behind OrientDB</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://about.me/luca.garulli" style="color: #1155cc;" target="_blank">http://about.me/luca.garulli</a></span></div>
</div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-59266371629435555042013-11-19T14:58:00.005+00:002013-11-21T16:40:09.946+00:00New online course: no more excuses to get skilled on OrientDB Graph Database!<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="color: #222222;">
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">After a lot of feedbacks, we've changed the online training program by providing it during 5 days (2 hours each day) instead of 2 days full immersion. This allows to the developers to:</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">- take the course even if they're working (no more days off or holidays)</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">- do more exercises between the course days</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">This is the link:</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<a href="http://www.eventbrite.co.uk/e/orientdb-master-development-on-line-course-16-20-dec-2013-registration-8992134717" style="color: #1155cc;" target="_blank"><span style="font-family: Arial, Helvetica, sans-serif;">http://www.eventbrite.co.uk/e/<wbr></wbr>orientdb-master-development-<wbr></wbr>on-line-course-16-20-dec-2013-<wbr></wbr>registration-8992134717</span></a></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Hurry up to get the early-bird price!</span></div>
</div>
<div style="color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="color: #222222;">
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Luca Garulli</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">CEO at Orient Technologies</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">the Company behind OrientDB</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">http://about.me/luca.garulli</span></div>
<div>
<br /></div>
</div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-76511992399716898042013-11-18T14:26:00.004+00:002013-11-18T14:26:50.063+00:00Orient Technologies LTD is hiring: 5 open positions<div dir="ltr" style="text-align: left;" trbidi="on">
London, November 18th 2013<br />
<br />
Orient Technologies LTD is hiring! We're looking at 2 kind of profiles:<br />
<br />
<ul style="text-align: left;">
<li><b>Technical Service Engineer, 1 Open position</b></li>
<li><b>Sales Executives, 4 Open positions</b></li>
</ul>
<br />
Look at the those open positions and apply it if you meet the requirements:<br />
<br />
<a href="http://www.orientechnologies.com/careers.htm">http://www.orientechnologies.com/careers.htm</a><br />
<br />
Luca Garulli<br />
CEO at Orient Technologies<br />
the Company behind OrientDB<br />
http://about.me/luca.garulli<br />
<br /></div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-58013698464869552552013-11-05T11:12:00.000+00:002013-11-21T16:40:20.140+00:00OrientDB becomes Distributed using Hazelcast, Leading Open Source In-Memory Data Grid<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="background-color: white; border: 0px; color: #4a4a4a; line-height: 24px; margin-bottom: 1.615em; outline: 0px; padding: 0px; vertical-align: baseline;">
<strong style="border: 0px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><span style="font-family: Arial, Helvetica, sans-serif;">OrientDB becomes Distributed using Hazelcast, Leading Open Source In-Memory Data Grid</span></strong></div>
<div dir="ltr" style="background-color: white; border: 0px; color: #4a4a4a; line-height: 24px; margin-bottom: 1.615em; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="font-family: Arial, Helvetica, sans-serif;">Elastic Distributed scalability added to OrientDB, a Graph Database that support hybrid Document Database features</span></div>
<div dir="ltr" style="background-color: white; border: 0px; color: #4a4a4a; line-height: 24px; margin-bottom: 1.615em; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="font-family: Arial, Helvetica, sans-serif;"><strong style="border: 0px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">London, UK</strong> – <a href="http://www.orientechnologies.com/" style="border: 0px; color: #1982d1; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Orient Technologies</a> (<a href="http://www.orientechnologies.com/" style="border: 0px; color: #1982d1; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">http://www.orientechnologies.com/</a>) and <a href="http://hazelcast.com/" style="border: 0px; color: #1982d1; font-style: inherit; line-height: 24px; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Hazelcast</a><span style="line-height: 24px;"> </span><span style="line-height: 24px;">(</span><a href="http://www.hazelcast.com/" style="border: 0px; color: #1982d1; font-style: inherit; line-height: 24px; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">http://www.hazelcast.com</a><span style="line-height: 24px;">) </span><span style="line-height: 24px;">today announced that OrientDB has gained a multi-master replication feature powered by Hazelcast.</span></span></div>
<div dir="ltr" style="background-color: white; border: 0px; color: #4a4a4a; line-height: 24px; margin-bottom: 1.615em; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="font-family: Arial, Helvetica, sans-serif;">Clustering multiple server nodes is the most significant feature of OrientDB 1.6. Databases can be replicated across heterogeneous server nodes in multi-master mode achieving the best of scalability and performance.</span></div>
<div dir="ltr" style="background-color: white; border: 0px; color: #4a4a4a; line-height: 24px; margin-bottom: 1.615em; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="font-family: Arial, Helvetica, sans-serif;">“I think one of the added value of OrientDB against all the NoSQL products is the usage of Hazelcast while most of the others use Yahoo ZooKeeper to manage the cluster (discovery, split brain network, etc) and something else for the transport layer.” said Luca Garulli, CEO of Orient Technologies. “With ZooKeeper configuration is a nightmare, while Hazelcast let you to add OrientDB servers with ZERO configuration. This has been a big advantage for our clients and everything is much more ‘elastic’, specially when deployed on the Cloud. We’ve used Hazelcast not only for the auto-discovery, but also for the transport layer. Thanks to this new architecture all our clients can scale up horizontally by adding new servers without stopping or reconfigure the cluster”.</span></div>
<div dir="ltr" style="background-color: white; border: 0px; color: #4a4a4a; line-height: 24px; margin-bottom: 1.615em; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="font-family: Arial, Helvetica, sans-serif;">“We are amazed by the speed with which OrientDB has adopted Hazelcast and we are delighted to see such excellent technologists teaming up with Hazelcast.” said Talip Ozturk, CEO of Hazelcast. “We work hard to make the best open source in-memory data grid on the market and are happy to see it being used in this way.”</span></div>
<div dir="ltr" style="background-color: white; border: 0px; color: #4a4a4a; line-height: 24px; margin-bottom: 1.615em; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="font-family: Arial, Helvetica, sans-serif;">Both Hazelcast and Orient Technologies are providing professional open source support to their respective projects under the Apache software license.</span></div>
<div dir="ltr" style="background-color: white; border: 0px; color: #4a4a4a; line-height: 24px; margin-bottom: 1.615em; outline: 0px; padding: 0px; vertical-align: baseline;">
<strong style="border: 0px; font-style: inherit; line-height: 24px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><span style="font-family: Arial, Helvetica, sans-serif;">About Orient Technologies</span></strong></div>
<div dir="ltr" style="background-color: white; border: 0px; color: #4a4a4a; line-height: 24px; margin-bottom: 1.615em; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="font-family: Arial, Helvetica, sans-serif;">Orient Technologies is the company behind the NoSQL project <a href="http://www.orientdb.org/" style="border: 0px; color: #1982d1; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">OrientDB</a>, the Graph Database with a hybrid model taken from both the <a href="https://en.wikipedia.org/wiki/Document-oriented_database" style="border: 0px; color: #1982d1; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Document Database</a> and Object Orientation worlds. <a href="http://www.orientdb.org/" style="border: 0px; color: #1982d1; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">OrientDB</a> is FREE for any purpose even commercial because is released under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html" style="border: 0px; color: #1982d1; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Apache2 License</a>. Orient Technologies offers commercial services against OrientDB for companies who want <a href="http://www.orientechnologies.com/support.htm" style="border: 0px; color: #1982d1; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">support</a>, <a href="http://www.orientechnologies.com/training.htm" style="border: 0px; color: #1982d1; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">training</a> and <a href="http://www.orientechnologies.com/consulting.htm" style="border: 0px; color: #1982d1; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">consulting</a>.</span></div>
<div dir="ltr" style="background-color: white; border: 0px; color: #4a4a4a; line-height: 24px; margin-bottom: 1.615em; outline: 0px; padding: 0px; vertical-align: baseline;">
<strong style="border: 0px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><span style="font-family: Arial, Helvetica, sans-serif;">About Hazelcast</span></strong></div>
<div dir="ltr" style="background-color: white; border: 0px; color: #4a4a4a; line-height: 24px; margin-bottom: 1.615em; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 24px;">Hazelcast (</span><a href="http://www.hazelcast.com/" style="border: 0px; color: #1982d1; font-style: inherit; line-height: 24px; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">www.hazelcast.com</a><span style="line-height: 24px;">) develops, distributes and supports the leading open source in-memory data grid. The product, also called Hazelcast, is a free open source download under the Apache license that any developer can include in minutes to enable them to build elegantly simple mission-critical, transactional, and terascale in-memory applications. The company provides commercially licensed Enterprise editions, Hazelcast Management Console and professional open source training, development support and deployment support. The company is privately held and headquartered in Palo Alto, California.</span></span></div>
<div dir="ltr" style="background-color: white; border: 0px; color: #4a4a4a; line-height: 24px; margin-bottom: 1.615em; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="font-family: Arial, Helvetica, sans-serif;">Keywords: Hazelcast, In-memory data grid, Document Database, Object Database, In-memory Database, computing, big data, NoSQL, grid computing, Apache License, Open Source</span></div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-47658123719963661322013-10-31T19:27:00.001+00:002013-11-21T16:40:30.336+00:00Orient Technologies has a Halloween Treat for you: OrientDB v1.6!<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white; color: #222222;">
<span style="color: #262626; font-family: Arial, Helvetica, sans-serif; line-height: 16px;">Happy Halloween! Trick or Treat?</span></div>
<div style="background-color: white; color: #222222;">
<span style="color: #262626; font-family: Arial, Helvetica, sans-serif; line-height: 16px;"><br /></span></div>
<div style="background-color: white; color: #222222;">
<span style="color: #262626; font-family: Arial, Helvetica, sans-serif; line-height: 16px;">Orient Technologies has just released OrientDB v1.6. </span></div>
<div style="background-color: white; color: #222222;">
<span style="color: #262626;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 16px;"><br /></span></span></div>
<div style="background-color: white; color: #222222;">
<span style="color: #262626;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 16px;"><b><a href="http://www.orientdb.org/download.htm" style="color: #1155cc;" target="_blank">http://www.orientdb.org/<wbr></wbr>download.htm</a></b></span></span></div>
<div style="background-color: white; color: #222222;">
<span style="color: #262626; font-family: Arial, Helvetica, sans-serif; line-height: 16px;"><br /></span></div>
<div style="background-color: white; color: #222222;">
<span style="color: #262626; font-family: Arial, Helvetica, sans-serif; line-height: 16px;">What's new? First of all we joined the Standard Edition and Graph Edition in just "<b>Community Edition</b>". By default it contains all the components to use OrientDB as Graph Database. if you want to use it as embedded as pure Document Database just link the needed jars only.</span></div>
<div style="background-color: white; color: #222222;">
<span style="color: #262626; font-family: Arial, Helvetica, sans-serif; line-height: 16px;"><br /></span></div>
<div style="background-color: white; color: #222222;">
<span style="color: #262626; font-family: Arial, Helvetica, sans-serif; line-height: 16px;"><b>Community Edition</b></span></div>
<div style="background-color: white; color: #222222;">
<span style="color: #262626; font-family: Arial, Helvetica, sans-serif; line-height: 16px;"><br /></span></div>
<div style="background-color: white; color: #222222;">
<span style="color: #262626; font-family: Arial, Helvetica, sans-serif; line-height: 16px;">Community Edition means the FREE version of OrientDB with all the features you already knows and something news:</span></div>
<div style="background-color: white; color: #222222;">
<div>
<ul>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>SBTree</b>: new index engine with the support for transactions and range queries</span></li>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>Distributed</b>: new Architecture based on Hazelcast, new Distributed Transaction support across nodes, new Database Sharding feature</span></li>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>Studio</b>: total rewriting in a new tool hosted on separate project</span></li>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>HTTP</b>: execute commands in batch mode, partial document updates, JSON as return of create and update documents, management of multi databases in the same connection</span></li>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>Scripts</b>: new "<span style="background-color: #ffffcc;">Orient"</span> variable to get database instances, new switchUser() API to change current user</span></li>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>Plugins</b>: new hot deployment plugin as folders, zip and jar files</span></li>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>SQL</b>: new target "metadata" to retrieve schema and indexes</span></li>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>Console</b>: new silent mode</span></li>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;">Many features and performance improvements on plocal and hash indexes</span></li>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;">Bug fixing</span></li>
</ul>
</div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Full list of closed <span style="background-color: #ffffcc;">issues</span>: <a href="https://github.com/orientechnologies/orientdb/issues?milestone=8&state=closed" style="color: #1155cc;" target="_blank">https://github.<wbr></wbr>com/orientechnologies/<span style="background-color: #ffffcc; color: #222222;">orientdb</span><wbr></wbr>/<span style="background-color: #ffffcc; color: #222222;">issues</span>?milestone=8&state=<wbr></wbr>closed</a></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<b><span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://www.orientechnologies.com/enterprise.htm" style="color: #1155cc;" target="_blank"><img src="https://mail.google.com/mail/u/0/images/cleardot.gif" />Enterprise Edition</a><a href="http://www.blogger.com/blogger.g?blogID=5679590075733590581"></a></span></b></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">This Edition is commercial licensed and it's based on Community Edition with additional features like:</span></div>
<ul>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>Workbench</b>, as a centralized cockpit to manage multiple servers</span></li>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>SQL Profiler</b>, to tune the database based on usage patterns</span></li>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>Metric Analyzer</b>, to monitor and analyze metrics</span></li>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>Configurable Alerts</b>, to get notified when a node is unreachable or when a metric breaks a configurable threshold</span></li>
<li style="margin-left: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>Production support available</b> on demand (see below)</span></li>
</ul>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><b><a href="http://www.orientechnologies.com/enterprise.htm" style="color: #1155cc;" target="_blank"><img src="https://mail.google.com/mail/u/0/images/cleardot.gif" />Enterprise Edition</a></b> costs £ 1,000.00 per server/year or £ 500,00 for startups. For more information goto: <b><a href="http://www.orientechnologies.com/enterprise.htm" style="color: #1155cc;" target="_blank"><img src="https://mail.google.com/mail/u/0/images/cleardot.gif" />Enterprise Edition</a>.</b><b><br /></b></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<b><span style="font-family: Arial, Helvetica, sans-serif;">Production Support</span></b></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Starting form v1.6 Orient Technologies gives support only against <b><a href="http://www.orientechnologies.com/enterprise.htm" style="color: #1155cc;" target="_blank">Enterprise Editions</a></b> that are tested on multiple platforms and certified. </span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">If you purchase the Production Support, the <b><a href="http://www.orientechnologies.com/enterprise.htm" style="color: #1155cc;" target="_blank">Enterprise Edition</a></b> is <b>FREE</b>.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<b><span style="font-family: Arial, Helvetica, sans-serif;">Hot-fixes</span></b></div>
<div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">All the pending major/critical <span style="background-color: #ffffcc;">issues</span> will be fixed in hot-fix releases (like <span style="background-color: #ffffcc;">1.6</span>.1, <span style="background-color: #ffffcc;">1.6</span>.2, etc.) planned about every week if needed.</span></div>
</div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Have fun tonight with <i>ghosts and graphs</i>!</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="HOEnZb adL"><span style="color: #888888;"></span></span><br /></span>
<div>
<div>
<span class="HOEnZb adL"><span style="color: #888888; font-family: Arial, Helvetica, sans-serif;">Luca Garulli</span></span></div>
<div>
<span class="HOEnZb adL"><span style="color: #888888; font-family: Arial, Helvetica, sans-serif;">CEO at Orient Technologies</span></span></div>
<div>
<span class="HOEnZb adL"><span style="color: #888888; font-family: Arial, Helvetica, sans-serif;">the Company behind OrientDB</span></span></div>
<div>
<span class="HOEnZb adL"><span style="color: #888888; font-family: Arial, Helvetica, sans-serif;"><a href="http://about.me/luca.garulli" style="color: #1155cc;" target="_blank">http://about.me/luca.garulli</a></span></span></div>
</div>
<span class="HOEnZb adL"><span style="color: #888888; font-family: Arial, Helvetica, sans-serif;">
</span></span>
<div>
<span class="HOEnZb adL"><span style="color: #888888;"><br /></span></span></div>
<span class="HOEnZb adL"><span style="color: #888888;">
</span></span><br />
<div style="font-family: arial, sans-serif;">
</div>
</div>
</div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-43737939298420499662013-10-22T13:00:00.002+01:002013-11-21T16:40:37.675+00:00OrientDB is the first GraphDB in the Gartner Operational DBMS Magic Quadrant<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">London, October 22 2013</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://www.orientdb.org/">OrientDB</a> is the first GraphDB in the Gartner Operational DBMS Magic Quadrant!<br /><br />This is the link to the report: <a href="http://www.gartner.com/DisplayDocument?id=2610218">http://www.gartner.com/DisplayDocument?id=2610218</a><br /><br />(The report is available only for Gartner clients)</span></div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-48760098110006249402013-09-21T16:51:00.000+01:002013-09-21T16:51:39.763+01:00New OrientDB replication engine and plans for the releasing of v. 1.6.<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; line-height: 17.600000381469727px; margin-bottom: 15px;">
Hi all,</div>
<div style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; line-height: 17.600000381469727px; margin-bottom: 15px;">
we're glad to announce in the "develop" branch (1.6.0-SNAPSHOT) the new distirbuted configuration engine that doesn't use Hazelcast's Executor Service but rather Queues. This made the entire work easier (we dropped 50% of code of previous implementation) achieving better performances.</div>
<div style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; line-height: 17.600000381469727px; margin-bottom: 15px;">
This is the new configuration in <b>orientdb-dserver-config.xml</b>:</div>
<pre style="background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(221, 221, 221); color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;"><code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: none; font-family: Consolas, 'Liberation Mono', Courier, monospace; margin: 0px; padding: 0px;"><handler
class="com.orientechnologies.<wbr></wbr>orient.server.hazelcast.<wbr></wbr>OHazelcastPlugin">
<parameters>
<parameter value="europe0" name="nodeName" />
<parameter value="true" name="enabled" />
<parameter value="hazelcast-0.xml" name="configuration.hazelcast" />
<parameter name="conflict.resolver.impl"
value="com.orientechnologies.<wbr></wbr>orient.server.distributed.<wbr></wbr>conflict.<wbr></wbr>ODefaultReplicationConflictRes<wbr></wbr>olver" />
<parameter name="configuration.db.<wbr></wbr>default" value="default-distributed-db-<wbr></wbr>config.json" />
<b> <parameter name="sharding.strategy.round-<wbr></wbr>robin"
value="com.orientechnologies.<wbr></wbr>orient.server.hazelcast.<wbr></wbr>sharding.strategy.<wbr></wbr>ORoundRobinPartitioninStrategy<wbr></wbr>" />
</b> </parameters>
</handler>
</code></pre>
<div style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; line-height: 17.600000381469727px; margin-bottom: 15px; margin-top: 15px;">
As you can see we don't use <b>realignment</b> tasks anymore: when a node comes up it get the pending messages from Hazelcast queue. This is good when a server goes up & down in a reasonable time like for a temporary network failure or an upgrade of a server. In case you plan to stop and restart the server after days you'd need to re-deploy the entire database on the server.</div>
<div style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; line-height: 17.600000381469727px; margin-bottom: 15px; margin-top: 15px;">
This is the default configuration in the new <b>default-distributed-db-config.<wbr></wbr>json</b> file, put it under $ORIENTDB_HOME/config and remove that contained under the database if any. This configuration comes with only one partition where new joining nodes auto register themselves. So this means all the nodes have the entire database (no partitioning). To achieve better performance avoid to use a <b>writeQuorum</b> bigger than 2. I think having 2 servers that synchronously have the data it's very secure. However all the server in the partition are updated, just the client receives the response when <b>writeQuorum</b> is reached. This is the new default configuration file:</div>
<pre style="background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(221, 221, 221); color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 19px; margin-top: 15px; overflow: auto; padding: 6px 10px;"><code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: none; font-family: Consolas, 'Liberation Mono', Courier, monospace; margin: 0px; padding: 0px;">{
"replication": true,
"clusters": {
"internal": {
"replication": false
},
"index": {
"replication": false
},
"ODistributedConflict": {
"replication": false
},
"*": {
"replication": true,
<b> "writeQuorum": 2,
</b> "partitioning": {
"strategy": "round-robin",
"default": 0,
"partitions": [
<b> [ "<NEW_NODE>" ]
</b> ]
}
}
}
}</code></pre>
<br style="color: #222222; font-family: arial;" />
<div style="color: #222222; font-family: arial;">
<div style="font-family: arial, sans-serif;">
Partitions contains an array of partitions as <span class="" style="background-color: #ffffcc;">node</span> names. The keyword <b>"<<span class="" style="background-color: #ffffcc;">NEW_NODE</span>>"</b> means that <span class="" style="background-color: #ffffcc;">new</span> <span class="" style="background-color: #ffffcc;">node</span> that joins the cluster are automatically added in that partition. </div>
<div style="font-family: arial, sans-serif;">
<br /></div>
<div style="font-family: arial, sans-serif;">
So if you start X nodes the replication works out of the box. Thanks to the partitioning you can shard your database across multiple nodes avoiding to have a symmetric replica. So you can use your 6 servers as before:</div>
<div style="font-family: arial, sans-serif;">
<br /></div>
<div style="font-family: arial, sans-serif;">
[</div>
<div style="font-family: arial, sans-serif;">
<b> [ "node0", "node1", "node2", "node3", "node4", "node5" ]</b></div>
<div style="font-family: arial, sans-serif;">
]</div>
<div style="font-family: arial, sans-serif;">
<br /></div>
<div style="font-family: arial, sans-serif;">
or in this way:</div>
<div style="font-family: arial, sans-serif;">
<br /></div>
<div style="font-family: arial, sans-serif;">
[</div>
<div style="font-family: arial, sans-serif;">
<div>
<b>[ "node0", "node1", "node2" ],</b></div>
<div>
<b> [ "node3", "node4", "node5" ]</b></div>
<div>
]</div>
</div>
<div style="font-family: arial, sans-serif;">
<br /></div>
<div style="font-family: arial, sans-serif;">
It's like RAID. With this configuration you've 2 partitions (0 and 1) with 3 replica each. So the database is spanned across 2 partitions automatically that means each partition owns about half database. By default we provide the "<b>round-robin</b>" strategy but you can already plug your one to better split the graph following your domain.</div>
</div>
<div style="color: #222222; font-family: arial, sans-serif;">
<br /></div>
<div style="color: #222222; font-family: arial, sans-serif;">
This is part of the <b>Sharding</b> feature, so consider it as a preview. It will be available in the next release (1.7 or 2.0).</div>
<div style="color: #222222; font-family: arial;">
<br /></div>
<div style="color: #222222; font-family: arial;">
Furthermore we've introduced variable timeouts that change based on the runtime configuration (number of nodes, type of replicated command, etc.)</div>
<div style="color: #222222; font-family: arial;">
<br /></div>
<div style="color: #222222; font-family: arial;">
We've also introduced new settings to tune the replication engine (<b>OGlobalConfiguration</b> class):</div>
<div style="color: #222222; font-family: arial;">
<div>
<br /></div>
<div>
<span style="font-family: 'courier new', monospace;"><b>DISTRIBUTED_THREAD_QUEUE_SIZE</b>("distributed.threadQueueSize", "Size of the queue for internal thread dispatching", Integer.class,</span></div>
<div>
<span style="font-family: courier new, monospace;"> 1000),</span></div>
<div>
<span style="font-family: courier new, monospace;"><br /></span></div>
<div>
<span style="font-family: courier new, monospace;"><b>DISTRIBUTED_CRUD_TASK_TIMEOUT</b>("distributed.crudTaskTimeout", "Maximum timeout in milliseconds to wait for CRUD remote tasks",</span></div>
<div>
<span style="font-family: courier new, monospace;"> Integer.class, 3000),</span></div>
<div>
<span style="font-family: courier new, monospace;"> <b>DISTRIBUTED_COMMAND_TASK_TIMEOUT</b>("distributed.commandTaskTimeout",</span></div>
<div>
<span style="font-family: courier new, monospace;"> "Maximum timeout in milliseconds to wait for Command remote tasks", Integer.class, 5000),</span></div>
<div>
<span style="font-family: courier new, monospace;"><br /></span></div>
<div>
<span style="font-family: courier new, monospace;"><b>DISTRIBUTED_QUEUE_TIMEOUT</b>("distributed.queueTimeout", "Maximum timeout in milliseconds to wait for the response in replication",</span></div>
<div>
<span style="font-family: courier new, monospace;"> Integer.class, 3000),</span></div>
<div>
<span style="font-family: courier new, monospace;"> <b>DISTRIBUTED_SYNCH_RESPONSES_TIMEOUT</b>("distributed.synchResponsesTimeout",</span></div>
<div>
<span style="font-family: courier new, monospace;"> "Maximum timeout in milliseconds to collect all the synchronous responses from replication", Integer.class, 5000),</span></div>
<div>
<span style="font-family: courier new, monospace;"> <b>DISTRIBUTED_ASYNCH_RESPONSES_TIMEOUT</b>("distributed.asynchResponsesTimeout",</span></div>
<div>
<span style="font-family: courier new, monospace;"> "Maximum timeout in milliseconds to collect all the asynchronous responses from replication", Integer.class, 15000),</span></div>
<div>
<span style="font-family: courier new, monospace;"><br /></span></div>
<div>
<span style="font-family: courier new, monospace;"> <b>DISTRIBUTED_PURGE_RESPONSES_TIMER_DELAY</b>("distributed.purgeResponsesTimerDelay",</span></div>
<div>
<span style="font-family: courier new, monospace;"> "Maximum timeout in milliseconds to collect all the asynchronous responses from replication", Integer.class, 15000);</span></div>
</div>
<div style="color: #222222; font-family: arial;">
<br /></div>
<div style="color: #222222; font-family: arial;">
<br /></div>
<div style="color: #222222; font-family: arial;">
I suggest to everybody is using the distributed architecture to upgrade to 1.6.0-SNAPSHOT and:</div>
<div style="color: #222222; font-family: arial;">
- update the file <b>orientdb-dserver-config.xml</b> and !</div>
<div style="color: #222222; font-family: arial;">
- update the file <b style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; line-height: 17.600000381469727px;">default-distributed-db-config.<wbr></wbr>json</b></div>
<div style="color: #222222; font-family: arial;">
- remove the previous file <b style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; line-height: 17.600000381469727px;">default-distributed-db-config.<wbr></wbr>json</b> under the databases/<yourdb> directory</div>
<div style="color: #222222; font-family: arial;">
<br /></div>
<div style="color: #222222; font-family: arial;">
We successfully tested the new engine against 10 servers and 200 connected clients with a writeQuorum=2 (2 synchronous copy before to give the OK to the client).</div>
<div style="color: #222222; font-family: arial;">
<br /></div>
<div style="color: #222222; font-family: arial;">
Next week we'll release OrientDB 1.6, so you've last chance to vote your bugs to be in 1.6 roadmap!</div>
<div style="color: #222222; font-family: arial;">
<br /></div>
<div style="color: #222222; font-family: arial;">
<br />Luca Garulli<br />CEO at Orient Technologies<br />the Company behind OrientDB<br />http://about.me/luca.garulli</div>
<div>
<br /></div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-43167252369918990252013-09-21T14:47:00.001+01:002013-11-21T16:40:45.380+00:00Optimistic vs Pessimistic concurrency: when locking is good<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<span style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 15.199999809265137px; line-height: 20px;">OrientDB has an optimistic concurrency control system, but on very high concurrent updates on the few records it could be more efficient locking records to avoid retries. You could synchronize the access by yourself or by using the storage API. Note that this works only with non-remote databases.</span></div>
<div style="color: #222222; font-size: small;">
<div class="" style="color: #333333; font-size: 15.199999809265137px; line-height: 20px; text-align: left;">
<pre style="background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(221, 221, 221); font-size: 13px; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;"><span style="font-family: Arial, Helvetica, sans-serif;"><span class="">((</span><span class="">OStorageEmbedded</span><span class="">)</span><span class="">db</span><span class="">.</span><span class="">getStorage</span><span class="">()).</span><span class="">acquireWriteLock</span><span class="">(</span><span class="">final</span> <span class="">ORID</span> <span class="">iRid</span><span class="">)</span>
<span class="">((</span><span class="">OStorageEmbedded</span><span class="">)</span><span class="">db</span><span class="">.</span><span class="">getStorage</span><span class="">()).</span><span class="">acquireSharedLock</span><span class="">(</span><span class="">final</span> <span class="">ORID</span> <span class="">iRid</span><span class="">)</span>
<span class="">((</span><span class="">OStorageEmbedded</span><span class="">)</span><span class="">db</span><span class="">.</span><span class="">getStorage</span><span class="">()).</span><span class="">releaseWriteLock</span><span class="">(</span><span class="">final</span> <span class="">ORID</span> <span class="">iRid</span><span class="">)</span>
<span class="">((</span><span class="">OStorageEmbedded</span><span class="">)</span><span class="">db</span><span class="">.</span><span class="">getStorage</span><span class="">()).</span><span class="">releaseSharedLock</span><span class="">(</span><span class="">final</span> <span class="">ORID</span> <span class="">iRid</span><span class="">)</span>
</span></pre>
</div>
<div style="color: #333333; font-size: 15.199999809265137px; line-height: 20px; margin-bottom: 15px; margin-top: 15px; text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;">Example of usage. Writer threads:</span></div>
<div class="" style="color: #333333; font-size: 15.199999809265137px; line-height: 20px;">
<pre style="background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(221, 221, 221); font-size: 13px; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;"><span style="font-family: Arial, Helvetica, sans-serif;"><span class="">try</span><span class="">{</span>
<span class="">((</span><span class="">OStorageEmbedded</span><span class="">)</span><span class="">db</span><span class="">.</span><span class="">getStorage</span><span class="">()).</span><span class="">acquireWriteLock</span><span class="">(</span><span class="">record</span><span class="">.</span><span class="">getIdentity</span><span class="">());</span>
<span class="" style="color: #999988; font-style: italic;">// DO SOMETHING</span>
<span class="">}</span> <span class="">finally</span> <span class="">{</span>
<span class="">((</span><span class="">OStorageEmbedded</span><span class="">)</span><span class="">db</span><span class="">.</span><span class="">getStorage</span><span class="">()).</span><span class="">releaseWriteLock</span><span class="">(</span><span class="">record</span><span class="">.</span><span class="">getIdentity</span><span class="">());</span>
<span class="">}</span>
</span></pre>
</div>
<div style="color: #333333; font-size: 15.199999809265137px; line-height: 20px; margin-bottom: 15px; margin-top: 15px;">
<span style="font-family: Arial, Helvetica, sans-serif;">Reader threads:</span></div>
<div class="" style="color: #333333; font-size: 15.199999809265137px; line-height: 20px;">
<pre style="background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(221, 221, 221); font-size: 13px; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;"><span style="font-family: Arial, Helvetica, sans-serif;"><span class="">try</span><span class="">{</span>
<span class="">((</span><span class="">OStorageEmbedded</span><span class="">)</span><span class="">db</span><span class="">.</span><span class="">getStorage</span><span class="">()).</span><span class="">acquireSharedLock</span><span class="">(</span><span class="">record</span><span class="">.</span><span class="">getIdentity</span><span class="">());</span>
<span class="" style="color: #999988; font-style: italic;">// DO SOMETHING</span>
<span class="">}</span> <span class="">finally</span> <span class="">{</span>
<span class="">((</span><span class="">OStorageEmbedded</span><span class="">)</span><span class="">db</span><span class="">.</span><span class="">getStorage</span><span class="">()).</span><span class="">releaseSharedLock</span><span class="">(</span><span class="">record</span><span class="">.</span><span class="">getIdentity</span><span class="">());</span>
<span class="">}</span>
</span></pre>
</div>
<h3 style="color: #333333; font-size: 1.5em; line-height: 1.7; margin: 1em 0px 15px; padding: 0px;">
<a class="" href="https://github.com/orientechnologies/orientdb/wiki/Performance-Tuning#file-system-access-strategy" name="file-system-access-strategy" style="color: #4183c4; display: block; margin-left: -30px; padding-left: 30px; padding-right: 6px; text-decoration: none;"></a></h3>
</div>
<div style="color: #222222; font-size: small;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif;">For more information: </span></div>
<div style="text-align: left;">
<span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif;">https://github.com/orientechnologies/orientdb/wiki/Performance-Tuning#high-concurrency</span></div>
<div style="text-align: left;">
<span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">Luca Garulli</span><br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">CEO at Orient Technologies</span><br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">the Company behind OrientDB</span><br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">http://about.me/luca.garulli</span><br />
<div>
<br /></div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-758651596320407502013-09-03T19:49:00.002+01:002013-09-03T19:49:14.001+01:00Release OrientDB 1.5.1 containing hot-fixes for 1.5<div dir="ltr" style="text-align: left;" trbidi="on">
London, 3rd September 2013<br />
<br />
Orient Technologies has just released the version <a href="https://github.com/orientechnologies/orientdb/releases/tag/1.5.1">1.5.1</a> of OrientDB Standard and Graph Editions.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://github.com/orientechnologies/orientdb/releases/tag/1.5.1"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3n5p8vi4cn45JF367RvblPTu3g3VaPiRv3pXbEyCH8z6eGFdMeU0etd0RSzaW6hyQNN68kE3dv1ky5ADsb0l6A_fSkwJsUrM5ql9cXRHY4GDm_ROPDoNnvBkOfqpF3-f_FyTWzZ6Siw/s640/Schermata+2013-09-03+alle+20.48.10.png" width="640" /></a></div>
<br />
<br />
URL: <a href="https://github.com/orientechnologies/orientdb/releases/tag/1.5.1">https://github.com/orientechnologies/orientdb/releases/tag/1.5.1</a><br />
<br />
Take also a look at the list of all the <a href="https://github.com/orientechnologies/orientdb/issues?milestone=9&state=closed">fixed issues</a>.</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-88946594123011175762013-09-03T17:08:00.003+01:002013-09-03T17:08:39.629+01:00First book about OrientDB available from Packt<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Trebuchet MS, sans-serif;">London, September 2nd 2013</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Mr. Claudio Tesoriero is the author of "Getting Started with OrientDB", the new book about OrientDB. Claudio is a <a href="http://www.orientechnologies.com/certification.htm">certified OrientDB developer</a> that wrote this book for all the developers that want to start working with OrientDB NoSQL database.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.packtpub.com/getting-started-with-orientdb-1-3-0/book"><span style="font-family: Trebuchet MS, sans-serif;"><img border="0" height="320" src="https://app.packtpub.com/sites/default/files/9956OS_Getting%20Started%20with%20OrientDB_0.jpg" width="259" /></span></a></div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<h2 style="background-color: white; border: 0px; font-size: 1.2em; line-height: 18px; margin: 0px 0px 0.5em; padding: 0px;">
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></h2>
<div style="text-align: left;">
<span style="font-family: Trebuchet MS, sans-serif;">Take a look at the <span style="background-color: white; line-height: 18px;">Table of Contents:</span></span></div>
<br />
<a href="" name="chapter_1" style="background-color: white; border: 0px; color: #f68c23; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Chapter 1: Installing OrientDB</span></a><br />
<ul style="background-color: white; border: 0px; line-height: 18px; list-style: none; margin: 0px; padding: 0px;"><ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Standard Edition</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Graphed Edition</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Key/Value Edition</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Enterprise Edition</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Installing from the latest stable release</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Installing the Standard Edition</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Installing the Graphed Edition</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Compiling from the latest source snapshot</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Running the test suite</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Installing as a daemon/service</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Linux systems</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Windows systems</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Summary</span></li>
</ul>
</ul>
<ul style="background-color: white; border: 0px; line-height: 18px; list-style: none; margin: 0px; padding: 0px;"></ul>
<div style="background-color: white; border: 0px; line-height: 18px; margin: 0px; padding: 0px;">
<a href="" name="chapter_2" style="border: 0px; color: #f68c23; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;"><br /></span></a></div>
<div style="background-color: white; border: 0px; line-height: 18px; margin: 0px; padding: 0px;">
<a href="" name="chapter_2" style="border: 0px; color: #f68c23; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Chapter 2: Administering OrientDB</span></a></div>
<ul style="background-color: white; border: 0px; line-height: 18px; list-style: none; margin: 0px; padding: 0px; text-align: left;"><ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Configuration</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">orientdb-server-config.xml</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">orientdb-dserver-config.xml</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The OrientDB console</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">OrientDB data files</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Classes</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Abstract classes</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Security</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Rules</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Roles</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Users</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Server users</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Record-level security</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The OrientDB Studio</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The Database section</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The Query section</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The Document section</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The Functions section</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The Graph section</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The Raw access section</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The root user</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Back up / restore</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Using the console</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Using the OrientDB Studio</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Automatic backup</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Summary</span></li>
</ul>
<li><a href="" name="chapter_3" style="border: 0px; color: #f68c23; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;"><br /></span></a></li>
<li><a href="" name="chapter_3" style="border: 0px; color: #f68c23; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Chapter 3: Programming OrientDB</span></a></li>
</ul>
<ul style="background-color: white; border: 0px; line-height: 18px; list-style: none; margin: 0px; padding: 0px;"><ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Data types</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Extended SQL</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Creating a database</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Creating classes</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Inserting records</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Deleting records</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Reading and updating records</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Fields</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Schema-full classes and the mixed-mode schema</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Relationships</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">One-to-one and one-to-many relationships</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Many-to-many relationships</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Traversing the relationships</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">SQL functions</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The graph database</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Using the JDBC driver</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Other language drivers (PHP)</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The native Java API</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Opening a connection</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Connection pools</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Executing SQL queries</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Executing SQL commands</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Create, load, update, and delete a document</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Object database support</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">RESTful APIs</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Transactions</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Transactions within REST calls</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Summary</span></li>
</ul>
</ul>
<ul style="background-color: white; border: 0px; line-height: 18px; list-style: none; margin: 0px; padding: 0px;"></ul>
<a href="" name="chapter_4" style="background-color: white; border: 0px; color: #f68c23; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;"></span></a><span style="font-family: Trebuchet MS, sans-serif;"><div>
<a href="" name="chapter_4" style="background-color: white; border: 0px; color: #f68c23; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px;"></a><a href="" name="chapter_4" style="background-color: white; border: 0px; color: #f68c23; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;"><br /></span></a></div>
Chapter 4: Performance Tuning</span><br /><ul style="background-color: white; border: 0px; line-height: 18px; list-style: none; margin: 0px; padding: 0px;"><ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Caching</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">General Optimizations</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The JVM optimization</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Memory and cache</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Mapping files</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Connections</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Transactions</span></li>
</ul>
</ul>
</ul>
<ul style="background-color: white; border: 0px; line-height: 18px; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Massive insertions</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Datafile fragmentation</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The profiler</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Query tips</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The explain command</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Indexes</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Looking for @rid values</span></li>
</ul>
</ul>
<ul style="background-color: white; border: 0px; line-height: 18px; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Summary</span></li>
</ul>
<ul style="background-color: white; border: 0px; line-height: 18px; list-style: none; margin: 0px; padding: 0px;"></ul>
<div style="background-color: white; border: 0px; line-height: 18px; margin: 0px; padding: 0px;">
<br /></div>
<a href="" name="chapter_5" style="background-color: white; border: 0px; color: #f68c23; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Chapter 5: Advanced Features</span></a><br /><ul style="background-color: white; border: 0px; line-height: 18px; list-style: none; margin: 0px; padding: 0px;"><ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">The embedded mode</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Server-side code</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Server-side function features</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Creating a function</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Usage</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Java API</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">RESTful calls</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Special variables</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Hooks</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Triggers</span></li>
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Gremlin support</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Gephi</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Clustering</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">How it works</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Replication</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Configuration and setup</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Sending e-mails through OrientDB</span></li>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Usage</span></li>
</ul>
</ul>
<ul style="border: 0px; font-style: inherit; font-variant: inherit; line-height: inherit; list-style: none; margin: 0px; padding: 0px;">
<li style="border: 0px; font-style: inherit; font-variant: inherit; line-height: 1.5em; list-style-image: url(http://dgdsbygo8mp3h.cloudfront.net/sites/default/files/new-design-assets/orange-bullet.png); list-style-type: disc; margin: 0px 0px 0px 2em; padding: 0px;"><span style="font-family: Trebuchet MS, sans-serif;">Summary</span></li>
</ul>
</ul>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-77879430117730458012013-08-27T19:00:00.003+01:002013-08-27T19:10:11.630+01:00OrientDB new online course format<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Trebuchet MS, sans-serif;">London, August 27, 2013 </span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Orient Technologies changed the online courses by providing a new format: 9 hours in 2 days, instead of 7 hours in only one day. The cost of the course remains the same: £ 300.00 per attendee.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">The 9 hours are split into 2 days of 4 hours each with an additional hour of off-line exercises after the first day. This change is the fruit of all the feedback received from past events where attendees reported to us that the covered topics were too many to be covered in only one day with 7 hours of non-stop learning.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"> </span><br />
<span style="font-family: Trebuchet MS, sans-serif;">We also removed the Document and Object database API portions in order to be more focused on the Blueprints API and the Graph Database concepts.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">If you're interested in taking a course, please go to: <a href="http://www.orientechnologies.com/training.htm">http://www.orientechnologies.com/training.htm</a>.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Luca Garulli</span><br />
<span style="font-family: Trebuchet MS, sans-serif;">CEO at Orient Technologies</span><br />
<span style="font-family: Trebuchet MS, sans-serif;">the Company behind OrientDB</span><br />
<span style="font-family: Trebuchet MS, sans-serif;">http://about.me/luca.garulli</span><br />
<div>
<br /></div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-19617219399445875042013-08-01T17:14:00.000+01:002013-08-02T14:35:15.980+01:00OrientDB: Using Schemas with Graphs, Part 1<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Trebuchet MS, sans-serif;"><span style="color: #222222;"><a href="http://www.orientdb.org/">OrientDB</a> is a Graph Database "on steroids" because it supports concepts taken from both the Document Database and Object-Oriented worlds. </span></span><br />
<br />
<span style="font-family: Trebuchet MS, sans-serif;"><span style="color: #222222;">Take a look at this use case: Creating</span><span style="color: #222222;"> a graph to map the relationships between Person and Cars. <span style="font-family: arial;"></span>We're going to use the just-released OrientDB version 1.5. </span></span><br />
<br />
<span style="font-family: Trebuchet MS, sans-serif;"><span style="color: #222222;">Let's open a shell (or command prompt in Windows) and launch the OrientDB Console (use console.bat on Windows):</span></span><br />
<span style="color: #222222; font-family: arial;"><br /></span>
<span style="color: #222222; font-family: Courier New, Courier, monospace;">> cd $ORIENTDB_HOME/bin</span><br />
<span style="color: #222222; font-family: Courier New, Courier, monospace;">> ./console.sh</span><br />
<span style="color: #222222; font-family: arial;"><br /></span>
<span style="color: #222222; font-family: Trebuchet MS, sans-serif;">Now we're going to use the console to create a brand new local database:</span><br />
<span style="color: #222222; font-family: arial;"><br /></span>
<span style="color: #222222; font-family: Courier New, Courier, monospace;">orientdb> create database plocal:../databases/cars admin admin plocal graph</span><br />
<br />
<span style="color: #222222; font-family: Trebuchet MS, sans-serif;">Ok, now let's create the first <a href="https://github.com/orientechnologies/orientdb/wiki/Graph-Schema">graph schema</a> with "Person" and "Car" as 2 new Vertex types and "Owns" as an Edge type:</span><br />
<br />
<div style="color: #222222;">
<span style="font-family: Courier New, Courier, monospace;">orientdb> create class Person extends V</span></div>
<div>
<div style="color: #222222;">
<span style="font-family: Courier New, Courier, monospace;">orientdb> create class Car extends V</span></div>
</div>
<div>
<div>
<div style="color: #222222;">
<span style="font-family: Courier New, Courier, monospace;">orientdb> create class Owns extends E</span></div>
</div>
</div>
<div>
<br /></div>
<div>
<span style="font-family: Trebuchet MS, sans-serif;">And let's go populate the database with the first Graph elements:</span></div>
<div>
<br /></div>
<div>
<div>
<div style="color: #222222;">
<span style="font-family: Courier New, Courier, monospace;">orientdb> create vertex Person set name = 'Luca'</span></div>
</div>
</div>
<div style="color: #222222;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="color: #222222; font-family: Courier New, Courier, monospace;">Created vertex 'Person#11:0{name:Luca} v1' in 0,012000 sec(s).</span></div>
<div>
<span style="color: #222222; font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<div>
<div style="color: #222222;">
<span style="font-family: Courier New, Courier, monospace;">orientdb> create vertex Car set name = 'Ferrari Modena'</span></div>
<div style="color: #222222;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="color: #222222; font-family: Courier New, Courier, monospace;">Created vertex 'Car#12:0{name:Ferrari Modena} v1' in 0,001000 sec(s).</span></div>
<div>
<span style="color: #222222; font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="color: black;">
<div style="color: #222222;">
<span style="font-family: Courier New, Courier, monospace;">orientdb> create edge Owns from (select from Person) to (select from Car)</span></div>
</div>
</div>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Created edge '[e[#11:0->#12:0][#11:0-Owns->#12:0]]' in 0,005000 sec(s).</span></div>
<div>
<br /></div>
<div style="color: #222222;">
<span style="font-family: Trebuchet MS, sans-serif;">Ok, now we can traverse vertices. For example, what is Luca's car? Traverse from Luca vertex to the outgoing vertices following the "Owns" relationships:</span></div>
<div style="color: #222222;">
<br /></div>
<div>
<div>
<span style="color: #222222; font-family: Courier New, Courier, monospace;">orientdb> select name from ( select expand( out('Owns') ) from Person where name = 'Luca' )</span></div>
<div>
<span style="color: #222222; font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="color: #222222; font-family: Courier New, Courier, monospace;">----+-----+--------------</span></div>
<div>
<span style="color: #222222; font-family: Courier New, Courier, monospace;"># |@RID |name</span></div>
<div>
<span style="color: #222222; font-family: Courier New, Courier, monospace;">----+-----+--------------</span></div>
<div>
<span style="color: #222222; font-family: Courier New, Courier, monospace;">0 |#-2:1|Ferrari Modena</span></div>
<div>
<span style="color: #222222; font-family: Courier New, Courier, monospace;">----+-----+--------------</span></div>
<div>
<br />
<span style="font-family: Trebuchet MS, sans-serif;">Perfect. </span><br />
<span style="font-family: Trebuchet MS, sans-serif;">Now we have the location of Person and we need another Vertex type called "Country" to connect to the person with a new "Lives" Edge type:</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">orientdb> create class Country extends V</span><br />
<span style="font-family: Courier New, Courier, monospace;">orientdb> create class Lives extends E</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<span style="font-family: 'Courier New', Courier, monospace;">orientdb> create vertex Country set name = 'UK'</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">Created vertex 'Country#14:0{name:UK} v1' in 0,004000 sec(s).</span><br />
<br />
<div style="text-align: left;">
<span style="font-family: Trebuchet MS, sans-serif;">Next, let's associate Luca to the UK Country:</span></div>
<br />
<span style="font-family: Courier New, Courier, monospace;">orientdb> create edge Lives from (select from Person) to (select from Country)</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">Created edge '[e[#11:0->#14:0][#11:0-Lives->#14:0]]' in 0,006000 sec(s).</span><br />
<br />
<div style="text-align: left;">
<span style="font-family: Trebuchet MS, sans-serif;">So far so good. Our graph has been extended. </span><br />
<span style="font-family: Trebuchet MS, sans-serif;">Now, try to search the country where there are "Ferrari" cars in our database.</span></div>
<br />
<span style="font-family: Courier New, Courier, monospace;">orientdb> select name from ( select expand( in('Owns').out('Lives') ) from Car where name like '%Ferrari%' )</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">----+-----+----</span><br />
<span style="font-family: Courier New, Courier, monospace;"># |@RID |name</span><br />
<span style="font-family: Courier New, Courier, monospace;">----+-----+----</span><br />
<span style="font-family: Courier New, Courier, monospace;">0 |#-2:1|UK</span><br />
<span style="font-family: Courier New, Courier, monospace;">----+-----+----</span><br />
<br /></div>
</div>
<div style="color: #222222;">
<div style="font-family: arial;">
<b>Setting constraints on Edges</b></div>
<div style="font-family: arial;">
<br /></div>
<span style="font-family: Trebuchet MS, sans-serif;">Now we've modeled our graph using a schema without any constraints. But it would be useful to require an Owns relationship to exist only between the Person and Car vertices. So, let's create these constraints:</span></div>
<div style="color: #222222;">
<br /></div>
<div>
<div style="color: #222222;">
<span style="font-family: Courier New, Courier, monospace;">orientdb> create property Owns.out LINK Person</span></div>
<div>
<span style="color: #222222; font-family: 'Courier New', Courier, monospace;">orientdb> create property Owns.in LINK Car</span></div>
<div style="color: #222222;">
<div style="font-family: arial;">
<br /></div>
<span style="font-family: Trebuchet MS, sans-serif;">The MANDATORY setting against a property prevents OrientDB from using a lightweight edge (no physical document is created). Be sure to pay attention and not put spaces between MANDATORY=true.</span><br />
<div style="font-family: arial;">
<br /></div>
<div style="color: black; font-family: Times;">
<span style="color: #222222; font-family: Courier New, Courier, monospace;">orientdb> alter property Owns.out MANDATORY=true;</span></div>
<div style="font-family: arial;">
<div style="color: black; font-family: Times;">
<span style="color: #222222; font-family: Courier New, Courier, monospace;">orientdb> alter property Owns.in MANDATORY=true;</span></div>
</div>
<div style="font-family: arial;">
<span style="color: #222222; font-family: Courier New, Courier, monospace;"><br /></span></div>
<span style="font-family: Trebuchet MS, sans-serif;">If we want to prohibit a Person vertex from having 2 edges against the same Car vertex, we have to define a UNIQUE index against out and in properties.</span></div>
</div>
<div>
<div style="color: #222222;">
<br /></div>
<span style="color: #222222; font-family: Courier New, Courier, monospace;">orientdb> create index UniqueOwns on Owns(out,in) unique</span><br />
<span style="color: #222222; font-family: Courier New, Courier, monospace;"><br /></span>
<span style="color: #222222; font-family: Courier New, Courier, monospace;">Created index successfully with 0 entries in 0,023000 sec(s).</span><br />
<div style="color: #222222; font-family: arial;">
<br /></div>
<div style="color: #222222;">
<span style="font-family: Trebuchet MS, sans-serif;">Unfortunately, the index tells us 0 entries are indexed. Why? We have already created the Owns relationships between "Luca" and "Ferrari Modena." In that case, OrientDB had already created a lightweight edge before we set the rule to force creation documents for Owns instances. So, you need to drop and recreate the edge.</span></div>
<div style="color: #222222;">
</div>
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
</div>
<br />
<div style="orphans: auto; text-align: left; text-indent: 0px; widows: auto;">
<div style="margin: 0px;">
<span style="color: #222222; font-family: Courier New, Courier, monospace;">orientdb> delete edge from #11:0 to #12:0</span></div>
<div style="-webkit-text-stroke-width: 0px; color: #222222; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<span style="font-family: Courier New, Courier, monospace;">orientdb> create edge Owns from (select from Person) to (select from Car)</span></div>
<div style="-webkit-text-stroke-width: 0px; color: #222222; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Now check that the record has been created.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">orientdb> select from Owns</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">----+-----+-----+-----</span><br />
<span style="font-family: Courier New, Courier, monospace;"># |@RID |out |in</span><br />
<span style="font-family: Courier New, Courier, monospace;">----+-----+-----+-----</span><br />
<span style="font-family: Courier New, Courier, monospace;">0 |#13:0|#11:0|#12:0</span><br />
<span style="font-family: Courier New, Courier, monospace;"></span><br />
<span style="font-family: Courier New, Courier, monospace;">----+-----+-----+-----</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
</div>
<div style="color: #222222;">
<span style="font-family: Trebuchet MS, sans-serif;">So far so good. The constraints works. Now try to create a "Owns" edge between Luca and UK (Country vertex):</span></div>
<div>
<div style="color: #222222;">
<br /></div>
<span style="color: #222222; font-family: Courier New, Courier, monospace;">orientdb> create edge Owns from (select from Person) to (select from Country)</span><br />
<span style="color: #222222; font-family: Courier New, Courier, monospace;"><br /></span>
<span style="color: #222222; font-family: Courier New, Courier, monospace;">Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.create edge Owns from (select from Person) to (sel...</span><br />
<span style="color: #222222; font-family: Courier New, Courier, monospace;">Error: com.orientechnologies.orient.core.exception.OValidationException: The field 'Owns.in' has been declared as LINK of type 'Car' but the value is the document #14:0 of class 'Country'</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><span style="color: #222222;"><br /></span>
<span style="color: #222222;">Now we have a typed graph with constraints. </span></span><br />
<br />
<span style="font-family: Trebuchet MS, sans-serif;"><span style="color: #222222;">The next part will cover how to use polymorphism feature in the graph.</span></span><br />
<span style="color: #222222; font-family: Trebuchet MS, sans-serif;"><span style="color: #222222;"><br /></span>
<span style="color: #222222;">Luca Garulli, </span>CEO</span><br />
<span style="color: #222222; font-family: Trebuchet MS, sans-serif;"><span style="color: #222222; font-family: Trebuchet MS, sans-serif;">Orient Technologies, </span>the Company behind OrientDB</span><br />
<span style="color: #222222; font-family: Trebuchet MS, sans-serif;">http://about.me/luca.garulli</span></div>
</div>
<div>
<br /></div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com1tag:blogger.com,1999:blog-5679590075733590581.post-76042436289781853772013-07-30T19:06:00.001+01:002013-08-01T18:24:11.081+01:00Version 1.5 of OrientDB Graph Database has just been released to the planet!<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<span style="background-color: white; color: #222222; font-family: Trebuchet MS, sans-serif;">Hi everyone,</span></div>
<div style="text-align: left;">
<span style="font-family: Trebuchet MS, sans-serif;"><span style="background-color: white; color: #222222;">only 2 months after the release of v.1.4 (and only 1 month after the v.1.4.1 release), version </span><b style="color: #222222;">1.5</b><span style="background-color: white; color: #222222;"> is now available for download! </span></span></div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<div style="color: #222222;">
<span style="font-family: Trebuchet MS, sans-serif;">This release could actually be named 2.0 for all the various new features:</span><br />
<div>
<ul>
<li><span style="font-family: Trebuchet MS, sans-serif;">New <b>PLOCAL</b> (Paginated Local) storage engine. In comparison with LOCAL, it's more durable (no usage of MMAP) and supports better concurrency on parallel transactions.</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">New <b>Hash Index </b>type with better performance on lookups. It does not support ranges.</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">New "<b>transactional</b>" SQL command to execute commands inside a transaction. This is useful for the "create edge" SQL command, in order to avoid corruption of the graph</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;"><b>Import</b> now migrates RIDs, allowing the ability to import database objects in a different one from the original </span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">"<b>Breadth first</b>" strategy added on traversing (Java andSQL APIs)</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">Server can limit maximum live connections (to prevent DOS)</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;"><b>Fetch plan</b> support in SQL statements and in binary protocol for synchronous commands too</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">Various bug fixes</span></li>
</ul>
</div>
<span style="font-family: Trebuchet MS, sans-serif;">For all the issues: <a href="https://github.com/orientechnologies/orientdb/issues?milestone=5&page=1&state=closed">https://github.com/orientechnologies/orientdb/issues?milestone=5&page=1&state=closed</a></span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">For more information about the release: <a href="https://github.com/orientechnologies/orientdb/releases/tag/1.5">https://github.com/orientechnologies/orientdb/releases/tag/1.5</a></span></div>
<div style="color: #222222;">
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">To receive <b>Professional Support</b>, please contact us at: <b>info@orientechnologies.com</b>.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Special thanks goes out to Artem Orobets, who just joined the Orient Technologies company, to Andrey Lomakin who has coordinated and co-developed the new PLOCAL, Hash Index and many other features on the engine part. Thanks to Luca Molino who is back on the Object Database interface. Thanks to all the contributors with their pull requests, test cases and issues who have contributed to improving OrientDB. Thanks also to the TinkerPop team for providing such cool technology to stack on top of OrientDB.</span><br />
<div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<div>
<div>
<span style="font-family: Trebuchet MS, sans-serif;">Luca Garulli</span></div>
<div>
<span style="font-family: Trebuchet MS, sans-serif;">CEO at Orient Technologies</span></div>
<div>
<span style="font-family: Trebuchet MS, sans-serif;">the Company behind OrientDB</span></div>
<div>
<a href="http://about.me/luca.garulli" style="color: #1155cc;" target="_blank"><span style="font-family: Trebuchet MS, sans-serif;">http://about.me/luca.garulli</span></a><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
</div>
<div>
<br /></div>
</div>
</div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0tag:blogger.com,1999:blog-5679590075733590581.post-63737293240361771132013-06-21T14:56:00.006+01:002013-08-01T18:24:18.559+01:00Welcome to Orient Technologies LTD company<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Trebuchet MS, sans-serif;">London, June 21st 2013</span><br />
<div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Trebuchet MS, sans-serif;">It's official: <a href="http://www.orientechnologies.com/">Orient Technologies</a> LTD is the new company that will manage OrientDB software and services. <a href="http://www.nuvolabase.com/">NuvolaBase</a> company has been incorporated as division to manage the DAAS (Database As A Service) on the Cloud.</span></div>
<div>
<br /></div>
</div>
Luca Garullihttp://www.blogger.com/profile/04523569178463279505noreply@blogger.com0