Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I need to design a database that will contains information about personal disease of users.

What can be the approach in order to implement the columns of the DB's tables: encrypt the information, separate data within two differents DB, one for sensitive data and another for not sensitive data, or both or another approach?

share|improve this question
1  
Who do you need to protect the data from? –  Oded Apr 12 '12 at 15:06
    
Good question but, perhaps this should be migrated to dba.stackexchange.com/questions ? –  FrustratedWithFormsDesigner Apr 12 '12 at 15:11
    
@Oded the dba should not be able to view the information about disease of the user of the database. –  carlo Apr 12 '12 at 15:13
2  
But who shouldn't? –  Oded Apr 12 '12 at 15:16
1  
You could encrypt it on the application side but the application would have the key. Is this a web application that is "inputing" the data? –  Ominus Apr 12 '12 at 15:18

2 Answers 2

up vote 3 down vote accepted

You could encrypt the data with a key stored in your web application so that the data is written/read from db in its encrypted form. However anyone with access to the code would have access to the key and with the key the unencrypted data. This solves the requirement

the dba should not be able to view the information about disease of the user of the database.

As far as using to separate databases I don't think that is needed. You are storing the data encrypted and using database permissions by user, table (if that's even needed) will be more than enough. I think the extra DB adds a layer of complexity without much else. Unless its at a different location, then it might have a SMALL improvement from a single database system.

share|improve this answer
1  
Another reason for separate data bases is a legal or contractual requirement that the sensitive data must be stored within a jurisdiction (not on the cloud). –  Gilbert Le Blanc Apr 12 '12 at 16:00

For this type of application you need to think about who should be allowed to access the data. With medical information I think it sould be restricted to the user who entered it and anyone they gave permission to view it.

In order to prevent the DBA from viewing the data you will have to encrypt it using a code that the DBA does not have access to.

You also need to encrypt the information in a way that the application programmer can't access it either. There's no point in encrypting the information from the DBA if a programmer can log in as any user.

You also don't want to encrypt all the data with the same code. The software might have a bug that shows one user the information of another. So it would probably be best to encrypt each users data using a code specific to that user.

It is important to note that you need to encrypt more than just the medical information; as an end user I wouldn't want your DBA even knowing I have a medical condition, let alone what it is. So you'll need to also encrypt any personally identifying information about the user. This includes such things as:

  • name
  • date of birth
  • email address
  • sex
  • address
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.