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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:39:57+00:00 2026-06-13T12:39:57+00:00

I have an entity called Project. Every project has group of members assigned to

  • 0

I have an entity called Project. Every project has group of members assigned to it. From every member I’m collecting some information, e.g. age, height etc.. Some of them are numerical-type, some text-type, some logical-type (boolean). There are several dozen of informations, which can be collected.

This, which information I’m collecting in particular project, defines the project itselves. In single project I used to collect several, like 3-5, informations. In some projects I can collect the same, or similar sets of informations. And this, what interests me, is making statistics of all projects, in which I have collected particular information.

The question is: what should be the architecture of the table(s) containing those informations? Having one big table with several dozen of columns with many null-values in each row doesn’t sound good, especially since I will have thousands, or even millions of those in my database. But having a table per project (and as many tables, as many projects), in which I’m collecting only the information, doesn’t sound good either, since to make a statistics from all of the projects would require using dynamic SQL (variable table names – depending on project) and iterating over hundreds of them. Also having a table per option, or even option-type (logical, text, boolean) doesn’t seem to be the proper way to do it.

I’m using PostgreSQL database. I know, that some databases have something like ANYTYPE (e.g. sql_variant in Microsoft SQL Server, or ANYDATA in Oracle), but PostgreSQL doesn’t, what makes me a little bit confused.

I’m quite sure there is a better solution for this, but I can’t figure it out. Could you, please, help me to find it?

Thanks in advance for every single response.

  • 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-13T12:39:58+00:00Added an answer on June 13, 2026 at 12:39 pm

    There’s a table inheritance feature built in postgresql which let you run queries on a table hierarchy.

    Look there and there in the postgresql documentation for a good tutorial.

    These explain how to build tables inheriting from one table: all the fields in the parent table are automatically included in the child tables, and all queries run on a parent table are run on child tables (but not the opposit, or on sibling tables) and results are concatenated, unless the special keyword ALONE is used to qualify the query (or clause maybe) as restricted to a single table.
    You should be careful with constraints, because they do not cross table boundaries. In other words, if a constraint is set on a parent table, it will be restrained to that table alone, and child or sibling tables might contain duplicate of rows in the constrained table.

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

Sidebar

Related Questions

I have an Google App Engine entity called MyFile. It has properties such as
I have a project in Asp net mvc. An entity called product can not
In my project I have some objects that I show from a server, lets
I have an entity called File, I created a partial class with a property
I have an entity called Entry connected to multiple TimeWindows. I want to clear
I have an abstract entity called Block which contains two attributes: column and order
I have a GAE Entity called MyFile public class MyFile { static enum LocationEnum
I have a db.BlobProperty property (called Icon) in my entity which contains an image
I have entity Recipes and it has a HasMany collection comments. In a MVC
Using Doctrine 2. I have an entity called 'size' and I'm trying to form

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.