Search code examples
sql-server-2008database-designasp.net-mvc-4bug-tracking

Database designing for a bug tracking system in SQL


I am an ASP.NET developer and I really dont do such of database stuff. But for my open source project on Codeplex I am required to setup a database schema for the project.

So reading from here and there I have managed to do the following.

enter image description here

As being new to database schema designing, I wanted some one else who has a better idea on this topic to help me identify any issues with this design.

Most of the relationships are self explanatory I think, but still I will jot each one down.

The two keys between UserProfile and Issues are for relationships between UserId and IssueCreatedBy and IssueClosedBy

Thanks


Solution

  • This looks quite good, IMO your main issue is on naming consistency & simplicity.

    • If each table identifier is Id, you should use it for all tables.
    • Stay consistent with singular / plural in table names. I tend to prefer singular.

    You can simplify a table name :

    • UserProfile => User

    As well as field names :

    • Issue_Title => Title
    • Issue_Description => Description
    • Issue_Priority_Type => Type (or even less confusing: Name)

    etc.

    However I would use a more precise naming for foreign keys

    • CreatedBy => CreatedByUserId
    • ClosedBy => ClosedByUserId

    HTH.