Streamlining Healthcare Logistics

Tech Byte

Advantages of Migrating from SQL Server to PostgreSQL

Relocating data warehouses is somewhat comparable to moving homes - both filled with uncertainties and crucial decisions. As it is a large investment to move the data warehouse, it is critical to consider different options and evaluate if they will meet your strategic goals.

In this Tech Byte, Christian Foyer, Junior Data Engineer at Columna Flow Command Centre, will shed light on the advantages of migrating from SQL Server to PostgreSQL, explore the challenges encountered during the transition and discover how leveraging open-source tools can effectively address orchestration needs.


By Christian Foyer, Junior Data Engineer for Columna Flow Command Centre

Understanding the Key Players: SQL Server vs. PostgreSQL

Microsoft's SQL Server has been a stalwart in relational database management systems since 1989. Renowned for its enterprise-level capabilities with structured data, it seamlessly integrates with Microsoft products. In contrast, PostgreSQL, born at the University of California in 1986, boasts decades of open-source evolution. Recognised for native support of diverse data types, including JSON, key-value pairs, and geometric data, it excels in processing vast amounts of data with speed.

Comparative Analysis: SQL Server vs. PostgreSQL

Let's shed some light on some of the critical factors that can help aid in the decision-making processes for businesses and developers alike.

  •  Cost
    • SQL Server: $15,123 (Enterprise license with 2 cores)*
    • PostgreSQL: Absolutely free for all uses, including commercial

  • Query Planning
    • SQL Server: Graphical interface with actionable improvements
    • PostgreSQL: Requires more effort for speed enhancements, higher-level understanding is needed

  • Data Types
    • SQL Server: Focus on structured data, support for other types of post-conversion
    • PostgreSQL: Native support for unstructured data types

  • Integration
    • SQL Server: Superb integration with Microsoft tools, especially for analysis
    • PostgreSQL: Wide range of third-party tools with compatible connectors

  • Educational Resources
    • SQL Server: Microsoft Learn platform
    • PostgreSQL: Large open-source community consistently producing new educational material

  • Security Features
    • SQL Server: Built-in monitoring, data masking, and other security features
    • PostgreSQL: Advanced security extensions supporting various authentication methods and data encryption

*SQL Server 2022—Pricing | Microsoft 

 

"Focusing on meaningful insights for hospital workflow optimisation, we can more easily scale up our infrastructure needs when using PostgreSQL as our data warehouse."

Data Ingestion and Transformation

The database management system is just one part of the data warehousing puzzle. Transitioning from SQL Server to PostgreSQL involves overcoming challenges in moving from SSIS, SSAS, and SSRS for data ingestion and transformations. T-SQL stored procedures can be converted, but it requires effort to replicate functionality unique to T-SQL. Best practices recommend utilising tools like dbt for transformations through select statements.

For orchestrating tasks and managing the pipeline, Apache Airflow proves indispensable. Its intuitive web UI, adherence to the "workflows as code" principle, and open-source nature simplify the adjustment compared to other tools.

Leveraging PostgreSQL for Healthcare Data Analysis

At Systematic, the Command Centre serves as a data analysis product that ingests data from different healthcare products within the Columna Flow suite. Focusing on meaningful insights for hospital workflow optimisation, we can more easily scale up our infrastructure needs when using PostgreSQL as our data warehouse. Additionally, the support for non-relational data lets us ingest the different JSON data we need while maintaining excellent performance.

 

The Developer’s Perspective

In summary, transitioning from SQL Server to PostgreSQL offers a strategic shift with challenges and rewards similar to moving homes. PostgreSQL stands out with its open-source roots, cost-effectiveness, and adaptability to diverse data types, contrasting SQL Server's integration with Microsoft products.

At Systematic's Command Centre, adopting PostgreSQL has enabled meaningful insights for healthcare workflow optimization, and as our workflow solutions focus on assisting the people who are making vital decisions on the ground level, open-source technologies have warranted that we can get these critical insights into more hands.

About the author

Christian Foyer is a Data Engineer at Systematic, dedicated to the Columna Flow Command Centre. Although he is in the beginning of his career, joining Systematic in 2023, he has leveraged his role to give talks to the local technical community about software’s role in optimising healthcare flows and using data contracts to improve internal collaboration. Additionally, he is dedicated to giving back to the open-source community by contributing to various data engineering tools.

Systematic Tech Bytes

This is part of Systematic Tech Bytes, a series of tech blogs where our dedicated colleagues will share bits (and bytes) of their expertise, insights, and experiences in the ever-evolving world of technology. From the latest industry trends to insider tips, innovation highlights to problem-solving strategies, our team opens the door to their knowledge treasury, decoding the details of tech, one byte at a time.