- Base de datos SQLite con información de vehículos - Dashboard web con Flask y Bootstrap - Scripts de web scraping para RockAuto - Interfaz CLI para consultas - Documentación completa del proyecto Incluye: - 12 marcas de vehículos - 10,923 modelos - 10,919 especificaciones de motores - 12,075 combinaciones modelo-año-motor
2.6 KiB
2.6 KiB
Vehicle Database - Getting Started Guide
Overview
This project provides a comprehensive database system for storing information about vehicle brands, models, years, and engines. The database is built using SQLite and managed through Python scripts.
Database Structure
The database consists of five main tables:
- brands: Vehicle manufacturers (Toyota, Ford, etc.)
- models: Vehicle models (Camry, F-150, etc.)
- engines: Engine specifications (2JZ-GTE, EcoBoost, etc.)
- years: Calendar years for vehicle production
- model_year_engine: Junction table linking all entities with trim levels and specifications
Setup and Usage
1. Initial Setup
Run the setup script to initialize the database:
cd vehicle_database
./setup.sh
2. Querying the Database
Use the interactive query interface:
python3 scripts/query_interface.py
The query interface allows you to:
- Search for vehicles by brand, model, year, or engine
- Browse all available brands
- View models for specific brands
- See production years for specific models
3. Managing the Database
Use the database manager for programmatic access:
python3 scripts/database_manager.py
4. Importing Data
To import data from CSV files:
- Prepare your data in the required CSV format
- Use the CSV importer functionality in your own scripts
Sample CSV files are provided in the data/ directory.
Example Queries
The system supports various search options:
- Find all vehicles by a specific brand
- Search for a specific model across all years
- Filter by engine type or specifications
- Look up trim levels and drivetrain configurations
Extending the Database
To add more data:
- Use the Python API in
scripts/database_manager.py - Directly execute SQL commands on the SQLite database
- Import data from CSV files using the structure provided
File Structure
vehicle_database/
├── sql/
│ └── schema.sql # Database schema
├── scripts/
│ ├── database_manager.py # Main database manager
│ ├── query_interface.py # Interactive query interface
│ └── csv_importer.py # CSV import functionality
├── data/ # Sample CSV data files
├── vehicle_database.db # SQLite database file
├── setup.sh # Setup script
└── README.md # Project documentation
Next Steps
- Explore the database using the query interface
- Add your own vehicle data
- Customize the schema if needed for your specific requirements
- Extend the Python scripts with additional functionality