Develop a SQLAlchemy Python script that will take a big MariaDB database stored on a sql file in the same directory (example.sql) and will return a small subset of the same database but making sure that no references are lost on the entries that are included, this means that it must be fully self-included. There is spanish text with spanish characters on the database so you must account for that. Finally I will provide the first few lines of the database so you understand how it works.

-- MariaDB dump 10.19  Distrib 10.11.6-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost    Database: project_ciiae
-- ------------------------------------------------------
-- Server version	10.11.6-MariaDB-0+deb12u1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `actuaciones`
--

DROP TABLE IF EXISTS `actuaciones`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `actuaciones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fecha` date NOT NULL,
  `hora` time NOT NULL,
  `idempresa` int(11) NOT NULL,
  `idcontacto` varchar(250) DEFAULT NULL,
  `idmedio_contacto` int(11) DEFAULT NULL,
  `idtipos_consultas` int(11) DEFAULT NULL,
  `idmedios_financiacion` int(11) DEFAULT NULL,
  `idconexiones_secti` int(11) DEFAULT NULL,
  `descripcion` blob DEFAULT NULL,
  `idusuario` varchar(250) DEFAULT NULL,
  `idproyecto` int(11) NOT NULL DEFAULT 0,
  `idfase` int(11) NOT NULL DEFAULT 0,
  `idactividad` int(11) NOT NULL DEFAULT 0,
  `observaciones` blob DEFAULT NULL,
  `tipo_act` int(1) NOT NULL DEFAULT 0,
  `fichero_tabla` varchar(250) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `idempresa_conectada` int(11) NOT NULL DEFAULT 0,
  `idgrupo_conectado` int(11) NOT NULL DEFAULT 0,
  `fichero_conexion_efectiva` varchar(250) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `proyectoidi` int(1) NOT NULL DEFAULT 0,
  `idgrupo_reunido` int(11) NOT NULL DEFAULT 0,
  `lugar_reunion` varchar(250) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `titulo_act` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `ficheros_obligatorios` int(1) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`,`fecha`,`hora`,`idempresa`),
  KEY `fk_actuaciones_tipos_consultas1_idx` (`idtipos_consultas`),
  KEY `fk_actuaciones_medios_contacto1_idx` (`idmedio_contacto`),
  KEY `fk_actuaciones_medios_financiacion1_idx` (`idmedios_financiacion`),
  KEY `fk_actuaciones_conexiones_secti1_idx` (`idconexiones_secti`),
  KEY `fk_actuaciones_empresas1_idx` (`idempresa`),
  KEY `fk_actuaciones_proyectos1_idx` (`idproyecto`)
) ENGINE=MyISAM AUTO_INCREMENT=7206 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_spanish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--