kandi background
Explore Kits

orientdb | versatile DBMS supporting Graph | Database library

 by   orientechnologies Java Version: 3.0.42 License: Apache-2.0

 by   orientechnologies Java Version: 3.0.42 License: Apache-2.0

Download this library from

kandi X-RAY | orientdb Summary

orientdb is a Java library typically used in Institutions, Learning, Administration, Public Services, Database, MongoDB applications. orientdb has build file available, it has a Permissive License and it has high support. However orientdb has 1264 bugs and it has 11 vulnerabilities. You can download it from GitHub, Maven.
OrientDB is an Open Source Multi-Model NoSQL DBMS with the support of Native Graphs, Documents, Full-Text search, Reactivity, Geo-Spatial and Object Oriented concepts. It's written in Java and it's amazingly fast. No expensive run-time JOINs, connections are managed as persistent pointers between records. You can traverse thousands of records in no time. Supports schema-less, schema-full and schema-mixed modes. Has a strong security profiling system based on user, roles and predicate security and supports SQL amongst the query languages. Thanks to the SQL layer it's straightforward to use for people skilled in the Relational world. Get started with OrientDB | OrientDB Community Group.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • orientdb has a highly active ecosystem.
  • It has 4421 star(s) with 846 fork(s). There are 281 watchers for this library.
  • There were 10 major release(s) in the last 12 months.
  • There are 213 open issues and 8604 have been closed. On average issues are closed in 76 days. There are 2 open pull requests and 0 closed requests.
  • It has a positive sentiment in the developer community.
  • The latest version of orientdb is 3.0.42
orientdb Support
Best in #Database
Average in #Database
orientdb Support
Best in #Database
Average in #Database

quality kandi Quality

  • orientdb has 1264 bugs (70 blocker, 90 critical, 614 major, 490 minor) and 29748 code smells.
orientdb Quality
Best in #Database
Average in #Database
orientdb Quality
Best in #Database
Average in #Database

securitySecurity

  • orientdb has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • orientdb code analysis shows 11 unresolved vulnerabilities (6 blocker, 1 critical, 2 major, 2 minor).
  • There are 711 security hotspots that need review.
orientdb Security
Best in #Database
Average in #Database
orientdb Security
Best in #Database
Average in #Database

license License

  • orientdb is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
orientdb License
Best in #Database
Average in #Database
orientdb License
Best in #Database
Average in #Database

buildReuse

  • orientdb releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions are available. Examples and code snippets are not available.
orientdb Reuse
Best in #Database
Average in #Database
orientdb Reuse
Best in #Database
Average in #Database
Top functions reviewed by kandi - BETA

kandi has reviewed orientdb and discovered the below as its top functions. This is intended to give you an instant insight into orientdb implemented functionality, and help decide if they suit your requirements.

  • moves from the current state
  • Validate a field
  • Parses an AlterClass statement .
  • Convert the value to a stream .
  • Fetch rid map .
  • Compare two field values .
  • Returns a WALRecord object for the given record id .
  • Returns the time after the given time .
  • Imports a delta .
  • Applies the given pattern context to the query

orientdb Key Features

OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.

Using the 'astar' function of OrientDB: an SQL call in Java

copy iconCopydownload iconDownload
    String sql = "SELECT ASTAR(" + getNode(from).getProperty("@rid") + ", " + getNode(to).getProperty("@rid") + ", time) FROM V";
    try(OResultSet set = db.query(sql, "direction='OUT'", "customHeuristicFormula='EUCLIDEAN'")) {
         // some code...
    }

Connecting to an embedded OrientDB server in Java

copy iconCopydownload iconDownload
orientDB = new OrientDB("embedded:/tmp/","admin","adminpwd", OrientDBConfig.defaultConfig());

/** THIS IS VERY MUCH ONLY FOR LOCAL TESTING **/
if(orientDB.exists(name))
    orientDB.drop(name);

if(!orientDB.exists(name)) // if the database does not already exist, create it.
    orientDB.execute("create database " + name + " PLOCAL users ( admin identified by 'adminpwd' role admin)");
db = orientDB.open(name, "admin", "adminpwd");

Error Querying OrientDB: Cannot query demodb database

copy iconCopydownload iconDownload
select * from Profiles
select * from `Profiles`
-----------------------
select * from Profiles
select * from `Profiles`

Get date using subprocess python?

copy iconCopydownload iconDownload
import calendar

output_split = output.split("\n")
dates = []
months = {month: index for index, month in enumerate(calendar.month_abbr) if month}
for i in output_split:
    y = i[29:-21].split()
    dates.append(f"{y[1]}/{months[y[0]]}/{y[2]}")
print(dates)
-----------------------
from datetime import datetime
import re

pattern = re.compile(
    r"\b((?:(?:Jan)|(?:Feb)|(?:Mar)|(?:Apr)|(?:May)|(?:Jun)|(?:Jul)|(?:Aug)|(?:Sep)|(?:Oct)|(?:Nov)|(?:Dec))\s+\d\d?\s+(?:[12]\d\d\d))\b"
)

format = '%b %d  %Y'

data = '''\
drwxr-xr-x 2 root root  4096 Apr 25  2019 friendship_graph_434
drwxr-xr-x 2 root root  4096 Jul 18  2019 friendship_graph_453
drwxr-xr-x 2 root root  4096 Sep  3  2019 friendship_graph_465
drwxr-xr-x 2 root root  4096 Oct  2  2019 friendship_graph_468
drwxr-xr-x 2 root root  4096 Oct  4  2019 friendship_graph_471
drwxr-xr-x 2 root root  4096 Oct 15  2019 friendship_graph_477
drwxr-xr-x 2 root root  4096 Nov  6  2019 friendship_graph_471
drwxr-xr-x 2 root root  4096 Apr 29  2020 friendship_graph_496
drwxr-xr-x 2 root root  4096 Nov 27  2019 friendship_graph_497
drwxr-xr-x 2 root root  4096 Dec  3  2019 friendship_graph_49
drwxr-xr-x 2 root root  4096 Dec  4  2019 friendship_graph_498
'''

lines = data.splitlines()
for line in lines:
    m = pattern.search(line)
    s = m.group(1)
    d = datetime.strptime(s, format)
    print(d.date())
-----------------------
import subprocess

output = subprocess.getoutput("ssh -i /path-to-key ubuntu@IP ls -l /opt/orientdb/databases | awk -F' ' '{print $6, $7, $8}'")
print(output)
lines = data.splitlines()
format = '%b %d  %Y'# Will parse strings like April 25 2019
# format = '%Y-%m-%d' will parse strings like 2019-04-25

for line in lines:
    date = datetime.strptime(line, format)
    print(date)
    # should get something like datetime.datetime(2019, 4, 25, 0, 0)
-----------------------
import subprocess

output = subprocess.getoutput("ssh -i /path-to-key ubuntu@IP ls -l /opt/orientdb/databases | awk -F' ' '{print $6, $7, $8}'")
print(output)
lines = data.splitlines()
format = '%b %d  %Y'# Will parse strings like April 25 2019
# format = '%Y-%m-%d' will parse strings like 2019-04-25

for line in lines:
    date = datetime.strptime(line, format)
    print(date)
    # should get something like datetime.datetime(2019, 4, 25, 0, 0)

Orientdb python list databases?

copy iconCopydownload iconDownload
from datetime import datetime, timedelta
    
d = datetime.today() - timedelta(days=30)

# 'X' would be whatever the database create date name parameter is
for db_name in db_names:
    if db_name['X'] <= d:
        print(db_name)

How to determine the direction of an edge between vertexes in a Graph Database such as OrientDB

copy iconCopydownload iconDownload
Person -Owns-> Car
Person <-BelongsTo- Car
Person -Ownership-> Car
Person <-Ownership- Car
-----------------------
Person -Owns-> Car
Person <-BelongsTo- Car
Person -Ownership-> Car
Person <-Ownership- Car
-----------------------
Person -Owns-> Car
Person <-BelongsTo- Car
Person -Ownership-> Car
Person <-Ownership- Car
-----------------------
Person -Owns-> Car
Person <-BelongsTo- Car
Person -Ownership-> Car
Person <-Ownership- Car

Orientdb : database closed exception while fetching records

copy iconCopydownload iconDownload
 try(ODatabaseSession ses_orient = getConnPool(dbnae).acquire();){
     OResultSet rs = ses_orient.query(query);
     rs.stream()
        .forEach(x -> System.out.println(x.getProperty("propertyName")));
     rs.close();

}

Impossible to use gremlin in OrientDB Studio

copy iconCopydownload iconDownload
    <handler class="com.orientechnologies.orient.server.handler.OServerSideScriptInterpreter">
        <parameters>
            <parameter value="true" name="enabled"/>
            <parameter value="SQL,GREMLIN" name="allowedLanguages"/>
        </parameters>
    </handler>

Alternative for deprecated command() function in orientDB

copy iconCopydownload iconDownload
@Deprecated
<RET extends OCommandRequest> RET command(OCommandRequest iCommand)

Community Discussions

Trending Discussions on orientdb
  • Using the 'astar' function of OrientDB: an SQL call in Java
  • Connecting to an embedded OrientDB server in Java
  • Error Querying OrientDB: Cannot query demodb database
  • Get date using subprocess python?
  • Orientdb python list databases?
  • Run orientdb server from c#
  • How to determine the direction of an edge between vertexes in a Graph Database such as OrientDB
  • Orientdb : database closed exception while fetching records
  • Impossible to use gremlin in OrientDB Studio
  • Alternative for deprecated command() function in orientDB
Trending Discussions on orientdb

QUESTION

Using the 'astar' function of OrientDB: an SQL call in Java

Asked 2021-Dec-07 at 23:33

I'm using OrientDB to represent large city maps and calculate the shortest traversal times between a pair of nodes when the need arises. I have the following method:

public void getShortestPath(int from, int to){
    String query = "SELECT astar(?, ?, time, direction=OUT, customHeuristicFormula=EUCLIDEAN) FROM V";
    OResultSet set = db.query(query, getNode(from).getProperty("@rid"), getNode(to).getProperty("@rid"));
}

The getNode(nodeID) method returns the OVertex object present in the database, hence we can identify the @rid. Clearly, this method serves no purpose as is.

My issue comes when trying to call the astar query on the database (i.e. line two of the method). I'm getting the following error: OCommandSQLParsingException: Error parsing query upon reaching the first ( (i.e. error encountering the open bracket). Removing the brackets entirely simply resulted in the same error occurring on the # in front of the first @rid value.

I can't seem to find any example of using this function in practice, and (at least I think) I'm using the function call as suggested by the documentation. Look forward to hearing your thoughts.

I'm using the most recent version of OrientDB: 3.2.3

ANSWER

Answered 2021-Dec-07 at 23:33

Turns out the error had nothing to do with the bracket itself. Passing the "direction='OUT'" and "customHeuristicFormula='EUCLIDEAN'" parameters in as part of the string was the problem. The below block did the trick.

    String sql = "SELECT ASTAR(" + getNode(from).getProperty("@rid") + ", " + getNode(to).getProperty("@rid") + ", time) FROM V";
    try(OResultSet set = db.query(sql, "direction='OUT'", "customHeuristicFormula='EUCLIDEAN'")) {
         // some code...
    }

Source https://stackoverflow.com/questions/70255040

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install orientdb

Yes. OrientDB is totally written in Java and can run on any platform without configuration and installation. The full Server distribution is a few MBs without the demo database. Do you develop with a language different than Java? No problem, look at the Programming Language Binding.

Support

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Share this Page

share link
Compare Database Libraries with Highest Support
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.