How do I keep a database physically secure? This is more of a conceptual question. I am learning how to integrate Java and databases (using PostgreSQL at the moment) and my initial questions is: 


  What are the guarantees that the data I create will remain safe? 


For example, if I have a simple website hosted on my computer, what is the guarantee that data will remain safe from physical elements (HD failure or any kind of hardware deficiency)?


  What are the procedures used in small and big databases to prevent this kind of problem? Should the databases be stored in a separated locked up machine?


Thanks.
This is quite broad and the answer largely depends on how much your data is worth to you? 

If you are from Amazon and you are storing millions of credit card numbers, then loss and/or revealing that data to third parties could be potentially costly in terms of fines from regulatory bodies and loss of consumer trust and future customers. 

If they are the scores from your daughter's little league soccer, then the consequences mightn't be as severe financially (although annoyed little girls have ways of making that feeling very clear :-) ).

Maybe you could explain your potential exposure in more detail and ask more specific questions and you might get better advice tailored to your precise needs?

Take a look here (and links within) on how to ask good questions. This site is a great resource and it's worthwhile making the effort to follow the guidelines. Help us to help you!