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 6923231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:30:34+00:00 2026-05-27T10:30:34+00:00

When looking at the Tinkerpop-Blueprints API it is quite straight forward to use one

  • 0

When looking at the Tinkerpop-Blueprints API it is quite straight forward to use one type of vertices but how can I store two? E.g. Users and their interests?

And how can I get a Vertex by id? I mean, there could be a user named ‘timetabling’ as well as the interests ‘timetabling’ – how to handle that id conflict?

–

I know that the first problem could be solved via introducing an index for a type-property and for the second problem I could auto generate the id and create another index for the name-property. BUT why would I then need the vertex id at all? E.g. for the in-memory there is a HashMap for all vertices which would be of no use and wasting memory! (I could solve the problem differently via combining type and name as the id but then it would inefficient if I e.g. list all users.)


Hmmh, ok. I’m just using the vertices for the combined id (name+type) and a separate index for type. Better solutions?

  • 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-05-27T10:30:34+00:00Added an answer on May 27, 2026 at 10:30 am

    In general it is best to rely on the automatic ID system of the underlying graph database (e.g. Neo4j, InfiniteGraph, OrientDB, etc.). The way in which you would add the information you want is as follows:

    Vertex v = graph.addVertex(null)
    v.setProperty("name","timetabling")
    
    Vertex marko = graph.addVertex(null)
    graph.addEdge(null, marko, v, "hasInterest")
    Verte aType = graph.addVertex(null)
    graph.addEdge(null, aType, v, "hasType")
    

    In short, the ID of a vertex/edge is a non-domain-specific way of retrieving vertices/edges. Generally, it is best to use properties in your domain model for indexing.

    Hope that speaks to your question,
    Marko.

    http://markorodriguez.com

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

Sidebar

Related Questions

looking for windows software who can draw a Use Case diagram like yuml.me anyone
Looking at the processmodel element in the Web.Config there are two attributes. maxWorkerThreads=25 maxIoThreads=25
Looking for a C++ async HTTP library so I can download some zip files
Looking through the Django docs and trying to figure out the use of the
Looking to validate PO Box but wanted to know if such validation existed. I
Looking for a c# class or similar that can parse or convert wiki-formated text
Looking at the following image: What tool should I use to get the coordinates
Looking through the documentation for CFDataRef I can't see anything that will compress a
Looking for some help with optimising the query below. Seems to be two bottlenecks
Looking to produce some effects using particles bleeding into one another and slowly fading

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.