DPSA - Database


Here we are starting to get to deeper into the application architecture planning. Database forms the persistence layer of any application, not just web application. It would not be wrong to say entire business depends on this layer and is also known as base. It holds various types of information - customer, credentials, business data, reporting, data related to your core services or products etc. It won’t help you here, if you hate redundancy - cause to keep a backup we need to have a redundancy planning in place, otherwise in case of any event, if not man made - natural disaster, you will loose all the data and you will be out of business just like that. There is a reason why big players like to maintain their data centers in different geographies. Certain points that you should focus on while designing your database:-

  1. Type of data base i.e. SQL or NoSQL. I personally believe NoSQL data base is the best choice today. But it may not be the case that you have to make your application completely dependant on this. There would be parts where you need to go the SQL/Relational database way. You need to get the perfect blend of both the types.
  2. Table and extended tables - Be very careful in defining base tables and the fields/columns they have in case of relational databases. The designing phase should focus on reducing the I/O transactions on the as it would help gain optimum performance. In case of NoSQL, it inherently gets you the best performance, but still there is a scope of improvement. The relations in NoSQL databases are defined by referencing other object _ids’ into current document, make sure you don’t get lost in the elastic collection schema. You may even tend to store unnecessary redundant data - beware and avoid that.
  3. Schedulers - You would need schedulers for many reasons, one of them is to keep the backup in real time sync. You may need them to keep your data within your instance updated wrt outside world. For example, you may want to maintain the price sheet of certain 3rd party services into your application just so that it improves the real time UX performance - in this case you can write a scheduler which runs as per the frequency of changes happening at 3rd party end.