April 22, 2024

SamTech 365

PowerPlatform, Power Apps, Power Automate, PVA, SharePoint, C#, .Net, SQL, Azure News, Tips ….etc

Local VS Distributed databases

Author : DAOUDI Samir | Context : MSc Software Engineering – Computer Structure

In parallel to the enhancement of machines’ performances and the amelioration of the programming languages to provide easy and efficient tools for programmers to develop new software and provide solutions for the latest problems; Storing permanently data in a secure store is one of the attractive fields in IT.
The 1st solution to overcome the volatility of memory is to store content in an organized files out in hard disks. For long time, this was considered a good solution until the time where files became very large, and the content within a file got a real complex structure with relations between different parts and fields. At that time the needs for more structured data store was urgent.

Databases are the solution for this requirement, different databases types exist each type has its own properties and is more appropriate to specific situation. ‘Database technology had quickly evolved in the past three decades’ [1] and different types of databases has been developed as the hierarchal, relational …etc.

Focusing in distributed databases, this type of databases can be defined as ‘a collection of multiple, logically interrelated databases distributed over a computer network.’[2].

In order answer the different questions related to the distributed databases, I would provide an example of situation in which this type of database is the most suitable.

Let’s assume that a company A has different department that are geographically distributed, each department is responsible of a specific task, for example : Finance, Production,Sales,ITC …etc.
The database has been designed in a way that each function is separated using schemas so all the finance’s tables, views, stored procedures …etc are under the schema ‘Finance’.

Each location will hold a subset of the database (one or two schemas) and generally users will access their local schemas except is some situations; the company would also make a replication of the data (by night) to the head offices.

Q1: When would you choose to implement distributed databases, rather than local databases?
A1: In the case of geographically distributed locations that need only a sub set of the data and rarely the entire database object.

Q2: Would you go for this design if all your computers were localized in one building?
A2: No, except if we want to put in place a redundancy, disaster recovery plan or high availability.

Q3: What if they are spread out in your country?
A3: In this case we can decide to have distributed databases.

Q4: What would you recommend when they are spread worldwide?
A4: Different recommendations can be applied for both countrywide or worldwide distributed database. The design of the database is very important, objects must be grouped by function and location and the database can be divided in schemas (stored generally in filegroups).
The security aspect should also be well designed; a consultancy in the field is much appreciated.

Q5: When would you mirror databases and when would you use databases tailored for the local environment?
A5: Using mirror databases is often suitable in can we need to have a disaster recovery plan, this assure that we have an exact copy of the data elsewhere and the solutions increases also the database availability [3].

It is suitable to use tailored database for local environment in specific situations for example : failure detection, database policies such as concurrency control and synchronization.
A specific development paradigm known as AOSD (Aspect-oriented software development) is the appropriate programming approach for this very special type of distributed databases[4].


[1] Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H. V. Jagadish ‘Database modeling and design: logical design’,2011. ISBN: 978-0-12-382020-4.

[2] M. Tamer Ozsu,Patrick Valduriez , ‘Principles of Distributed Database Systems’,2011. ISBN:978-1- 4419-8833-1.

[3] Microsoft Technet ‘Database mirroring overview’, http://msdn.microsoft.com/en- us/library/ms189852.aspx

[4] Tesanovic, A.; Ke Sheng; Hansson, J ‘Application-tailored database systems: a case of aspects in an embedded database’, Dept. of Comput. Sci., Linkoping Univ., Sweden. July-2009.
IEEE Xplore. http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=1319803