MySQL Database Development: Query and Performance Optimization