0% found this document useful (0 votes)
16 views4 pages

Hadi Printable

This document is a MySQL dump of a database containing tables for authors, books, books_authors, car, and driver. It includes the structure and data for each table, with specific entries for authors and their books, as well as car ownership details linked to drivers. The dump was completed on May 12, 2025.

Uploaded by

ongodg63
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views4 pages

Hadi Printable

This document is a MySQL dump of a database containing tables for authors, books, books_authors, car, and driver. It includes the structure and data for each table, with specific entries for authors and their books, as well as car ownership details linked to drivers. The dump was completed on May 12, 2025.

Uploaded by

ongodg63
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

-- MySQL dump 10.13 Distrib 9.3.

0, for macos15 (arm64)


--
-- Host: localhost Database: abdullahi211212066db
--FULL NAME: ABDULLAHI ABUBAKAR HADi
--SECTION: (2)
--SERIAL NUMBER:81
--ID NUMBER: 211212066
-- ------------------------------------------------------
-- Server version 9.3.0

/*!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 */;
/*!50503 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 `authors`
--

DROP TABLE IF EXISTS `authors`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `authors` (
`authorID` int NOT NULL,
`name` varchar(30) DEFAULT NULL,
`email` varchar(50) DEFAULT NULL,
PRIMARY KEY (`authorID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `authors`
--

LOCK TABLES `authors` WRITE;


/*!40000 ALTER TABLE `authors` DISABLE KEYS */;
INSERT INTO `authors` VALUES (1,'Tan Ah Teck','teck@nowhere.com'),
(2,'Mohamed Ali','ali@somewhere.com'),(3,'Kumar','kumar@abc.com'),
(4,'Kelvin Jones','kelvin@xzy.com'),(5,'Abdullahi
hadi','211212066@nileuniversity.edu.ng');
/*!40000 ALTER TABLE `authors` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `books`
--

DROP TABLE IF EXISTS `books`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `books` (
`isbn` int NOT NULL,
`title` varchar(50) DEFAULT NULL,
`price` float DEFAULT NULL,
`qty` int DEFAULT NULL,
PRIMARY KEY (`isbn`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `books`
--

LOCK TABLES `books` WRITE;


/*!40000 ALTER TABLE `books` DISABLE KEYS */;
INSERT INTO `books` VALUES (1001,'Java for Dummies',11.11,11),
(1002,'Only Java',22.22,22),(1003,'Java ABC',33.33,33),(1004,'Java
123',44.44,44);
/*!40000 ALTER TABLE `books` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `books_authors`
--

DROP TABLE IF EXISTS `books_authors`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `books_authors` (
`authorID` int NOT NULL,
`isbn` int NOT NULL,
PRIMARY KEY (`isbn`,`authorID`),
KEY `authorID` (`authorID`),
CONSTRAINT `books_authors_ibfk_1` FOREIGN KEY (`authorID`)
REFERENCES `authors` (`authorID`),
CONSTRAINT `books_authors_ibfk_2` FOREIGN KEY (`isbn`) REFERENCES
`books` (`isbn`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `books_authors`
--

LOCK TABLES `books_authors` WRITE;


/*!40000 ALTER TABLE `books_authors` DISABLE KEYS */;
INSERT INTO `books_authors` VALUES (1,1001),(1,1002),(2,1001),
(2,1003),(2,1004),(3,1001),(3,1002);
/*!40000 ALTER TABLE `books_authors` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `car`
--

DROP TABLE IF EXISTS `car`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `car` (
`REGNO` varchar(50) NOT NULL,
`MAKE` varchar(50) DEFAULT NULL,
`COLOUR` varchar(50) DEFAULT NULL,
`PRICE` float DEFAULT NULL,
`OWNER` varchar(50) DEFAULT NULL,
PRIMARY KEY (`REGNO`),
KEY `OWNER` (`OWNER`),
CONSTRAINT `car_ibfk_1` FOREIGN KEY (`OWNER`) REFERENCES `driver`
(`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `car`
--

LOCK TABLES `car` WRITE;


/*!40000 ALTER TABLE `car` DISABLE KEYS */;
INSERT INTO `car` VALUES ('A155 BDE','MERCEDES','BLUE',22000,'Bob
Smith'),('F611 AAA','FORD','RED',12000,'Jim Smith'),('J111
BBB','SKODA','BLUE',11000,'Jim Smith'),('K555
GHT','FIAT','GREEN',6000,'Bob Jones'),('SC04
BFE','SMART','BLUE',13000,NULL);
/*!40000 ALTER TABLE `car` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `driver`
--

DROP TABLE IF EXISTS `driver`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `driver` (
`name` varchar(50) NOT NULL,
`DOB` date DEFAULT NULL,
PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `driver`
--

LOCK TABLES `driver` WRITE;


/*!40000 ALTER TABLE `driver` DISABLE KEYS */;
INSERT INTO `driver` VALUES ('Bob Jones','1986-12-03'),('Bob
Smith','1981-03-22'),('Jim Smith','1980-01-11');
/*!40000 ALTER TABLE `driver` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;


/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2025-05-12 9:50:56

You might also like