Pedro Guerrero, Author at WATA Factory https://wata.es/author/p-guerrero/ IT Consulting & Outsourcing for your company Mon, 14 Apr 2025 14:51:24 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 https://wata.es/wp-content/uploads/2020/09/cropped-favicon_08-2020-32x32.png Pedro Guerrero, Author at WATA Factory https://wata.es/author/p-guerrero/ 32 32 NoSQL Databases: A Revolution in Data Warehousing https://wata.es/nosql-databases-a-revolution-in-data-warehousing/ Tue, 21 Jan 2025 13:43:45 +0000 https://wata.es/?p=11220 NoSQL databases, also known as ‘Not Just SQL’, represent a significant advancement in the storage and management of data. Unlike traditional relational databases, which use a rigid table schema, NoSQL databases offer flexibility and scalability, making them ideal for processing large volumes of unstructured and constantly changing data. What is a NoSQL Database? NoSQL is […]

The post NoSQL Databases: A Revolution in Data Warehousing appeared first on WATA Factory.

]]>
NoSQL databases, also known as ‘Not Just SQL’, represent a significant advancement in the storage and management of data. Unlike traditional relational databases, which use a rigid table schema, NoSQL databases offer flexibility and scalability, making them ideal for processing large volumes of unstructured and constantly changing data.

What is a NoSQL Database?

NoSQL is a database concept that enables the storage and querying of data outside of traditional relational database structures. These databases do not require a fixed schema, which means they can quickly adapt to changes in data without requiring complex restructuring. Furthermore, NoSQL databases are often distributed, ensuring data availability and reliability through replication across multiple servers

Types of NoSQL Databases

NoSQL databases can be categorized into different types, each optimized for specific types of applications:

  1. Key-Value Databases:
    They store data as key-value pairs, enabling quick and efficient access. Examples include Redis and DynamoDB. Redis is frequently used for session management in web applications, storing user session information for fast access. Many use Redis as a read database in CQRS (Command Query Responsibility Segregation) solutions. An example is the Spryker platform. In the architecture of this solution, Redis is used to store read-only information to speed up queries. An interesting use case at WATA Factory is utilizing this technology as a message bus for Django applications.
  2. Document Databases:
    These use documents (usually in JSON format) to store data, making them ideal for web and mobile applications. A well-known example is MongoDB. At WATA Factory, we had the opportunity to work with this technology, thanks to collaboration with Diego Freniche during one of the WATA Academies held at our facilities in Jerez de la Frontera. During this workshop, we worked entirely with online tools, which significantly improved the experience.
  3. Column-Family Databases:
    They store data in columns instead of rows, enabling the rapid processing of large data volumes. Prominent examples are Cassandra and HBase. Cassandra, in particular, is used in large-scale analytical platforms to process vast amounts of data efficiently.
  4. Graph Databases:
    These are designed to manage complex relationships between data, such as those found in social networks. A common example is Neo4j. They are frequently used in recommendation systems because they can execute complex queries to determine relationships between users and products

Advantages of NoSQL Databases

  • Horizontal Scalability: NoSQL databases are designed to scale easily by adding additional servers rather than upgrading the hardware of a single server. This allows them to process large data volumes efficiently.
  • High Availability and Fault Tolerance: Thanks to their distributed architecture, these databases replicate data across multiple nodes, ensuring availability even in the event of hardware or network failures.
  • Flexibility in Data Model: NoSQL does not require a fixed schema, making it easier to store various types of data (structured, semi-structured, and unstructured) without needing to adjust a predefined schema.
  • Speed and Performance: Since NoSQL databases are not reliant on resource-intensive JOIN operations or complex transactions, they typically provide high speed for reading and writing large volumes of data, especially in applications that process significant amounts of information in real-time.
  • Optimization for Big Data: NoSQL databases are ideal for processing large and growing data volumes in Big Data environments, such as social networks, user behavior analysis, or IoT applications. They are particularly suited for scenarios where data volume, variety, and speed demand a robust and scalable solution

Challenges and Considerations

Although NoSQL databases offer many advantages, they also come with several challenges that should be taken into account before their adoption.

  1. Lack of ACID Transaction Support:
    One of the most significant challenges is the lack of full support for ACID transactions (Atomicity, Consistency, Isolation, and Durability). This can limit their use in applications that require high data consistency, such as financial systems or critical transaction processes. Often, NoSQL databases prioritize availability and partition tolerance (according to the CAP theorem) at the expense of full consistency to ensure performance and scalability. This can lead to eventual consistency, where there is no guarantee that all read operations will reflect the latest data immediately or perfectly.
  2. Complexity in Selecting the Right NoSQL Database Type:
    Unlike relational databases, which are more general-purpose, NoSQL encompasses multiple types (Key-Value, Document, Columnar, Graph), each optimized for specific use cases. This means that development teams need to deeply understand their requirements to select the most appropriate database type. This can become a challenge, especially when application needs change over time or when complexity increases.
  3. Integration and Migration Considerations:
    Switching from a relational database to a NoSQL database can require significant restructuring of the data model and application code. Additionally, the learning curve can be steep for developers and database administrators unfamiliar with the new NoSQL paradigms. This steep learning curve can lead to increased time, costs, and potential errors during implementation.
  4. Lack of Mature Administration and Monitoring Tools:
    Compared to relational databases, some NoSQL systems lack advanced and mature administration and monitoring tools. This can make maintenance in large production environments more challenging, requiring additional effort and expertise.

These challenges highlight the importance of careful planning, a thorough analysis of application requirements, and proper training when implementing NoSQL databases in production environments.

Conclusion

NoSQL databases have revolutionized the way data is stored and managed by offering flexibility and scalability that traditional relational databases cannot match. Given the rising demand for web and mobile applications that process large volumes of data in real-time, NoSQL databases have become a popular choice due to their performance and ease of use.

At WATA Factory, even though this technology is not commonly used in traditional applications, we remain constantly aware of the potential benefits and improvements these tools can offer.

The post NoSQL Databases: A Revolution in Data Warehousing appeared first on WATA Factory.

]]>
MySQL vs. PostgreSQL: Experiences from a practical perspective https://wata.es/mysql-vs-postgresql-experiences-from-a-practical-perspective/ Mon, 09 May 2022 07:00:00 +0000 https://wata.es/?p=5635 Whenever we start developing a new web application, the question arises of how to work with the data. One of the most widespread solutions is relational systems. Systems like MySQL or PostgreSQL are widespread and have as many supporters as detractors. If you search the internet for the differences between MySQL and PostgreSQL, almost all […]

The post MySQL vs. PostgreSQL: Experiences from a practical perspective appeared first on WATA Factory.

]]>
Whenever we start developing a new web application, the question arises of how to work with the data. One of the most widespread solutions is relational systems. Systems like MySQL or PostgreSQL are widespread and have as many supporters as detractors.

If you search the internet for the differences between MySQL and PostgreSQL, almost all comparisons mention that MySQL has better performance and PostgreSQL offers a much wider range of functions.

It is true that MySQL has gained functionality over time, just as PostgreSQL has gained performance. The latter is also partly due to the advances and improvements in hardware.

At WATA Factory, we asked ourselves how important these differences are in practice, without getting into discussions about how many microseconds of difference thereare between one or the other, or about the number of advanced features we end up never using in our everyday lives.

MySQL: Main differences

With MySQL we can choose different database engines for each table: InnoDB and MyISAM. The latter is the one that has accompanied MySQL since its beginnings and is responsible for its reputation for being “fast”.

The speed of MyISAM is largely since it has no referential integrity constraints, triggers or other functions. While these functions are more than useful, they can slow down input operations or updates because they must be checked for each operation. InnoDB, on the other hand, has such functions and would therefore not be as fast in input operations or updates.

Another aspect is the question of blocking. Since in MyISAM the data is changed by INSERT, UPDATE or DELETE commands, blocking occurs at the table level. In InnoDB or PostgreSQL, blocking occurs at the tuple level. Therefore, if the application performs large INSERT, UPDATE or DELETE operations that affect a significant number of tuples in the table, MyISAM is much more efficient. On the other hand, if we have many small concurrent operations, InnoDB works better by blocking only the affected tuple, improving concurrency.

One might think that a DB engine that we call relational and that does not provide foreign keys is of little use and also poses a risk to data integrity. However, let’s take the case of a typical business intelligence solution where we have a star model with a central table with few relationships populated by massive processes. It is possible that a DB engine without foreign keys and with table locking is an advantage that should be considered. It should be noted that we can not only combine the two DB engines in the same schema, but also work with other transactional tables in the same schema.

One possibility, that has been suggested by some, is to use a MySQL with InnoDB for development and then move the tables to MyISAM once they are in production. Of course, this requires you to be very clear about what you are doing and to control the whole process very carefully. The idea is to control the integrity of the data during development, but to speed up the queries once they are in production.

In short, if we are going to use MySQL in our development, we should consider whether we are really going to take advantage of MyISAM. If not, it may be better to opt for other engines.

PostgreSQL and its functions

Although MySQL has integrated and continues to integrate more and more functionalities, it is true that PostgreSQL has stood out from the beginning as a more complete and free relational database management system. For many, it is considered the oracle of free software.

Among its functionalities, PL/pgSQL stands out, which is very similar to Oracle’s PL/SQL By using this language, we can introduce the complexity typical of procedural languages into our SQL: Loops, conditionals, functions…. The triggers, to give an example, can become very complex.

At the SQL level, PostgreSQL also contains window functions that enable complex SQL queries, which are particularly useful in statistical applications. Similarly, with the Rules System, we can fine-tune the execution of queries and data manipulation commands by changing the way the command is processed by the database engine.

There are other noteworthy aspects such as the link between tables and materialised views. However, a detailed presentation would require many more articles.

Therefore, with PostgreSQL we have a wider range of possibilities when developing a new application, so we are less restricted than when using MySQL, which is very interesting for projects where evolutionary maintenance is foreseen in the long or medium term.

MySQL vs. PostgreSQL at WATA Factory

At WATA Factory, we evaluate which database engine to use for each individual project, depending on factors such as whether it is a long-term project, the type of application or the number of concurrent users, to name only a few.

For practical purposes, when there are no specific performance requirements, as is the case for most of the applications we are developing, we prefer PostgreSQL, which offers very interesting functionalities that could be useful for the future without making much difference for practical purposes.

However, we have also been involved in the development of projects based on CMS such as Drupal, WordPress or Joomla.

In these cases, it is of course always best to use the system recommended by the community developing these CMSs, which is usually MySQL.

This is because this type of development is usually subject to special requirements in terms of positioning or SEO, so a MySQL with MyISAM can be a good alternative.

In the case of Drupal, although the documentation states that it supports MySQL and PostgreSQL, there are times when installing third-party modules, they are mainly developed and tested in MySQL. Depending on the Drupal version and the modules we use on our website, the choice that will probably cause us less headaches is MySQL.

If we develop the third-party software, it is quite possible that we will use an engine like MySQL, which is easily customisable and extensible. On the other hand, if we later decide that our product should support both database systems, it would be easier to start from MySQL and adapt it to PostgreSQL than vice versa.

The post MySQL vs. PostgreSQL: Experiences from a practical perspective appeared first on WATA Factory.

]]>