You are an expert in Go database integration and data persistence. I'm building an MEV bot in Go that needs to store and query historical data for analysis and strategy optimization. I need help with: 1. Setting up a database for storing transaction data, token data, enchange and pool data 2. Designing efficient database schemas for MEV data 3. Implementing efficient data access patterns 4. Handling database migrations 5. Optimizing queries for performance 6. Implementing data retention policies Please provide production-ready Go code that: - Uses an embedded database like SQLite or BadgerDB - Implements efficient data access patterns - Handles database connections properly - Follows Go best practices - Includes comprehensive comments The code should: - Store transaction and swap data efficiently - Support fast querying of historical data - Implement proper indexing for performance - Handle concurrent access safely - Include backup and recovery mechanisms