mysql:
CREATE DATABASE HorseRacingDB;

USE HorseRacingDB;

CREATE TABLE (
   HorseID INT NOT NULL AUTO_INCREMENT,
   HorseName VARCHAR(100),
   Age INT,
   GenderENUM("Male", "Female"),
   Breed VARCHAR(50),
   OwnerID INT,
   PRIMARY KEY (Horse ID),
   FOREIGN KEY (OwnerID) REFERENCES Owners (OwnerID)
);

CREATE TABLE Owners (
   OwnerID INT NOT NULL AUTO_INCREMENT,
   OwnerName VARCHAR(100),
   ContactNumber VARCHAR(10),
   PRIMARY KEY (OwnerID)
);

CREATE TABLE Jockeys (
   JockeyID INT NOT NULL AUTO_INCREMENT,
   JockeyName VARCHAR(100),
   Rating DECIMAL(3,1),
   PRIMARY KEY (JockeyID)
);

CREATE TABLE Races (
   RaceID INT NOT NULL AUTO_INCREMENT,
   RaceDate DATE,
   RaceName VARCHAR(100),
   Location VARCHAR(100),
   PRIMARY KEY (Race ID)
);

CREATE TABLE (
   ResultID INT NOT NULL AUTO_INCREMENT,
   RaceID INT,
   Position ENUM("I", "II", "III"),
   JockeyID INT,
   Horse ID INT,
   CompletionTime TIME,
   PRIMARY-KEY(ResultID),
   FOREIGN KEY (RaceID) REFERENCES Races (RaceID),
   FOREIGN KEY (JockeyID) REFERENCES Jockeys (JockeyID),
   FOREIGN KEY (HorseID) REFERENCES Horses (HorseID)
);

WITH#:
using System;
using System.Collections.Generic;
using System.Data;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;

namespace HorseRacing
{
     public partial class Form1 : Form
     {
         private MySqlConnection conn;
         private string connectionString = "server=localhost;port=3306;username=root;password=root;database=HorseRacingDB";

         public Form1()
         {
             InitializeComponent();
         }

         private void Form1_Load(object sender, EventArgs e)
         {
             conn = new MySqlConnection(connectionString);
             conn.open();
         }

         private void Form1_FormClosing(object sender, FormClosingEventArgs e)
         {
             conn.Close();
         }

         private void ExecuteQuery(string query)
         {
             try
             {
                 MySqlCommand cmd = new MySqlCommand(query, conn);
                 MySqlDataAdapter adapter = new MySqlDataAdapter(cmd);
                 DataTable dt = new DataTable();
                 adapter.Fill(dt);

                 dataGridView1.DataSource = dt;
             }
             catch (Exception ex)
             {
                 MessageBox.Show("Error executing query: " + ex.Message);
             }
         }

         private void Button1_Click(object sender, EventArgs e)
         {
             string query = "SELECT * FROM Owners" +
                            "WHERE OwnerID IN(" +
                            "SELECT OwnerID FROM Horses" +
                            "GROUP BY OwnerID" +
                            "HAVING COUNT(*) > 1)";
             ExecuteQuery(query);
         }

         private void Button2_Click(object sender, EventArgs e)
         {
             string userInput = textBox2.Text;
             string query = "SELECT * FROM Jockeys" +
                            "WHERE Rating > " + userInput;
             ExecuteQuery(query);
         }

         private void Button3_Click(object sender, EventArgs e)
         {
             string startDate = textBox3.Text;
             string endDate = textBox4.Text;
             string query = "SELECT Races.RaceName, Results.Position, Horses.HorseName, Races.Location " +
                            "FROM Results" +
                            "JOIN Races ON Results.RaceID = Races.RaceID " +
                            "JOIN Horses ON Results.HorseID = Horses.HorseID " +
                            "WHERE Races.RaceDate BETWEEN '" + startDate + "’ AND '" +endDate + "'";
             ExecuteQuery(query);
         }

         private void Button4_Click(object sender, EventArgs e)
         {
             string userInput = textBox5.Text;
             string query = "SELECT Jockeys.JockeyName, SUM(CASE WHEN Results.Position = 'I' THEN 1 ELSE 0 END) AS FirstPlaceCount " +
                            "FROM Results" +
                            "JOIN Jockeys ON Results.JockeyID = Jockeys.JockeyID " +
                            "JOIN Races ON Results.RaceID = Races.RaceID " +
                            "WHERE Races.Location = '" + userInput + "'" +
                            "AND Races.RaceDate BETWEEN DATE_SUB(CURDATE(), INTERVAL 1 MONTH) AND CURDATE() " +
                            "GROUP BY Jockeys.JockeyID" +
                            "ORDER BY FirstPlaceCount DESC" +
                            "LIMIT 3";
             ExecuteQuery(query);
         }
     }
}

Add data entry/edit forms