Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8326865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:54:45+00:00 2026-06-09T00:54:45+00:00

For example, two simple vertices in an OrientDB Graph: orientdb> CREATE DATABASE local:/databases/test admin

  • 0

For example, two simple vertices in an OrientDB Graph:

orientdb> CREATE DATABASE local:/databases/test admin admin local graph;       
Creating database [local:/databases/test] using the storage type [local]...
Database created successfully.
Current database is: local:/graph1/databases/test
orientdb> INSERT INTO V (label,in,out) VALUES ('vertexOne',[],[]);                                                                                                                 
Inserted record 'V#6:0{label:vertexOne,in:[0],out:[0]} v0' in 0.001000 sec(s).
orientdb> INSERT INTO V (label,in,out) VALUES ('vertexTwo',[],[]);
Inserted record 'V#6:1{label:vertexTwo,in:[0],out:[0]} v0' in 0.000000 sec(s).

Is there a way to create an edge between these two vertexes by only knowing their ‘label’s, not their ‘RID’s?

For example (doesn’t work):

orientdb> INSERT INTO E (label, in, out) VALUES ('is_connected_to', (SELECT @rid FROM V WHERE label = 'vertexOne'), (SELECT @rid FROM V WHERE label = 'vertexTwo'));
Inserted record 'E#7:0{label:is_connected_to,in:null,out:null} v0' in 0.001000 sec(s).

I’ve tried ‘FLATTEN’ as a potential workaround. No luck:

orientdb> INSERT INTO E (label, in, out) VALUES ('is_connected_to', (SELECT FLATTEN(@rid) FROM V WHERE label = 'vertexOne'), (SELECT FLATTEN(@rid) FROM V WHERE label = 'vertexTwo'));
Inserted record 'E#7:1{label:is_connected_to,in:null,out:null} v0' in 0.001000 sec(s).

The edges created are between null and null. No dice.

I was hoping to use OrientDB SQL for this since I have a very large import of connections and the SQL approach seems to be faster.

However, if this isn’t possible, any suggestions about an alternative for batch importing edges (roughly 2M)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T00:54:47+00:00Added an answer on June 9, 2026 at 12:54 am

    SQLCreateEdge is probably what you’re trying to do:

    create edge from
    (select from V where label = 'vertexOne')
    to
    (select from V where label = 'vertexTwo')
    set label = 'is_connected_to'
    

    however, for very large import of connections i suggest SQLCreateLink. this gem is suggested here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to create a simple site on NodeJS. For example, it has two
I have a simple admin I'm creating for a client using PHP and Mysql.
For example, in this simple function where fun1 takes as input two numbers, adds
Two simple questions and my brain's not working. I'm using Floyd's Algorithm and trying
I need to add two simple polynomials (represented as strings). The following example would
I made a really simple java example with two files: Dog.java contains: package com.greg.dog;
I have a very simple two column setup shows below. However in example one
I am using EF (Framework 3.5 SP1) and have a simple two table demo
for example a have simple rails app with two models, users and books. now
How can I concatenate two char columns within a perform screen? example: table sample

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.