Fair Coffee, Fair Data: Practical Bias Detection in Coffee Supply Chains with PostgreSQL
Presented by:
Koji Annoura
Koji Annoura is a seasoned full-stack developer with over 40 years of experience in software engineering.
Since 2009, he has been actively involved in Agile software development and co-founded the Neo4j Users Group Tokyo in 2013.
In 2021, he also established the Apache Hop User Group Japan. Koji has helped numerous companies and teams in their Agile transformation, guiding them in adopting Agile and Scrum practices effectively.
He is the author of A Technical Guidebook to Cloud Native Databases and The Practical Guide to MacOS X Server, and served as a technical reviewer for Graph Data Processing with Cypher.
No video of the event yet, sorry!
PostgreSQL is evolving beyond its traditional relational roots by adopting property graph query capabilities through SQL/PGQ. This extension enables graph-style pattern matching and traversal directly within PostgreSQL, removing the need for separate graph database systems. For database practitioners, this opens the door to analyzing complex relationships while continuing to rely on PostgreSQL’s mature relational storage, indexing, and performance features.
This session presents a hands-on case study of applying SQL/PGQ to real-world coffee trade data. The coffee supply chain represents a rich and complex graph of farmers, cooperatives, exporters, and markets, where structural bias and unequal opportunities often emerge. By modeling these entities and their relationships as property graphs, we can detect imbalances such as limited market access for smallholder farmers, regional disparities in pricing, and inequities between certified and non-certified producers. Importantly, this type of structural bias analysis is conceptually related to ML bias, where hidden patterns can lead to unfair or unintended outcomes—here applied at the level of trade networks rather than model predictions.
- The talk will walk through the full process:
- Designing graph schemas from relational tables
- Building property graphs within PostgreSQL
- Writing SQL/PGQ queries to uncover bias and unfair patterns
- Combining relational and graph queries for deeper insights
- Interpreting and visualizing results in a reproducible workflow
Attendees will gain practical skills in constructing and querying property graphs in PostgreSQL, see how relational and graph paradigms can complement each other, and learn how to adapt these methods to their own datasets. Beyond coffee, the techniques demonstrated are broadly applicable to supply chains, recommendation systems, fraud detection, and fairness-aware analytics.
This session is designed for engineers, DBAs, and analysts who want to explore PostgreSQL’s upcoming graph capabilities in a tangible, real-world scenario, leaving with reproducible queries and actionable insights.
- Date:
- Duration:
- 25 min
- Room:
- Conference:
- PGConf India, 2026
- Language:
- Track:
- Application Developer
- Difficulty:
- Easy