-1

I am working on a data base of attack patterns which has various attributes like severity of attack, attackers skill, attack likelihood all in the form of values like high, medium and low. I want to develop a metrics for risk analysis based on these attributes. Should I convert low to 1 medium to 2 and high to 3 or use some other normalization technique

1 Answers1

0

Use a lookup table

Create a new table with 2 columns: SeverityID as PK and Severity as a varchar(10)

Add 3 new records to your table with the values "Low", "Medium", and "High". Whenever you want to reference these, you can select the values 1, 2, or 3 from a dropbox which gets its data from this table. Your "AttackDetails" table (for example) will contain a SeverityID which will link to your other table in any query or view, but will still contain the ID of the item you selected. This means if you want to add items later, you can still add them to the lookup table. It also prevents the user from changing between "medium", "MEDIUM" or "normal" (or whatever they decide at the time)

Horkrine
  • 1,365
  • 12
  • 24
  • thanks for your response...Putting my question in another way, I don't want to create a database. I just want to create a formula(metrics) to rank the attacks based on their attributes. – Malik Nadeem Anwar Mohammad Jan 02 '18 at 07:33
  • You could manually add in each of the items into a dropdown menu on the screen and have them save that data (in whatever format) with the index values of those selection items. Keeping with the same LMH categories, each time you want to read in that data you'll have to have an interpreter that changes the values 123 into LMH on screen. The hardest part is going to be if you want to change any of those values or how they're implemented - as you'll have to change each implementation of this method. Hope this helps – Horkrine Jan 02 '18 at 09:10