Book Image

Getting Started with OrientDB

By : Claudio Tesoriero
Book Image

Getting Started with OrientDB

By: Claudio Tesoriero

Overview of this book

<p>In modern software applications, often there is the necessity to manage very big amounts of unstructured data with varying schema. In this scenario, instead of relational databases, we can use OrientDB, an open source NoSQL DBMS written in Java. Inspite ofDespite being a document-based database, the relationships are managed with direct connections between records. It supports schema-less, schema-full, and schema-mixed modes.</p> <p>Getting Started with OrientDB will be your handy, quick reference guide, for all document-graph DBMS functionality. Administrative tasks, deployment, designing a database, different ways of querying and consuming data - all that you need to know about OrientDB is presented keeping with practical usage in mind. You will be able to install, setup, deploy, and configure databases with OrientDB for applications.</p> <p>Getting Started with OrientDB will allow you to use its OreintDB’s main functionality immediately. The book will guide you through the discovery of one of the most powerful NoSQL databases available today. It will then take you through downloading and installing OrientDB, cluster deployment, programming, discovering OrientDB’s potential, and its features.</p> <p>The book covers useful administrative topics such as import/export, automatic backups, and configuration tips. Furthermore, design concepts like user management, document databases, graph databases, and dictionaries are covered. Finally, concepts and programming examples are shown in Java.</p>
Table of Contents (12 chapters)

Datafile fragmentation


Each time a record is updated or deleted, a hole is created in the datafiles structure. OrientDB tracks these holes and tries to reuse them. However, many updates and deletes can cause a fragmentation of datafiles, just like in a filesystem. To limit this problem, it is suggested to set the oversize attribute of the classes you create. The oversize attribute is used to allocate more space for records once they are created, so as to avoid defragmentation upon updates. The oversize attribute is a multiplying factor where 1.0 or 0 means no oversize. The default values are 0 for document, and 2 for vertices. OrientDB has a defrag algorithm that starts automatically when certain conditions are verified. You can set some of these conditions by using the following configuration parameter:

  • file.defrag.holeMaxDistance: It defines the maximum distance in bytes between two holes that triggers the defrag procedure. The default is 32 KB, -1 means dynamic size. The dynamic size is...