I have to design and implement a database on the study course. I want to make sure that my scheme is correct. I've created a model company and a system which needs a database.
A little background about the database: The database is designed for the company who test applications for external clients. Let's say that the company offers performing acceptance and compatibility testing services. The workflow of the company:
- Seller (Client) requests for testing his application
- The ticket is created
- Ticket contains information about the application and what should be tested
- Test Manager decides which Tester should test the application (ticket)
- Tester reports defects to the application
- When testing is done, tester set a result
Other businesses requirements:
- Seller can requests for testing the application more than one time
- Only one tester can test the application (ticket) in one iteration
- History of testing should be collected and available
I'm not good into database designing, it's my first bigger project. So forgive me a basic mistakes 🙂 If the diagram is not readable so I'd be glad to hear some advices how to make it pretty. Also, if someone see some weak points, please comment it.
Best Answer
I have a few general points.
Firstly, your diagram is a bit confusing! There are lines which merge into each other and the source and destination tables aren't clear.
Secondly (and this is a matter of opinion), you might want to use
<table_name>_id
as yourPRIMARY KEY
(e.g.ticket_id
). It removes ambiguity, makes debugging easier and SQL easier to write and particularly read. My own personal convention is to uselower_case_with_underscores_id
(and lower case for identifiers generally) andUPPER CASE FOR SQL
. This makes code a pleasure to read and almost self-parsing.Also, take a look here, it's from databaseanswers.org which can be a good first port of call for database modelling projects! Try and make your diagram look a little bit more like that!
Finally, you can download F/LOSS applications for bug-tracking - there's more of them than you can shake a stick at! Again, personal recommendation, you should look at Fossil - it's by D. Richard Hipp, the same guy who's given the world SQLite!
I've watched some podcasts by him and he's impressive! At least take a look at his schema - you can be sure that thought went into it! It's BSD licenced, but I'm not sure if your professor/lecturer would be happy about you claiming his work as your own, but if you clearly refer to it, that should be OK! :-)
Be prepared to make a lot of changes - as Helmuth Von Moltke said, "no plan survives contact with the enemy" - best of luck with your project!