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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:42:54+00:00 2026-06-14T14:42:54+00:00

I’m currently working on a SQL Server relational database which will be accessed through

  • 0

I’m currently working on a SQL Server relational database which will be accessed through the Entity Framework. I have a couple of questions that I cannot seem to find proper answers to.

Please see my database model diagram:

enter image description here

1.
I’m not quite sure if the ProblemType implementation is the right way to go. As it has been set up now, both columns allow null values in ProblemType since it will either contain a ProblemTypeRoadID or a ProblemTypeVandalismID. So the question is really if it is possible to de-normalize the model by removing the ProblemType table and relate both ProblemTypeRoad and ProblemTypeVandalism in the ProblemDesc table?

2.
Looking at the Problem table you will find a column named HistoryIDs. This column should contain a comma-separated string with all the HistoryIDs related to a Problem. A HistoryID is essentially a ProblemDescID (since a ProblemDesc gets its IsHistory column set to true whenever it is updated) as the ProblemDesc is copied whenever changed.
My question is: what is the best way to add multiple ProblemDescIDs to the HistoryIDs column? If it was something like “1,5,7” it would be easy to find all the histories for a given ProblemDesc.

3.
Any other suggestions for the diagram is also very welcome 🙂

Thanks in advance!

EDIT: Please consider the revised diagram:

enter image description here

Now that you have given me some great suggestions for improvement, I have tried to implement most of your suggestions. ProblemType has been removed and ProblemHistory added. Changes have also been made to how WorkerComment and Media relate to their parent tables.
Would this implementation work?

Thanks!

  • 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-14T14:42:55+00:00Added an answer on June 14, 2026 at 2:42 pm
    1. You can remove the problemtype table, and just relate problemtyperoad and problemtypevandalism to the problemtype table with the problem type id

    2. No, it shouldn’t. You should have a table ProblemHistory with columns ProblemID and HistoryID with a row for each History.

    3. It seems you can have a worker comment that relates to multiple problems. Should it be the other way around? Similarly for media and ProblemDescs. Can only one worker work on a problem? Also, MSSQL has a geography type that you can use instead of CoordinateLat and CoordinateLng.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have an autohotkey script which looks up a word in a bilingual dictionary
I have an array which has BIG numbers and small numbers in it. I
I have a text area in my form which accepts all possible characters from
I have a view passing on information from a database: def serve_article(request, id): served_article
I have a reasonable size flat file database of text documents mostly saved in
I am trying to loop through a bunch of documents I have to put
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.