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

  • Home
  • SEARCH
  • 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 511227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:11:42+00:00 2026-05-13T07:11:42+00:00

I encountered an interesting SQL table (column names listed): From_TableName | From_Id | To_TableName

  • 0

I encountered an interesting SQL table (column names listed):
From_TableName | From_Id | To_TableName | To_Id

From what I understood, this table is used for all table relationships in the database. There’s not a lot of data (more than 10000 lines in the previously mentioned table) in the database, so, I guess, performance was not that important. I’m not a SQL expert, so I decided to ask here: should I send this to DailyWTF or is this a viable solution in some situations?

My thoughts: I just don’t see any upsides with this approach. Sure, you only need one table for all your relationships, but that’s hardly a plus. And I’m not sure if there’s really less work, when you create a new table. Unless you want to let your users do anything at all, there must be some kind of validation logic (what kind of relationships are valid) somewhere and you need to update that.

  • 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-13T07:11:42+00:00Added an answer on May 13, 2026 at 7:11 am

    This was most probably used in mapping Entity-like objects in the application layer (hopefully) and not in the sql database itself.

    And even though it is not recomended, I have seen these approaches before.

    This can lead to some serious performance issues, but as you said, the database was quite small.

    I do not think that this fully warants a DailyWTF though.

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

Sidebar

Related Questions

I encountered the following ddl in a pl/sql script this morning: create index genuser.idx$$_0bdd0011
I've encountered an interesting problem while developing for our legacy XWindows application. For reasons
Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.
I encountered this term Hindley-Milner , and I'm not sure if grasp what it
We encountered a problem with using Subversion on Windows. A developer committed a file
I encountered a problem when running some old code that was handed down to
I encountered the above error message after applying the OutputCache attribute on ActionResult methods
I encountered a, at least to my expectations, strange behavior in the binary serialization
I encountered a strange problem today. Whenever i put a breakpoint in one of
I encountered some code reading typedef enum eEnum { c1, c2 } tagEnum; typedef

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.