An Agricultural Digital System For Rural Areas In Uganda
# Agricultural Digital System for Rural Areas in Uganda
## Overview
This project provides a comprehensive database solution aimed at supporting agricultural practices and decision-making in rural Uganda. The system addresses real-world challenges such as climate change, pest control, and market accessibility through a relational database architecture, complex SQL operations, and data-driven insights.
## Project Goals
- Model real agricultural entities such as farmers, farms, crops, markets, sales, experts, and climate
- Enable farmers to access insights on farming activities, weather trends, pests, and market sales
- Provide a digital system for data collection, analysis, and decision support
## Features
### Entities Modeled
- **FARMER**: Personal information, address, and village
- **FARMS**: Location, size, soil type
- **FARMING_ACTIVITIES**: Type, labor hours, start/end dates, cost
- **CLIMATE**: Region, date, temperature, rainfall
- **PESTICIDES**: Application methods, target pests, safety
- **CROPS**: Type, suitable climate, growing seasons
- **SALES**: Crop sold, quantity, unit price, revenue
- **MARKET**: Name, village, operation days
- **AGRICULTURAL_EXPERT**: Specialties, organization, advising farmers
### SQL Queries
#### Basic
- Retrieve farmers by last name
- Filter crops by type
- List markets by operating days
- Select farms with loamy soil
- Union of pesticides applied by specific method/rate
#### Intermediate
- Top 3 regions by temperature and rainfall
- Most cost-effective farming activity
- Crop sales by market
- Farmers in high rainfall zones with large farms
- Market with highest crop sale price
#### Advanced
- Total sales per farmer (with revenue > UGX 100,000)
- Farmer operations with average climate impact
- Max crop revenue per market/farmer combination
- Farmers with exclusive crop expertise
- Farmers exceeding average farm temperature
### ER Diagram Highlights
- Total Participation: FARM, SALES, FARMING_ACTIVITY, MARKET
- Weak Ent …