The fundamental component of OrientDB is to help multi-model items, for example it underpins various models like Document, Graph, Key/Value and Real Object. It contains a different API to help all these four models.
Document Model
The phrasing Document model has a place with NoSQL information base. It implies the information is put away in the Documents and the gathering of Documents are called as Collection. In fact, archive implies a bunch of key/esteem sets or likewise alluded to as fields or properties.
OrientDB utilizes the ideas, for example, classes, bunches, and connection for putting away, gathering, and investigating the records.
The accompanying table represents the examination between social model, record model, and OrientDB report model −
Relational Model | Document Model | OrientDB Document Model |
---|---|---|
Table | Collection | Class or Cluster |
Row | Document | Document |
Column | Key/value pair | Document field |
Relationship | Not available | Link |
Graph Model
A diagram information structure is an information model that can store information as Vertices (Nodes) interconnected by Edges (Arcs). The possibility of OrientDB diagram data set came from property chart. The vertex and edge are the principle curios of the Graph model. They contain the properties, which can cause these to seem like reports.
The accompanying table shows an examination between chart model, social information model, and OrientDB diagram model.
Relational Model | Graph Model | OrientDB Graph Model |
---|---|---|
Table | Vertex and Edge Class | Class that extends "V" (for Vertex) and "E" (for Edges) |
Row | Vertex | Vertex |
Column | Vertex and Edge property | Vertex and Edge property |
Relationship | Edge | Edge |
The Key/Value Model
The Key/Value model implies that information can be put away as key/esteem pair where the qualities can be of basic and complex sorts. It can uphold archives and diagram components as qualities.
The accompanying table shows the examination between social model, key/esteem model, and OrientDB key/esteem model.
Relational Model | Key/Value Model | OrientDB Key/Value Model |
---|---|---|
Table | Bucket | Class or Cluster |
Row | Key/Value pair | Document |
Column | Not available | Document field or Vertex/Edge property |
Relationship | Not available | Link |
The Object Model
This model has been acquired by Object Oriented programming and supports Inheritance between types (sub-types expands the super-types), Polymorphism when you allude to a base class and Direct official from/to Objects utilized in programming dialects.
The accompanying table outlines the examination between social model, Object model, and OrientDB Object model.
Relational Model | Object Model | OrientDB Object Model |
---|---|---|
Table | Class | Class or Cluster |
Row | Object | Document or Vertex |
Column | Object property | Document field or Vertex/Edge property |
Relationship | Pointer | Link |
Prior to proceed in detail, it is smarter to realize the fundamental phrasing related with OrientDB. Following are a portion of the significant wordings.
Record
The littlest unit that you can stack from and store in the data set. Records can be put away in four sorts.
- Record
- Record Bytes
- Vertex
- Edge
Record ID
At the point when OrientDB creates a record, the information base worker naturally relegates a unit identifier to the record, called RecordID (RID). The RID looks like #<cluster>:<position>. <cluster> implies group distinguishing proof number and the <position> implies supreme situation of the record in the bunch.
Documents
The Document is the most adaptable record type accessible in OrientDB. Reports are delicately composed and are characterized by construction classes with characterized requirement, however you can likewise embed the archive with no pattern, for example it upholds pattern less mode as well.
Records can be effectively dealt with by fare and import in JSON design. For instance, investigate the accompanying JSON test report. It characterizes the report subtleties.
{
"id" : "1201",
"name" : "Jay",
"job" : "Developer",
"creations" : [
{
"name" : "Amiga",
"company" : "Commodore Inc."
},
{
"name" : "Amiga 500",
"company" : "Commodore Inc."
}
]
}
RecordBytes
Record Type is equivalent to BLOB type in RDBMS. OrientDB can load and store report Record type alongside paired information.
Vertex
OrientDB information base isn't just a Document data set yet in addition a Graph data set. The new ideas, for example, Vertex and Edge are utilized to store the information as diagram. In chart data sets, the most essential unit of information is hub, which in OrientDB is known as a vertex. The Vertex stores data for the data set.
Edge
There is a different record type considered the Edge that associates one vertex to another. Edges are bidirectional and can just interface two vertices. There are two sorts of edges in OrientDB, one is normal and another lightweight.
Class
The class is a kind of information model and the idea drawn from the Object-arranged programming worldview. In view of the customary archive data set model, information is put away as assortment, while in the Relational data set model information is put away in tables. OrientDB follows the Document API alongside OPPS worldview. As an idea, the class in OrientDB has the nearest relationship with the table in social information bases, however (in contrast to tables) classes can be mapping less, outline full or blended. Classes can acquire from different classes, making trees of classes. Each class has its own group or bunches, (made naturally, if none are characterized).
Cluster
Group is a significant idea which is utilized to store records, archives, or vertices. In straightforward words, Cluster is where a gathering of records are put away. As a matter of course, OrientDB will make one bunch for every class. All the records of a class are put away in a similar group having a similar name as the class. You can make up to 32,767(2^15-1) bunches in a data set.
The CREATE class is an order used to make a bunch with explicit name. When the bunch is made you can utilize the group to save records by determining the name during the formation of any information model.
Relationships
OrientDB upholds two sorts of connections: referred to and implanted. Referred to connections implies it stores direct connect to the objective objects of the connections. Inserted connections implies it stores the relationship inside the record that implants it. This relationship is more grounded than the reference relationship.
Database
The information base is an interface to get to the genuine stockpiling. IT sees significant level ideas, for example, inquiries, patterns, metadata, lists, etc. OrientDB additionally gives various data set sorts. For more data on these sorts, see Database Types.