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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:52:03+00:00 2026-05-20T19:52:03+00:00

Can you comment on the below design. Am I setting myself up for destruction

  • 0

Can you comment on the below design.
Am I setting myself up for destruction with this sort of design? I have been designing systems over and over again because of completely new requirements that can’t be hacked in designs so now I’m looking long term solution to have the most flexible system.

With this design I could dynamically create complexity and designs like below now I realize the implementation won’t be straight forward so before I spend days on it I wanted to get some real input.

Is that a common no-no or is that common?
Any input would be appreciated.
schema

instance
    firstname   bob
    lastname    gates
    scoreone    20
    scoretwo    90
    scorethree  
        scorethreePart1 30
        scoreThreePart2 32


    CREATE DATABASE uni;
use uni;

CREATE TABLE instance (
ID                          INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
ParentID                    INT DEFAULT NULL,
FOREIGN KEY         (ParentID) REFERENCES instance(ID) ON DELETE CASCADE
) ENGINE=InnoDB;

CREATE TABLE keyval_connector (
ID                          INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
ParentID                    INT NOT NULL,
TextKey                     VARCHAR(255) NOT NULL,
Note                        TEXT DEFAULT NULL,
UNIQUE(ParentID, TextKey),
FOREIGN KEY         (ParentID) REFERENCES instance(ID) ON DELETE CASCADE
) ENGINE=InnoDB;
CREATE TABLE keyval_int (
ID                          INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
ParentID                    INT NOT NULL,
Value                       INT DEFAULT NULL,
UNIQUE(Value),
FOREIGN KEY         (ParentID) REFERENCES keyval_connector(ID) ON DELETE CASCADE
) ENGINE=InnoDB;

CREATE TABLE keyval_varchar (
ID                          INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
ParentID                    INT NOT NULL,
Value                       VARCHAR(255) DEFAULT NULL,
UNIQUE(Value),
FOREIGN KEY         (ParentID) REFERENCES keyval_connector(ID) ON DELETE CASCADE
) ENGINE=InnoDB;

CREATE TABLE keyval_double (
ID                          INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
ParentID                    INT NOT NULL,
Value                       DOUBLE DEFAULT NULL,
UNIQUE(Value),
FOREIGN KEY         (ParentID) REFERENCES keyval_connector(ID) ON DELETE CASCADE
) ENGINE=InnoDB;

CREATE TABLE keyval_datettime (
ID                          INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
ParentID                    INT NOT NULL,
Value                       DATETIME DEFAULT NULL,
UNIQUE(Value),
FOREIGN KEY         (ParentID) REFERENCES keyval_connector(ID) ON DELETE CASCADE
) ENGINE=InnoDB;
  • 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-20T19:52:03+00:00Added an answer on May 20, 2026 at 7:52 pm

    It looks like you’re going for an Entity-Attribute-Value (EAV) Model, which has its uses in some situations. Without knowing the specifics of your requirements, it’s hard to say if this is a valid use case.

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

Sidebar

Related Questions

I have a function where I can add articles and users can comment on
As you know the dash introduces a comment how can I make this valid?
I'm trying to figure out how I can have a comment header automatically added
how can I write, as a comment within a file, the mode that this
I have a simple comment section where users can post comments to another users
If I integrate Facebook Connect on my website so Facebook users can comment on
i am developing a website on writing reports ...users can comment on a report
I'm trying to write a commenting system, where people can comment on other comments,
I'm trying to code a page where you can post a comment without reloading
So on my site, a user can post a comment on 2 things: a

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.