tags:

views:

10

answers:

2

I need to create a table to save the bugs of an application that have access on it many users, in a way to stock the bugs and manage them lately. So I need to have a key field that will be unique but identify the bug, have a meaning and also light on the server Does anyone have an idea about that case ?

A: 

Create a bugs table with an ID, description. This will be a list of the different bug types that can occur.

Then create another table that links occurrences to the bug types table. In this table you can store the timestamp, the user id it happened to, {other useful data}.

Hope that helps.

Evernoob
+1  A: 

Primary keys with meaning are generally a bad idea. As soon as it has a meaning, someone will want to change it for a record, which can create headaches. I'd suggest sticking with an identity/autonumber type field and giving the users a way to search for their item by a field that would be more meaningful to them like title.

JohnFx