Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What should be stored in the database (RDBMS)?

Are there any guidelines/best practices for deciding what type of data should be stored in the database?

For ex., is it ok to use database to store

  1. Application logs
  2. Configuration details (like server IP addresses etc.)
  3. System information (e.g., names of shell scripts, scheduling information for batch jobs, batch jobs status etc.)

I have seen applications that use database for storing these. Is this acceptable? What are the pros and cons of such a design?

like image 991
Rahul Avatar asked Nov 27 '08 09:11

Rahul


1 Answers

To answer this question we have to understand what database storage provides that isn't available in say, flat file storage.

  1. security - You can store stuff and be sure that updates, deletes and views would be controlled
  2. audit - you can keep track of who made changes and when
  3. distributed servers - if you have multiple application servers accessing a single database, you avoid storing the same data in multiple places

If these are desirables for your data, it's a good idea to store them in the database.

like image 95
alok Avatar answered Oct 13 '22 14:10

alok