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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:12:14+00:00 2026-06-08T12:12:14+00:00

I have a database structure issue I am looking for some opinions on. Let’s

  • 0

I have a database structure issue I am looking for some opinions on.

Let’s say there is a scenario where users will use an application to request materials.

There is the need to track who the requester is.

There are three possible “types” of requesters. An individual (Person), a Department, and the Supplier supplying the materials themselves.

In addition the Supplier object needs to be related as the Supplier as well.

So the idea is in the Request table there is a RequestedByID FK. But the related requester has such a different structure for the data for each that it would require a completely denormalized table to related back to if it were made just a single table (people have different properties than departments, and suppliers).

I have some ideas on how I might handle this but thought the SO community would have some great insight.

Thanks for any and all help.

EDIT:

pseudo structure:

Request

RequestID
RequesterID

Department

DepartmentID
DepField1
DepField2

Person

PersonID
PersonField1
PersonField2

Supplier

SupplierID
SuppFiel1
SuppField2

Department, Person, and Supplier all have separate tables because they differ in their properties quite a bit. But each of them can serve as the Requester of a Request (RequesterID). What is the best way to accomplish this without one (denormalized table) full of the different possible requesters?

Hope this helps. . .

  • 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-08T12:12:15+00:00Added an answer on June 8, 2026 at 12:12 pm

    You need what is in ER modeling know as inheritance (aka. category, subtype, generalization hierarchy etc.), something like this:

    enter image description here

    This way, it’s easy to have different fields and FKs per requester kind, while still having only one REQUEST table. Essentially, you can varry the requester without being forced to also vary the request.

    There are generally 3 ways to represent inheritance in the physical database. What you have tried is essentially the strategy #1 (merging all classes in single table), but I’d recommend strategy #3 (every class in separate table).

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

Sidebar

Related Questions

let's say I have a database structure like below: Students +--------------+--------------------+-------------------+ | student_id |
I have to choose the structure of a database that will store content types
I have issue where i want to create Dynamic function which will do some
I have this database structure, SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; CREATE TABLE IF NOT EXISTS `announces` (
I have mysql database structure like below: CREATE TABLE test ( id int(11) NOT
I have such database structure (1 - one, 0 - many) Product 1->0 Orders
I have the following database structure. ID | Name | Marks I am trying
In my application I have a complex database structure. In order to generate the
If I have a database with the structure: ___id_____|____value____ 1 | value1 2 |
i have a question regarding the efficiency of word press database structure. My intended

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.