Using AI To Track Formula 1 Drivers With MySQL
Formula 1 Car Racing is very popular, and tracking the performance of each team or driver can be quite complex. I wanted to do some 'quick and dirty' analysis of the 2025 season, but I did not want to devote hours to getting everything just right. So, I used DBeaver Enterprise's AI Assistant Feature.
![]() |
DBeaver's AI Assistant |
I connected to my local MySQL server and entered this prompt:
Create a table to hold information on this seasons performance of Formula 1 drivers to hold their name, car manufacturer, race location, and the drivers points earned for each race, Then collect the data for inclusion in the table
This was sent to OpenAI, which returned with:
Sure, I can help you create the table. However, I can't collect the data for you as I'm an AI and don't have access to external databases or the internet. You'll need to collect the data yourself and insert it into the table.
Here's how you can create the table:
CREATE TABLE formula1_season_performance ( id INT AUTO_INCREMENT PRIMARY KEY, driver_name VARCHAR(255), car_manufacturer VARCHAR(255), race_location VARCHAR(255), points_earned INT );
This table includes an `id` column as a primary key, which will automatically increment each time a new record is inserted. The `driver_name`, `car_manufacturer`, and `race_location` are all `VARCHAR` types, which can hold strings of characters. The `points_earned` is an `INT` type, which can hold integer values.
Once you have the data, you can insert it into the table using the `INSERT INTO` statement. Here's an example:
INSERT INTO formula1_season_performance (driver_name, car_manufacturer, race_location, points_earned) VALUES ('Lewis Hamilton', 'Mercedes', 'Monaco', 25);
INSERT INTO formula1_season_performance (driver_name, car_manufacturer, race_location, points_earned)
VALUES ('Lewis Hamilton', 'Mercedes', 'Monaco', 25);
Oh, so close!
I took the above table definition and data and sent them to my MySQL server. Voila! I had a table that would work, albeit with only one record. And that record was wrong, apologies to Lando Norris, the winner of the Monaco Grand Prix.
I asked the AI to get the correct data to date: Please format the data for the 2025 season to date for this table
I'm sorry for any confusion, but as an AI, I don't have access to real-time data or the internet, so I can't provide the actual data for the 2025 Formula 1 season. However, I can show you how to format your data for insertion into the table you've created.
Assuming you have the data, you would use the `INSERT INTO` statement to add each record. Here's an example of how you might format your data:
INSERT INTO formula1_season_performance (driver_name, car_manufacturer, race_location, points_earned) VALUES ('Driver A', 'Manufacturer A', 'Location A', 10), ('Driver B', 'Manufacturer B', 'Location B', 8), ('Driver C', 'Manufacturer C', 'Location C', 6), ('Driver D', 'Manufacturer D', 'Location D', 5), ('Driver E', 'Manufacturer E', 'Location E', 4);
In this example, replace 'Driver A', 'Manufacturer A', 'Location A', and 10 with the actual driver's name, car manufacturer, race location, and points earned. Repeat this for each record you want to insert.
Remember to collect your data from a reliable source and ensure it's accurate before inserting it into your database.
What: AI's do not have real-time (or any) access to F1 race results!?!?! Outrageous! Well, I probably need a better prompt to have the AI collect the needed data. But I was able to use English to create a table without having to code any Structured Query Language. Now to work on getting that data before the SPA race.
Comments
Post a Comment