A Relational Database
Purpose:
Crave & Cork is a relational database system built in MySQL to address a real-world information gap: helping users elevate everyday takeout meals with thoughtfully selected wine pairings. This project reframes wine pairing as an approachable experience—one that can be educational, intuitive, and seamlessly integrated into modern food habits. The goal was to design a fully functional database management system that supports both discovery and personalization, allowing users to explore curated pairings based on meal type, cuisine, flavor profile, dietary preferences, and budget.
Potential Users:
This database was designed with three primary user groups in mind. Casual takeout diners looking for quick, enjoyable pairings can receive instant suggestions based on the food they’ve ordered. Wine enthusiasts can explore new combinations, learn about varietals, and compare tasting notes across cuisines. Industry professionals—including sommeliers, importers, and app developers—can use the database structure to analyze pairing trends or build recommendation features into customer-facing platforms.
Crave & Cork is a relational database system built in MySQL to address a real-world information gap: helping users elevate everyday takeout meals with thoughtfully selected wine pairings. This project reframes wine pairing as an approachable experience—one that can be educational, intuitive, and seamlessly integrated into modern food habits. The goal was to design a fully functional database management system that supports both discovery and personalization, allowing users to explore curated pairings based on meal type, cuisine, flavor profile, dietary preferences, and budget.
Potential Users:
This database was designed with three primary user groups in mind. Casual takeout diners looking for quick, enjoyable pairings can receive instant suggestions based on the food they’ve ordered. Wine enthusiasts can explore new combinations, learn about varietals, and compare tasting notes across cuisines. Industry professionals—including sommeliers, importers, and app developers—can use the database structure to analyze pairing trends or build recommendation features into customer-facing platforms.
Methods:
The database was conceptualized through user-need mapping and then translated into an Entity-Relationship Diagram (ERD). From there, the schema was modeled using Crow’s Foot notation and implemented in MySQL Workbench. Each table was carefully structured to capture meaningful attributes—like wine origin, importer, or dish flavor profile—and data types were optimized for future scalability. SQL queries were written to simulate real-world use cases, and constraints were added to enforce logic around alcohol content and user price ranges.
Results & Next Steps:
The final product is a working MySQL database built around normalized tables for dishes, wines, users, orders, pairings, and ratings. Users can search for pairings by cuisine, dietary tags, or wine type, and the database supports a future-facing feature set that includes views, triggers, and personalized recommendations. For example, a “BestPairings” view returns curated top matches, while triggers automatically update order histories or track price changes.
Skills Developed:
This project strengthened skills in relational database design, SQL querying, normalization, data modeling, and user-centered thinking. It also involved writing SQL triggers and constraints and applying database architecture principles in a practical, product-oriented context.
Tools Used:
MySQL, MySQL Workbench, Lucidchart (for schema modeling), GitHub
The final product is a working MySQL database built around normalized tables for dishes, wines, users, orders, pairings, and ratings. Users can search for pairings by cuisine, dietary tags, or wine type, and the database supports a future-facing feature set that includes views, triggers, and personalized recommendations. For example, a “BestPairings” view returns curated top matches, while triggers automatically update order histories or track price changes.
Skills Developed:
This project strengthened skills in relational database design, SQL querying, normalization, data modeling, and user-centered thinking. It also involved writing SQL triggers and constraints and applying database architecture principles in a practical, product-oriented context.
Tools Used:
MySQL, MySQL Workbench, Lucidchart (for schema modeling), GitHub
View Project Code on Github
Crave & Cork is a MySQL-based database project that reimagines how people experience food and wine pairings in a modern, fast-paced world. While wine pairing is often viewed as a luxury reserved for fine dining, this project explores how thoughtful database design can make those experiences more intuitive, educational, and accessible to everyday takeout diners.
The idea was inspired by wine educator André Mack, whose work in democratizing wine culture highlights how intentional pairing— even for something as simple as a Whopper from Burger King -- can enhance flavor, mood, and memory. Crave & Cork was built around the belief that luxury can be made available through knowledge, not just cost, and that systems like this can support both flavor exploration and cultural inclusivity.
The primary goal of the database is to store and organize curated food and wine pairing data that allows users to browse combinations, apply filters, and understand why certain flavors work well together. It enables users to explore meals by cuisine, dietary tags, or flavor profile, and pair them with wines filtered by characteristics like varietal, price, and region.
The idea was inspired by wine educator André Mack, whose work in democratizing wine culture highlights how intentional pairing— even for something as simple as a Whopper from Burger King -- can enhance flavor, mood, and memory. Crave & Cork was built around the belief that luxury can be made available through knowledge, not just cost, and that systems like this can support both flavor exploration and cultural inclusivity.
The primary goal of the database is to store and organize curated food and wine pairing data that allows users to browse combinations, apply filters, and understand why certain flavors work well together. It enables users to explore meals by cuisine, dietary tags, or flavor profile, and pair them with wines filtered by characteristics like varietal, price, and region.
Crave & Cork was designed to address a clearly defined problem domain: helping users elevate everyday takeout meals by making wine pairings more accessible, intuitive, and personalized. Data modeling—recognized as the first step in designing any relational database—was critical in translating this problem domain into an abstract, usable format. A data model serves as a simplified graphical representation of real-world data structures and their relationships. Its purpose is to help database designers better understand the system’s complexity and constraints while enabling structured implementation.
As Coronel & Morris (2023) explain, "A model’s main function is to help you understand the complexities of the real-world environment." In the case of Crave & Cork, the data model helped organize how food items, wines, users, and pairings interact—ultimately guiding the schema toward scalability and usability.
Initial business rules were derived from the imagined user experience and functional requirements. For example:
- Each User can place one or more Orders, and each Order must be placed by exactly one User.
- Each Order can include only one Dish, and each Dish can be included in zero or more Orders.
- Each Dish must be categorized under one CuisineGenre, and each CuisineGenre can categorize one or more Dishes.
These rules were documented to identify key entities, relationships, and constraints. The rules also ensured that relationships between entities were normalized and logically enforced in the schema.
From Conceptual to Logical Modeling
The conceptual model served as a high-level, technology-independent blueprint of the system. It outlined major entities (e.g., Dishes, Wines, Users), their relationships (e.g., Orders, Pairings), and the fundamental rules governing their interactions. This model was created in Lucidchart and used to visualize how different elements of the food and wine pairing domain fit together.
The conceptual Entity-Relationship Diagram (ERD) served as a high-level map of how key parts of the system relate to each other. At this stage, I identified major entities like
Users, Dishes, Wines, and Orders, along with how they interact. For example, the many-to-many relationship between Dishes and Wines—central to the pairing logic—was mapped early, allowing me to prepare for its decomposition during logical modeling.After validation, the schema was translated into a logical model using Crow’s Foot notation. At this stage, abstract entities became tables, relationships were mapped with primary and foreign keys, and constraints were applied. Functional dependencies were carefully analyzed to support normalization.
In the logical model, the abstract entities from the conceptual diagram are translated into relational tables with clearly defined keys and constraints. Here, I decomposed the many-to-many
Dishes–Wines relationship into two one-to-many relationships using a Pairings table as an associative entity. This allowed me to include a “justification” field explaining why the match works—something essential to my mission of making wine pairing both educational and accessible.Normalization, Naming, and Data Integrity
All entities were normalized to Third Normal Form (3NF) or higher to reduce redundancy, enforce atomicity, and maintain referential integrity. Naming conventions were strictly followed: entities were singular and familiar, attributes used descriptive suffixes like _ID or _CODE, and derived fields were excluded unless justified.
As Coronel & Morris (2023) explain, "The main goal of normalization is to eliminate data anomalies by eliminating unnecessary or unwanted data redundancies." Functional dependencies were used to identify which attributes determined others, ensuring logical structure and consistency. For instance, importer details were stored in a separate
All entities were normalized to Third Normal Form (3NF) or higher to reduce redundancy, enforce atomicity, and maintain referential integrity. Naming conventions were strictly followed: entities were singular and familiar, attributes used descriptive suffixes like _ID or _CODE, and derived fields were excluded unless justified.
As Coronel & Morris (2023) explain, "The main goal of normalization is to eliminate data anomalies by eliminating unnecessary or unwanted data redundancies." Functional dependencies were used to identify which attributes determined others, ensuring logical structure and consistency. For instance, importer details were stored in a separate
Importers table rather than repeated in each wine record. Foreign key constraints and referential integrity rules ensured that all data remained synchronized and valid.The database was built in MySQL with normalized tables and tested through a series of queries to simulate typical user needs. Views and triggers were implemented to demonstrate backend functionality. A BestPairings view was created to allow users to easily retrieve highly rated dish-wine combinations based on user reviews. Triggers automatically update order history when new meals are selected and track price changes across wines for audit purposes.
Initial Setup
Data Insertion –
Sample Values for Country, Cuisine, and Wine Types
The working system supports a range of queries:
- Retrieve wines under $30 that pair with spicy dishes
- Filter dishes by cuisine, flavor profile, and dietary preference
- Track most frequent pairings by user
- Use triggers to update order history or audit wine price changes
- Generate recommendations based on user favorites
Query: Explore Wine Metadata by Region (e.g., Bordeaux)
Query: Get Wine Suggestions by Cuisine Type (e.g., Italian)
Triggers were added not just as a technical flourish, but to model real user behaviors—like tracking the last time someone placed a takeout order or when a wine’s price changed. These backend features were chosen to support a seamless user experience in a potential web or mobile app where recommendations update in real time.
Triggers –
Order Tracking and Price Audit Automation
User Favorites – Ratings & Reviews Data Entry
Next Steps
Crave & Cork functions as a prototype system for wine recommendation based on user preferences and takeout meals. Future development would involve linking to external APIs (e.g., UberEats, Drizly), integrating a front-end interface, and adding user-generated reviews. Machine learning could further personalize pairings based on order history and ratings.
This project reflects my broader commitment to designing with purpose—using data not just to optimize systems, but to elevate human experiences. Crave & Cork isn’t about food or wine alone; it’s about building tools that democratize expertise and celebrate everyday culture.
Crave & Cork functions as a prototype system for wine recommendation based on user preferences and takeout meals. Future development would involve linking to external APIs (e.g., UberEats, Drizly), integrating a front-end interface, and adding user-generated reviews. Machine learning could further personalize pairings based on order history and ratings.
This project reflects my broader commitment to designing with purpose—using data not just to optimize systems, but to elevate human experiences. Crave & Cork isn’t about food or wine alone; it’s about building tools that democratize expertise and celebrate everyday culture.
Skills & Tools Used
MySQL, MySQL Workbench, Lucidchart, SQL Queries, Data Modeling, Schema Normalization, Crow’s Foot Notation, ER Diagrams
Citation
Coronel, C., & Morris, S. (2023). Database Systems: Design, Implementation, & Management (14th ed.). Cengage Learning.