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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:08:27+00:00 2026-06-06T05:08:27+00:00

So I was pondering about certain problem involving serialization of objects to relational databases.

  • 0

So I was pondering about certain problem involving serialization of objects to relational databases.

Let’s say you have N different objects, all implementing a certain interface (a directed graph interface for that matter. they provide methods such as getIncomingNodes() , getOutgoingNodes()).

If each such object has a corresponding table in a relational database,
What’s the best practice of serializing such a directed graph to a relational database?

Assuming N is small, (in my case, N=3) I decomposed all possible links to be contained in a separate table.
For example, A table of links directed from object x to y will be similar to:

tbl_links_X_Y {
int X_id
int Y_id
}

Problem is , you get N^2 such tables – not very efficient, and could prove difficult to extend in the future to N+1 objects.

Is there any pattern that solves that issue? (even if it does not involve relational databases, I would be happy to hear…)

Thanks!o

  • 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-06T05:08:30+00:00Added an answer on June 6, 2026 at 5:08 am

    So recently I ran into a NoSQL framework calls OrientDB
    That DB engine handles this issue exactly.
    It is a graph database that has the ability to perform SQL queries and lazy-load object (such as neighboring vertices) that are pointed by another object.

    One thing that remains is to compare the performance of this framework to that of a traditional SQL database. (Of course, I’ll have to take into account the time it would take for constructing the objects from the raw responses to the query in a traditional SQL database.. )

    Once I’ll have the results of this comparison i’ll post them here.

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

Sidebar

Related Questions

I am wondering how I would go about performing a certain function if a
I am pondering about partial specialization . While I understand the idea, I haven't
everyone! new to here and been pondering about this myself for some times with
Just wondering about some practice about this; I have made a simple visual C#
I have been wondering about the reload() function in python, which seems like it
I don't even want to think about how many man hours have been spent
Just wondering about how to avoid Magic Strings in Querystrings? I have a lot
Of course after hours of pondering this problem, the first comment on my question
So, I have a database (With a table called users) that let's users connect
Refreshing the ModelState Hi, I have a question about the ModelState in an ASP.NET

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.