├── DBC_Books ├── Fundamentals of Relational Database Management Systems Apr 2007.pdf └── Modern Database Management - 8th Edition.pdf ├── README.md ├── Slides ├── DBC_Lecture No 001.pdf ├── DBC_Lecture No 002.pdf ├── DBC_Lecture No 003.pdf ├── DBC_Lecture No 004.pdf └── DBC_Lecture No 005.pdf └── Student Projects ├── 02278029-sayed,mujtaba,hashimi-sayed,ghulam,sakhi ├── ERD-0f-GYM.jpg └── gym.sql ├── AbdulHasibSakhi_02278098 ├── Hospital_ERD.jpg └── hospital.sql ├── Add Projects.txt ├── Ahmad_Shoaib(02278002) ├── Cricket_ERD.jpg └── cricket.sql ├── Dawari 02278068 ├── airport.jpg └── airport.sql ├── Didar_02278070 ├── ERD of com.png └── company.sql ├── Hasibullah Noori #02278026 ├── Futsal-Team-ERD.png └── Futsal-Team.sql ├── Matiullah_02278144 ├── DormetoryERD.pdf └── dormetory.sql ├── abdullah_02278008 └── S.Abdullah02278008 │ ├── ERD_OfCourse.jpeg │ └── coursemis.sql ├── mohammad jaseem_ID 02278091 ├── Clinic.sql └── clinic.png ├── reza-hassani-02278073 ├── BookStore.sql └── Book_Store_ERD.jpg └── sajadahmad-02278100 ├── BookStore_ERD.jpg └── bookstore.sql /DBC_Books/Fundamentals of Relational Database Management Systems Apr 2007.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/DBC_Books/Fundamentals of Relational Database Management Systems Apr 2007.pdf -------------------------------------------------------------------------------- /DBC_Books/Modern Database Management - 8th Edition.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/DBC_Books/Modern Database Management - 8th Edition.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Database Concepts Course Repository 2 | 3 | Welcome to the **Database Concepts Course Repository**! This repository serves as a comprehensive resource for anyone interested in learning the fundamentals of databases, covering essential topics such as relational databases, SQL, database design, and normalization. 4 | 5 | ## Repository Structure 6 | 7 | - **Lecture Notes**: Detailed notes for each week's topic, complete with explanations and examples. 8 | - **Assignments**: Practical exercises to reinforce learning, along with guidelines for each task. 9 | - **Student Projects**: A collection of projects completed by students, showcasing their understanding and application of database concepts. 10 | - **Resources**: Curated reading materials, video tutorials, and useful links to enhance your knowledge. 11 | 12 | ## Getting Started 13 | 14 | 1. **Explore the Syllabus**: Check the syllabus to understand the course structure and weekly topics. 15 | 2. **Work Through Lecture Notes**: Follow the lecture notes to learn key concepts and theories. 16 | 3. **Complete Assignments**: Apply your knowledge through assignments and utilize the solutions for guidance. 17 | 4. **Utilize Resources**: Take advantage of additional materials to deepen your understanding of database concepts. 18 | 19 | ## Contributing 20 | 21 | Feel free to contribute by adding new resources, improving existing materials, or sharing your projects! 22 | 23 | ## License 24 | 25 | This repository is licensed under the [MIT License](LICENSE). 26 | 27 | Happy learning, and we hope you find this repository helpful on your journey to mastering databases! 28 | -------------------------------------------------------------------------------- /Slides/DBC_Lecture No 001.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Slides/DBC_Lecture No 001.pdf -------------------------------------------------------------------------------- /Slides/DBC_Lecture No 002.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Slides/DBC_Lecture No 002.pdf -------------------------------------------------------------------------------- /Slides/DBC_Lecture No 003.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Slides/DBC_Lecture No 003.pdf -------------------------------------------------------------------------------- /Slides/DBC_Lecture No 004.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Slides/DBC_Lecture No 004.pdf -------------------------------------------------------------------------------- /Slides/DBC_Lecture No 005.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Slides/DBC_Lecture No 005.pdf -------------------------------------------------------------------------------- /Student Projects/02278029-sayed,mujtaba,hashimi-sayed,ghulam,sakhi/ERD-0f-GYM.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Student Projects/02278029-sayed,mujtaba,hashimi-sayed,ghulam,sakhi/ERD-0f-GYM.jpg -------------------------------------------------------------------------------- /Student Projects/02278029-sayed,mujtaba,hashimi-sayed,ghulam,sakhi/gym.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 8.0.31, for Win64 (x86_64) 2 | -- 3 | -- Host: localhost Database: gym 4 | -- ------------------------------------------------------ 5 | -- Server version 8.0.31 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!50503 SET NAMES utf8mb4 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `equipment` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `equipment`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!50503 SET character_set_client = utf8mb4 */; 25 | CREATE TABLE `equipment` ( 26 | `Equipment_ID` int NOT NULL, 27 | `Equipment_name` varchar(20) NOT NULL, 28 | `Equipment_type` varchar(20) NOT NULL, 29 | `Member_ID` int DEFAULT NULL, 30 | PRIMARY KEY (`Equipment_ID`), 31 | KEY `Member_ID` (`Member_ID`), 32 | CONSTRAINT `equipment_ibfk_1` FOREIGN KEY (`Member_ID`) REFERENCES `member` (`Member_ID`) 33 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 34 | /*!40101 SET character_set_client = @saved_cs_client */; 35 | 36 | -- 37 | -- Dumping data for table `equipment` 38 | -- 39 | 40 | LOCK TABLES `equipment` WRITE; 41 | /*!40000 ALTER TABLE `equipment` DISABLE KEYS */; 42 | /*!40000 ALTER TABLE `equipment` ENABLE KEYS */; 43 | UNLOCK TABLES; 44 | 45 | -- 46 | -- Table structure for table `fee` 47 | -- 48 | 49 | DROP TABLE IF EXISTS `fee`; 50 | /*!40101 SET @saved_cs_client = @@character_set_client */; 51 | /*!50503 SET character_set_client = utf8mb4 */; 52 | CREATE TABLE `fee` ( 53 | `Fee_ID` int NOT NULL, 54 | `Fee_Ammount` float NOT NULL, 55 | `Fee_date` date NOT NULL, 56 | `training_schedule` int DEFAULT NULL, 57 | `Sess_ID` int DEFAULT NULL, 58 | PRIMARY KEY (`Fee_ID`), 59 | KEY `Sess_ID` (`Sess_ID`), 60 | CONSTRAINT `fee_ibfk_1` FOREIGN KEY (`Sess_ID`) REFERENCES `training_schedule` (`Sess_ID`) 61 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 62 | /*!40101 SET character_set_client = @saved_cs_client */; 63 | 64 | -- 65 | -- Dumping data for table `fee` 66 | -- 67 | 68 | LOCK TABLES `fee` WRITE; 69 | /*!40000 ALTER TABLE `fee` DISABLE KEYS */; 70 | /*!40000 ALTER TABLE `fee` ENABLE KEYS */; 71 | UNLOCK TABLES; 72 | 73 | -- 74 | -- Table structure for table `member` 75 | -- 76 | 77 | DROP TABLE IF EXISTS `member`; 78 | /*!40101 SET @saved_cs_client = @@character_set_client */; 79 | /*!50503 SET character_set_client = utf8mb4 */; 80 | CREATE TABLE `member` ( 81 | `Member_ID` int NOT NULL, 82 | `Member_name` varchar(20) NOT NULL, 83 | `Member_contact` char(13) NOT NULL, 84 | `Member_address` varchar(40) NOT NULL, 85 | `Member_email` varchar(50) NOT NULL, 86 | `Trainer_ID` int DEFAULT NULL, 87 | PRIMARY KEY (`Member_ID`), 88 | UNIQUE KEY `Member_email` (`Member_email`), 89 | KEY `Trainer_ID` (`Trainer_ID`), 90 | CONSTRAINT `member_ibfk_1` FOREIGN KEY (`Trainer_ID`) REFERENCES `trainer` (`Trainer_ID`) 91 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 92 | /*!40101 SET character_set_client = @saved_cs_client */; 93 | 94 | -- 95 | -- Dumping data for table `member` 96 | -- 97 | 98 | LOCK TABLES `member` WRITE; 99 | /*!40000 ALTER TABLE `member` DISABLE KEYS */; 100 | /*!40000 ALTER TABLE `member` ENABLE KEYS */; 101 | UNLOCK TABLES; 102 | 103 | -- 104 | -- Table structure for table `staff` 105 | -- 106 | 107 | DROP TABLE IF EXISTS `staff`; 108 | /*!40101 SET @saved_cs_client = @@character_set_client */; 109 | /*!50503 SET character_set_client = utf8mb4 */; 110 | CREATE TABLE `staff` ( 111 | `Staff_ID` int NOT NULL, 112 | `Staff_name` varchar(20) NOT NULL, 113 | `Staff_contact` char(13) NOT NULL, 114 | `Staff_address` varchar(20) NOT NULL, 115 | PRIMARY KEY (`Staff_ID`) 116 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 117 | /*!40101 SET character_set_client = @saved_cs_client */; 118 | 119 | -- 120 | -- Dumping data for table `staff` 121 | -- 122 | 123 | LOCK TABLES `staff` WRITE; 124 | /*!40000 ALTER TABLE `staff` DISABLE KEYS */; 125 | /*!40000 ALTER TABLE `staff` ENABLE KEYS */; 126 | UNLOCK TABLES; 127 | 128 | -- 129 | -- Table structure for table `trainer` 130 | -- 131 | 132 | DROP TABLE IF EXISTS `trainer`; 133 | /*!40101 SET @saved_cs_client = @@character_set_client */; 134 | /*!50503 SET character_set_client = utf8mb4 */; 135 | CREATE TABLE `trainer` ( 136 | `Trainer_ID` int NOT NULL, 137 | `Trainer_name` varchar(20) NOT NULL, 138 | `Trainer_contact` char(13) NOT NULL, 139 | `Trainer_address` varchar(20) NOT NULL, 140 | PRIMARY KEY (`Trainer_ID`) 141 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 142 | /*!40101 SET character_set_client = @saved_cs_client */; 143 | 144 | -- 145 | -- Dumping data for table `trainer` 146 | -- 147 | 148 | LOCK TABLES `trainer` WRITE; 149 | /*!40000 ALTER TABLE `trainer` DISABLE KEYS */; 150 | INSERT INTO `trainer` VALUES (21,'Ahmad','07888888888','Kabul'); 151 | /*!40000 ALTER TABLE `trainer` ENABLE KEYS */; 152 | UNLOCK TABLES; 153 | 154 | -- 155 | -- Table structure for table `training_schedule` 156 | -- 157 | 158 | DROP TABLE IF EXISTS `training_schedule`; 159 | /*!40101 SET @saved_cs_client = @@character_set_client */; 160 | /*!50503 SET character_set_client = utf8mb4 */; 161 | CREATE TABLE `training_schedule` ( 162 | `Sess_ID` int NOT NULL, 163 | `Sess_Date` date DEFAULT NULL, 164 | `Sess_time` varchar(10) DEFAULT NULL, 165 | `Sess_duration` varchar(10) DEFAULT NULL, 166 | `Sess_Details` varchar(30) DEFAULT NULL, 167 | `Trainer_ID` int DEFAULT NULL, 168 | PRIMARY KEY (`Sess_ID`), 169 | UNIQUE KEY `Sess_Date` (`Sess_Date`), 170 | UNIQUE KEY `Sess_time` (`Sess_time`), 171 | UNIQUE KEY `Sess_duration` (`Sess_duration`), 172 | UNIQUE KEY `Sess_Details` (`Sess_Details`), 173 | KEY `Trainer_ID` (`Trainer_ID`), 174 | CONSTRAINT `training_schedule_ibfk_1` FOREIGN KEY (`Trainer_ID`) REFERENCES `trainer` (`Trainer_ID`) 175 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 176 | /*!40101 SET character_set_client = @saved_cs_client */; 177 | 178 | -- 179 | -- Dumping data for table `training_schedule` 180 | -- 181 | 182 | LOCK TABLES `training_schedule` WRITE; 183 | /*!40000 ALTER TABLE `training_schedule` DISABLE KEYS */; 184 | /*!40000 ALTER TABLE `training_schedule` ENABLE KEYS */; 185 | UNLOCK TABLES; 186 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 187 | 188 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 189 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 190 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 191 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 192 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 193 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 194 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 195 | 196 | -- Dump completed on 2024-11-23 11:08:06 197 | -------------------------------------------------------------------------------- /Student Projects/AbdulHasibSakhi_02278098/Hospital_ERD.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Student Projects/AbdulHasibSakhi_02278098/Hospital_ERD.jpg -------------------------------------------------------------------------------- /Student Projects/AbdulHasibSakhi_02278098/hospital.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 8.0.31, for Win64 (x86_64) 2 | -- 3 | -- Host: localhost Database: hospitall 4 | -- ------------------------------------------------------ 5 | -- Server version 8.0.31 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!50503 SET NAMES utf8mb4 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `doctor` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `doctor`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!50503 SET character_set_client = utf8mb4 */; 25 | CREATE TABLE `doctor` ( 26 | `ID` int NOT NULL, 27 | `Name` varchar(20) NOT NULL, 28 | `Gender` char(3) DEFAULT NULL, 29 | `Age` int DEFAULT NULL, 30 | `Specialist` varchar(20) NOT NULL, 31 | PRIMARY KEY (`ID`) 32 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 33 | /*!40101 SET character_set_client = @saved_cs_client */; 34 | 35 | -- 36 | -- Dumping data for table `doctor` 37 | -- 38 | 39 | LOCK TABLES `doctor` WRITE; 40 | /*!40000 ALTER TABLE `doctor` DISABLE KEYS */; 41 | INSERT INTO `doctor` VALUES (1,'Wahid Aqmal','M',50,'cardiovascular'),(2,'Bezhan Niazi','M',52,'Stomatolog'); 42 | /*!40000 ALTER TABLE `doctor` ENABLE KEYS */; 43 | UNLOCK TABLES; 44 | 45 | -- 46 | -- Table structure for table `medical_record` 47 | -- 48 | 49 | DROP TABLE IF EXISTS `medical_record`; 50 | /*!40101 SET @saved_cs_client = @@character_set_client */; 51 | /*!50503 SET character_set_client = utf8mb4 */; 52 | CREATE TABLE `medical_record` ( 53 | `Mr_No` int NOT NULL, 54 | `Date` date DEFAULT NULL, 55 | `Diagnose` varchar(50) DEFAULT NULL, 56 | `Drugs` varchar(50) DEFAULT NULL, 57 | `referencev` varchar(30) DEFAULT NULL, 58 | `registered_by` int DEFAULT NULL, 59 | `Doctor` int DEFAULT NULL, 60 | PRIMARY KEY (`Mr_No`), 61 | KEY `registered_by` (`registered_by`), 62 | KEY `Doctor` (`Doctor`), 63 | CONSTRAINT `medical_record_ibfk_1` FOREIGN KEY (`registered_by`) REFERENCES `registeration` (`Mr_No`), 64 | CONSTRAINT `medical_record_ibfk_2` FOREIGN KEY (`Doctor`) REFERENCES `doctor` (`ID`) 65 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 66 | /*!40101 SET character_set_client = @saved_cs_client */; 67 | 68 | -- 69 | -- Dumping data for table `medical_record` 70 | -- 71 | 72 | LOCK TABLES `medical_record` WRITE; 73 | /*!40000 ALTER TABLE `medical_record` DISABLE KEYS */; 74 | INSERT INTO `medical_record` VALUES (815,'2024-07-22','Lack of concentration','TAP Zeekap, SIP Tramadol','Mental Departement',209,2); 75 | /*!40000 ALTER TABLE `medical_record` ENABLE KEYS */; 76 | UNLOCK TABLES; 77 | 78 | -- 79 | -- Table structure for table `patient` 80 | -- 81 | 82 | DROP TABLE IF EXISTS `patient`; 83 | /*!40101 SET @saved_cs_client = @@character_set_client */; 84 | /*!50503 SET character_set_client = utf8mb4 */; 85 | CREATE TABLE `patient` ( 86 | `Mr_No` int NOT NULL, 87 | `Name` varchar(20) NOT NULL, 88 | `Gender` char(3) NOT NULL, 89 | `Age` int DEFAULT NULL, 90 | `Notes` varchar(50) NOT NULL, 91 | `Coresponding_Doctor` int DEFAULT NULL, 92 | PRIMARY KEY (`Mr_No`), 93 | KEY `Coresponding_Doctor` (`Coresponding_Doctor`), 94 | CONSTRAINT `patient_ibfk_1` FOREIGN KEY (`Coresponding_Doctor`) REFERENCES `doctor` (`ID`) 95 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 96 | /*!40101 SET character_set_client = @saved_cs_client */; 97 | 98 | -- 99 | -- Dumping data for table `patient` 100 | -- 101 | 102 | LOCK TABLES `patient` WRITE; 103 | /*!40000 ALTER TABLE `patient` DISABLE KEYS */; 104 | INSERT INTO `patient` VALUES (102,'Qari Mujeer','M',32,'Lake of concentration',2); 105 | /*!40000 ALTER TABLE `patient` ENABLE KEYS */; 106 | UNLOCK TABLES; 107 | 108 | -- 109 | -- Table structure for table `registeration` 110 | -- 111 | 112 | DROP TABLE IF EXISTS `registeration`; 113 | /*!40101 SET @saved_cs_client = @@character_set_client */; 114 | /*!50503 SET character_set_client = utf8mb4 */; 115 | CREATE TABLE `registeration` ( 116 | `Mr_No` int NOT NULL, 117 | `Date` date NOT NULL, 118 | `Poly` varchar(40) DEFAULT NULL, 119 | `Assurance` varchar(30) DEFAULT NULL, 120 | `Age` char(10) DEFAULT NULL, 121 | `patient` int DEFAULT NULL, 122 | PRIMARY KEY (`Mr_No`), 123 | KEY `patient` (`patient`), 124 | CONSTRAINT `registeration_ibfk_1` FOREIGN KEY (`patient`) REFERENCES `patient` (`Mr_No`) 125 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 126 | /*!40101 SET character_set_client = @saved_cs_client */; 127 | 128 | -- 129 | -- Dumping data for table `registeration` 130 | -- 131 | 132 | LOCK TABLES `registeration` WRITE; 133 | /*!40000 ALTER TABLE `registeration` DISABLE KEYS */; 134 | INSERT INTO `registeration` VALUES (209,'2024-07-22','pressure: 120/80, weight:90 KG','','32 yo',102); 135 | /*!40000 ALTER TABLE `registeration` ENABLE KEYS */; 136 | UNLOCK TABLES; 137 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 138 | 139 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 140 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 141 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 142 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 143 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 144 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 145 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 146 | 147 | -- Dump completed on 2024-11-23 10:11:40 148 | -------------------------------------------------------------------------------- /Student Projects/Add Projects.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Student Projects/Add Projects.txt -------------------------------------------------------------------------------- /Student Projects/Ahmad_Shoaib(02278002)/Cricket_ERD.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Student Projects/Ahmad_Shoaib(02278002)/Cricket_ERD.jpg -------------------------------------------------------------------------------- /Student Projects/Ahmad_Shoaib(02278002)/cricket.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 8.0.31, for Win64 (x86_64) 2 | -- 3 | -- Host: localhost Database: cricket 4 | -- ------------------------------------------------------ 5 | -- Server version 8.0.31 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!50503 SET NAMES utf8mb4 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `match_record` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `match_record`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!50503 SET character_set_client = utf8mb4 */; 25 | CREATE TABLE `match_record` ( 26 | `year` int NOT NULL, 27 | `Match_id` int DEFAULT NULL, 28 | `Country1_Name` varchar(20) NOT NULL, 29 | `Country2_Name` varchar(20) DEFAULT NULL, 30 | `Country1_Score` int NOT NULL, 31 | `Country2_Score` int DEFAULT NULL 32 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 33 | /*!40101 SET character_set_client = @saved_cs_client */; 34 | 35 | -- 36 | -- Dumping data for table `match_record` 37 | -- 38 | 39 | LOCK TABLES `match_record` WRITE; 40 | /*!40000 ALTER TABLE `match_record` DISABLE KEYS */; 41 | INSERT INTO `match_record` VALUES (2012,2,'india','',15,0); 42 | /*!40000 ALTER TABLE `match_record` ENABLE KEYS */; 43 | UNLOCK TABLES; 44 | 45 | -- 46 | -- Table structure for table `match_scorecard` 47 | -- 48 | 49 | DROP TABLE IF EXISTS `match_scorecard`; 50 | /*!40101 SET @saved_cs_client = @@character_set_client */; 51 | /*!50503 SET character_set_client = utf8mb4 */; 52 | CREATE TABLE `match_scorecard` ( 53 | `Match_id` int NOT NULL, 54 | `Player_id` int DEFAULT NULL, 55 | `Player_Runs` int DEFAULT NULL, 56 | `Player_Wickets` int DEFAULT NULL, 57 | `Ways_of_dismissal` varchar(20) DEFAULT NULL, 58 | PRIMARY KEY (`Match_id`), 59 | KEY `Player_id` (`Player_id`), 60 | CONSTRAINT `match_scorecard_ibfk_1` FOREIGN KEY (`Player_id`) REFERENCES `player_record` (`Player_id`) 61 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 62 | /*!40101 SET character_set_client = @saved_cs_client */; 63 | 64 | -- 65 | -- Dumping data for table `match_scorecard` 66 | -- 67 | 68 | LOCK TABLES `match_scorecard` WRITE; 69 | /*!40000 ALTER TABLE `match_scorecard` DISABLE KEYS */; 70 | INSERT INTO `match_scorecard` VALUES (2,1,0,3,''); 71 | /*!40000 ALTER TABLE `match_scorecard` ENABLE KEYS */; 72 | UNLOCK TABLES; 73 | 74 | -- 75 | -- Table structure for table `player_record` 76 | -- 77 | 78 | DROP TABLE IF EXISTS `player_record`; 79 | /*!40101 SET @saved_cs_client = @@character_set_client */; 80 | /*!50503 SET character_set_client = utf8mb4 */; 81 | CREATE TABLE `player_record` ( 82 | `Player_id` int NOT NULL AUTO_INCREMENT, 83 | `Player_Name` varchar(20) NOT NULL, 84 | `Player_Country` varchar(30) NOT NULL, 85 | `Player_TotalRuns` int DEFAULT NULL, 86 | `Player_TotalWickets` int DEFAULT NULL, 87 | PRIMARY KEY (`Player_id`) 88 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 89 | /*!40101 SET character_set_client = @saved_cs_client */; 90 | 91 | -- 92 | -- Dumping data for table `player_record` 93 | -- 94 | 95 | LOCK TABLES `player_record` WRITE; 96 | /*!40000 ALTER TABLE `player_record` DISABLE KEYS */; 97 | INSERT INTO `player_record` VALUES (1,'zaid','afghanistan',210,0); 98 | /*!40000 ALTER TABLE `player_record` ENABLE KEYS */; 99 | UNLOCK TABLES; 100 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 101 | 102 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 103 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 104 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 105 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 106 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 107 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 108 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 109 | 110 | -- Dump completed on 2024-10-30 10:11:54 111 | -------------------------------------------------------------------------------- /Student Projects/Dawari 02278068/airport.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Student Projects/Dawari 02278068/airport.jpg -------------------------------------------------------------------------------- /Student Projects/Dawari 02278068/airport.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 8.0.31, for Win64 (x86_64) 2 | -- 3 | -- Host: localhost Database: international_airport 4 | -- ------------------------------------------------------ 5 | -- Server version 8.0.31 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!50503 SET NAMES utf8mb4 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `airplane` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `airplane`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!50503 SET character_set_client = utf8mb4 */; 25 | CREATE TABLE `airplane` ( 26 | `Airplane_id` int NOT NULL, 27 | `Total_no_of_seats` int NOT NULL, 28 | PRIMARY KEY (`Airplane_id`) 29 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 30 | /*!40101 SET character_set_client = @saved_cs_client */; 31 | 32 | -- 33 | -- Dumping data for table `airplane` 34 | -- 35 | 36 | LOCK TABLES `airplane` WRITE; 37 | /*!40000 ALTER TABLE `airplane` DISABLE KEYS */; 38 | INSERT INTO `airplane` VALUES (1,150),(2,150),(3,250); 39 | /*!40000 ALTER TABLE `airplane` ENABLE KEYS */; 40 | UNLOCK TABLES; 41 | 42 | -- 43 | -- Table structure for table `airplane_type` 44 | -- 45 | 46 | DROP TABLE IF EXISTS `airplane_type`; 47 | /*!40101 SET @saved_cs_client = @@character_set_client */; 48 | /*!50503 SET character_set_client = utf8mb4 */; 49 | CREATE TABLE `airplane_type` ( 50 | `Type_name` varchar(20) NOT NULL, 51 | `Company` varchar(20) NOT NULL, 52 | `Max_seats` int DEFAULT NULL, 53 | `Airplane` int DEFAULT NULL, 54 | PRIMARY KEY (`Type_name`), 55 | KEY `Airplane` (`Airplane`), 56 | CONSTRAINT `airplane_type_ibfk_1` FOREIGN KEY (`Airplane`) REFERENCES `airplane` (`Airplane_id`) 57 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 58 | /*!40101 SET character_set_client = @saved_cs_client */; 59 | 60 | -- 61 | -- Dumping data for table `airplane_type` 62 | -- 63 | 64 | LOCK TABLES `airplane_type` WRITE; 65 | /*!40000 ALTER TABLE `airplane_type` DISABLE KEYS */; 66 | INSERT INTO `airplane_type` VALUES ('Boing Jet 2000','Boing',150,1),('Boing Jet 2001','Boing',150,2),('Flying jet','Boing',250,3); 67 | /*!40000 ALTER TABLE `airplane_type` ENABLE KEYS */; 68 | UNLOCK TABLES; 69 | 70 | -- 71 | -- Table structure for table `airport` 72 | -- 73 | 74 | DROP TABLE IF EXISTS `airport`; 75 | /*!40101 SET @saved_cs_client = @@character_set_client */; 76 | /*!50503 SET character_set_client = utf8mb4 */; 77 | CREATE TABLE `airport` ( 78 | `Airport_code` char(10) NOT NULL, 79 | `name` varchar(50) NOT NULL, 80 | `City` varchar(20) NOT NULL, 81 | `State` varchar(20) DEFAULT NULL, 82 | `Airplane` varchar(20) DEFAULT NULL, 83 | PRIMARY KEY (`Airport_code`), 84 | KEY `Airplane` (`Airplane`), 85 | CONSTRAINT `airport_ibfk_1` FOREIGN KEY (`Airplane`) REFERENCES `airplane_type` (`Type_name`) 86 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 87 | /*!40101 SET character_set_client = @saved_cs_client */; 88 | 89 | -- 90 | -- Dumping data for table `airport` 91 | -- 92 | 93 | LOCK TABLES `airport` WRITE; 94 | /*!40000 ALTER TABLE `airport` DISABLE KEYS */; 95 | INSERT INTO `airport` VALUES ('A100','KABUL AIRPROT','Kabul','Kabul','Boing Jet 2000'),('B1200','UNITED ARAB AIRPORT','Abudabi','Abudabi','Boing Jet 2000'),('C2300','Ata Turk International Airport','Istanbul','','Flying Jet'); 96 | /*!40000 ALTER TABLE `airport` ENABLE KEYS */; 97 | UNLOCK TABLES; 98 | 99 | -- 100 | -- Table structure for table `arrival_airport` 101 | -- 102 | 103 | DROP TABLE IF EXISTS `arrival_airport`; 104 | /*!40101 SET @saved_cs_client = @@character_set_client */; 105 | /*!50503 SET character_set_client = utf8mb4 */; 106 | CREATE TABLE `arrival_airport` ( 107 | `scheduled_arr_time` time NOT NULL, 108 | `Flight_leg` int DEFAULT NULL, 109 | `Airport` char(10) DEFAULT NULL, 110 | KEY `Flight_leg` (`Flight_leg`), 111 | KEY `Airport` (`Airport`), 112 | CONSTRAINT `arrival_airport_ibfk_1` FOREIGN KEY (`Flight_leg`) REFERENCES `flight_leg` (`Leg_no`), 113 | CONSTRAINT `arrival_airport_ibfk_2` FOREIGN KEY (`Airport`) REFERENCES `airport` (`Airport_code`) 114 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 115 | /*!40101 SET character_set_client = @saved_cs_client */; 116 | 117 | -- 118 | -- Dumping data for table `arrival_airport` 119 | -- 120 | 121 | LOCK TABLES `arrival_airport` WRITE; 122 | /*!40000 ALTER TABLE `arrival_airport` DISABLE KEYS */; 123 | INSERT INTO `arrival_airport` VALUES ('02:30:00',100,'B1200'); 124 | /*!40000 ALTER TABLE `arrival_airport` ENABLE KEYS */; 125 | UNLOCK TABLES; 126 | 127 | -- 128 | -- Table structure for table `arrives` 129 | -- 130 | 131 | DROP TABLE IF EXISTS `arrives`; 132 | /*!40101 SET @saved_cs_client = @@character_set_client */; 133 | /*!50503 SET character_set_client = utf8mb4 */; 134 | CREATE TABLE `arrives` ( 135 | `Arr_time` time DEFAULT NULL, 136 | `Leg_instance` date DEFAULT NULL, 137 | `Airport` char(10) DEFAULT NULL, 138 | KEY `Leg_instance` (`Leg_instance`), 139 | KEY `Airport` (`Airport`), 140 | CONSTRAINT `arrives_ibfk_1` FOREIGN KEY (`Leg_instance`) REFERENCES `leg_instance` (`Date`), 141 | CONSTRAINT `arrives_ibfk_2` FOREIGN KEY (`Airport`) REFERENCES `airport` (`Airport_code`) 142 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 143 | /*!40101 SET character_set_client = @saved_cs_client */; 144 | 145 | -- 146 | -- Dumping data for table `arrives` 147 | -- 148 | 149 | LOCK TABLES `arrives` WRITE; 150 | /*!40000 ALTER TABLE `arrives` DISABLE KEYS */; 151 | INSERT INTO `arrives` VALUES ('12:00:00','2024-10-12','C2300'); 152 | /*!40000 ALTER TABLE `arrives` ENABLE KEYS */; 153 | UNLOCK TABLES; 154 | 155 | -- 156 | -- Table structure for table `departs` 157 | -- 158 | 159 | DROP TABLE IF EXISTS `departs`; 160 | /*!40101 SET @saved_cs_client = @@character_set_client */; 161 | /*!50503 SET character_set_client = utf8mb4 */; 162 | CREATE TABLE `departs` ( 163 | `Dep_time` time DEFAULT NULL, 164 | `Leg_instance` date DEFAULT NULL, 165 | `Airport` char(10) DEFAULT NULL, 166 | KEY `Leg_instance` (`Leg_instance`), 167 | KEY `Airport` (`Airport`), 168 | CONSTRAINT `departs_ibfk_1` FOREIGN KEY (`Leg_instance`) REFERENCES `leg_instance` (`Date`), 169 | CONSTRAINT `departs_ibfk_2` FOREIGN KEY (`Airport`) REFERENCES `airport` (`Airport_code`) 170 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 171 | /*!40101 SET character_set_client = @saved_cs_client */; 172 | 173 | -- 174 | -- Dumping data for table `departs` 175 | -- 176 | 177 | LOCK TABLES `departs` WRITE; 178 | /*!40000 ALTER TABLE `departs` DISABLE KEYS */; 179 | INSERT INTO `departs` VALUES ('10:25:00','2024-10-12','B1200'); 180 | /*!40000 ALTER TABLE `departs` ENABLE KEYS */; 181 | UNLOCK TABLES; 182 | 183 | -- 184 | -- Table structure for table `departure_airport` 185 | -- 186 | 187 | DROP TABLE IF EXISTS `departure_airport`; 188 | /*!40101 SET @saved_cs_client = @@character_set_client */; 189 | /*!50503 SET character_set_client = utf8mb4 */; 190 | CREATE TABLE `departure_airport` ( 191 | `scheduled_dep_time` time NOT NULL, 192 | `Flight_leg` int DEFAULT NULL, 193 | `Airport` char(10) DEFAULT NULL, 194 | KEY `Flight_leg` (`Flight_leg`), 195 | KEY `Airport` (`Airport`), 196 | CONSTRAINT `departure_airport_ibfk_1` FOREIGN KEY (`Flight_leg`) REFERENCES `flight_leg` (`Leg_no`), 197 | CONSTRAINT `departure_airport_ibfk_2` FOREIGN KEY (`Airport`) REFERENCES `airport` (`Airport_code`) 198 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 199 | /*!40101 SET character_set_client = @saved_cs_client */; 200 | 201 | -- 202 | -- Dumping data for table `departure_airport` 203 | -- 204 | 205 | LOCK TABLES `departure_airport` WRITE; 206 | /*!40000 ALTER TABLE `departure_airport` DISABLE KEYS */; 207 | INSERT INTO `departure_airport` VALUES ('23:30:00',100,'A100'); 208 | /*!40000 ALTER TABLE `departure_airport` ENABLE KEYS */; 209 | UNLOCK TABLES; 210 | 211 | -- 212 | -- Table structure for table `fare` 213 | -- 214 | 215 | DROP TABLE IF EXISTS `fare`; 216 | /*!40101 SET @saved_cs_client = @@character_set_client */; 217 | /*!50503 SET character_set_client = utf8mb4 */; 218 | CREATE TABLE `fare` ( 219 | `Code` int NOT NULL, 220 | `Amount` char(15) NOT NULL, 221 | `Restriction` varchar(30) DEFAULT NULL, 222 | `Flight_number` char(10) DEFAULT NULL, 223 | UNIQUE KEY `Code` (`Code`), 224 | KEY `Flight_number` (`Flight_number`), 225 | CONSTRAINT `fare_ibfk_1` FOREIGN KEY (`Flight_number`) REFERENCES `flight` (`Number`) 226 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 227 | /*!40101 SET character_set_client = @saved_cs_client */; 228 | 229 | -- 230 | -- Dumping data for table `fare` 231 | -- 232 | 233 | LOCK TABLES `fare` WRITE; 234 | /*!40000 ALTER TABLE `fare` DISABLE KEYS */; 235 | INSERT INTO `fare` VALUES (1,'340$','Maximum Baggage wieght is 50kg','12BA'),(101,'980$','No electronic device allowed','0912HZ'); 236 | /*!40000 ALTER TABLE `fare` ENABLE KEYS */; 237 | UNLOCK TABLES; 238 | 239 | -- 240 | -- Table structure for table `flight` 241 | -- 242 | 243 | DROP TABLE IF EXISTS `flight`; 244 | /*!40101 SET @saved_cs_client = @@character_set_client */; 245 | /*!50503 SET character_set_client = utf8mb4 */; 246 | CREATE TABLE `flight` ( 247 | `Number` char(10) NOT NULL, 248 | `Airline` varchar(20) NOT NULL, 249 | `Weekdays` varchar(20) NOT NULL, 250 | PRIMARY KEY (`Number`) 251 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 252 | /*!40101 SET character_set_client = @saved_cs_client */; 253 | 254 | -- 255 | -- Dumping data for table `flight` 256 | -- 257 | 258 | LOCK TABLES `flight` WRITE; 259 | /*!40000 ALTER TABLE `flight` DISABLE KEYS */; 260 | INSERT INTO `flight` VALUES ('0912HZ','Turkish','Sunday'),('12BA','Fly Dubai','Saturday'); 261 | /*!40000 ALTER TABLE `flight` ENABLE KEYS */; 262 | UNLOCK TABLES; 263 | 264 | -- 265 | -- Table structure for table `flight_leg` 266 | -- 267 | 268 | DROP TABLE IF EXISTS `flight_leg`; 269 | /*!40101 SET @saved_cs_client = @@character_set_client */; 270 | /*!50503 SET character_set_client = utf8mb4 */; 271 | CREATE TABLE `flight_leg` ( 272 | `Leg_no` int NOT NULL, 273 | `Flight_number` char(10) DEFAULT NULL, 274 | UNIQUE KEY `Leg_no` (`Leg_no`), 275 | KEY `Flight_number` (`Flight_number`), 276 | CONSTRAINT `flight_leg_ibfk_1` FOREIGN KEY (`Flight_number`) REFERENCES `flight` (`Number`) 277 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 278 | /*!40101 SET character_set_client = @saved_cs_client */; 279 | 280 | -- 281 | -- Dumping data for table `flight_leg` 282 | -- 283 | 284 | LOCK TABLES `flight_leg` WRITE; 285 | /*!40000 ALTER TABLE `flight_leg` DISABLE KEYS */; 286 | INSERT INTO `flight_leg` VALUES (101,'0912HZ'),(100,'12BA'); 287 | /*!40000 ALTER TABLE `flight_leg` ENABLE KEYS */; 288 | UNLOCK TABLES; 289 | 290 | -- 291 | -- Table structure for table `leg_instance` 292 | -- 293 | 294 | DROP TABLE IF EXISTS `leg_instance`; 295 | /*!40101 SET @saved_cs_client = @@character_set_client */; 296 | /*!50503 SET character_set_client = utf8mb4 */; 297 | CREATE TABLE `leg_instance` ( 298 | `No_of_avail_seats` int NOT NULL, 299 | `Date` date NOT NULL, 300 | `Instance_of` int DEFAULT NULL, 301 | `Airplane` int DEFAULT NULL, 302 | UNIQUE KEY `Date` (`Date`), 303 | KEY `Instance_of` (`Instance_of`), 304 | KEY `Airplane` (`Airplane`), 305 | CONSTRAINT `leg_instance_ibfk_1` FOREIGN KEY (`Instance_of`) REFERENCES `flight_leg` (`Leg_no`), 306 | CONSTRAINT `leg_instance_ibfk_2` FOREIGN KEY (`Airplane`) REFERENCES `airplane` (`Airplane_id`) 307 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 308 | /*!40101 SET character_set_client = @saved_cs_client */; 309 | 310 | -- 311 | -- Dumping data for table `leg_instance` 312 | -- 313 | 314 | LOCK TABLES `leg_instance` WRITE; 315 | /*!40000 ALTER TABLE `leg_instance` DISABLE KEYS */; 316 | INSERT INTO `leg_instance` VALUES (20,'2024-10-12',101,3); 317 | /*!40000 ALTER TABLE `leg_instance` ENABLE KEYS */; 318 | UNLOCK TABLES; 319 | 320 | -- 321 | -- Table structure for table `reservation` 322 | -- 323 | 324 | DROP TABLE IF EXISTS `reservation`; 325 | /*!40101 SET @saved_cs_client = @@character_set_client */; 326 | /*!50503 SET character_set_client = utf8mb4 */; 327 | CREATE TABLE `reservation` ( 328 | `Customer_name` varchar(20) NOT NULL, 329 | `Cphone` char(13) DEFAULT NULL, 330 | `Reserved_seat` int DEFAULT NULL, 331 | `Flight_date` date DEFAULT NULL, 332 | KEY `Reserved_seat` (`Reserved_seat`), 333 | KEY `Flight_date` (`Flight_date`), 334 | CONSTRAINT `reservation_ibfk_1` FOREIGN KEY (`Reserved_seat`) REFERENCES `seat` (`Seat_no`), 335 | CONSTRAINT `reservation_ibfk_2` FOREIGN KEY (`Flight_date`) REFERENCES `leg_instance` (`Date`) 336 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 337 | /*!40101 SET character_set_client = @saved_cs_client */; 338 | 339 | -- 340 | -- Dumping data for table `reservation` 341 | -- 342 | 343 | LOCK TABLES `reservation` WRITE; 344 | /*!40000 ALTER TABLE `reservation` DISABLE KEYS */; 345 | INSERT INTO `reservation` VALUES ('Mohammad','+9034544321',45,'2024-10-12'),('Mohammad','+9034544321',46,'2024-10-12'),('Sara','+9034544321',47,'2024-10-12'); 346 | /*!40000 ALTER TABLE `reservation` ENABLE KEYS */; 347 | UNLOCK TABLES; 348 | 349 | -- 350 | -- Table structure for table `seat` 351 | -- 352 | 353 | DROP TABLE IF EXISTS `seat`; 354 | /*!40101 SET @saved_cs_client = @@character_set_client */; 355 | /*!50503 SET character_set_client = utf8mb4 */; 356 | CREATE TABLE `seat` ( 357 | `Seat_no` int NOT NULL, 358 | UNIQUE KEY `Seat_no` (`Seat_no`) 359 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 360 | /*!40101 SET character_set_client = @saved_cs_client */; 361 | 362 | -- 363 | -- Dumping data for table `seat` 364 | -- 365 | 366 | LOCK TABLES `seat` WRITE; 367 | /*!40000 ALTER TABLE `seat` DISABLE KEYS */; 368 | INSERT INTO `seat` VALUES (45),(46),(47),(107),(108),(109); 369 | /*!40000 ALTER TABLE `seat` ENABLE KEYS */; 370 | UNLOCK TABLES; 371 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 372 | 373 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 374 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 375 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 376 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 377 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 378 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 379 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 380 | 381 | -- Dump completed on 2024-11-13 9:40:45 382 | -------------------------------------------------------------------------------- /Student Projects/Didar_02278070/ERD of com.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Student Projects/Didar_02278070/ERD of com.png -------------------------------------------------------------------------------- /Student Projects/Didar_02278070/company.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 8.0.31, for Win64 (x86_64) 2 | -- 3 | -- Host: localhost Database: company 4 | -- ------------------------------------------------------ 5 | -- Server version 8.0.31 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!50503 SET NAMES utf8mb4 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `employee` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `employee`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!50503 SET character_set_client = utf8mb4 */; 25 | CREATE TABLE `employee` ( 26 | `Emp_ID` int NOT NULL, 27 | `Emp_Name` varchar(20) NOT NULL, 28 | `Country` varchar(20) NOT NULL, 29 | `Province` varchar(20) NOT NULL, 30 | `City` varchar(20) DEFAULT NULL, 31 | `Street_Num` char(10) NOT NULL, 32 | `Emp_PhoneNO` char(13) NOT NULL, 33 | `Manager_ID` int NOT NULL, 34 | PRIMARY KEY (`Emp_ID`), 35 | UNIQUE KEY `Emp_PhoneNO` (`Emp_PhoneNO`), 36 | KEY `Manager_ID` (`Manager_ID`), 37 | CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`Manager_ID`) REFERENCES `manager` (`Manager_ID`) 38 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 39 | /*!40101 SET character_set_client = @saved_cs_client */; 40 | 41 | -- 42 | -- Dumping data for table `employee` 43 | -- 44 | 45 | LOCK TABLES `employee` WRITE; 46 | /*!40000 ALTER TABLE `employee` DISABLE KEYS */; 47 | INSERT INTO `employee` VALUES (10,'Ahamd','AFG','Ghor','','12b','+937888889889',1),(100,'Hasib','AFG','Ghazni','Jaghori','12b','+937888888889',1); 48 | /*!40000 ALTER TABLE `employee` ENABLE KEYS */; 49 | UNLOCK TABLES; 50 | 51 | -- 52 | -- Table structure for table `manager` 53 | -- 54 | 55 | DROP TABLE IF EXISTS `manager`; 56 | /*!40101 SET @saved_cs_client = @@character_set_client */; 57 | /*!50503 SET character_set_client = utf8mb4 */; 58 | CREATE TABLE `manager` ( 59 | `Manager_ID` int NOT NULL, 60 | `Manager_Name` varchar(20) NOT NULL, 61 | `Manager_Lastname` varchar(20) DEFAULT NULL, 62 | `Manager_PhoneNO` char(13) NOT NULL, 63 | PRIMARY KEY (`Manager_ID`), 64 | UNIQUE KEY `Manager_PhoneNO` (`Manager_PhoneNO`) 65 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 66 | /*!40101 SET character_set_client = @saved_cs_client */; 67 | 68 | -- 69 | -- Dumping data for table `manager` 70 | -- 71 | 72 | LOCK TABLES `manager` WRITE; 73 | /*!40000 ALTER TABLE `manager` DISABLE KEYS */; 74 | INSERT INTO `manager` VALUES (1,'Ali','Alizade','+9378888888'); 75 | /*!40000 ALTER TABLE `manager` ENABLE KEYS */; 76 | UNLOCK TABLES; 77 | 78 | -- 79 | -- Table structure for table `vehicle` 80 | -- 81 | 82 | DROP TABLE IF EXISTS `vehicle`; 83 | /*!40101 SET @saved_cs_client = @@character_set_client */; 84 | /*!50503 SET character_set_client = utf8mb4 */; 85 | CREATE TABLE `vehicle` ( 86 | `Vehicle_plateNO` char(12) NOT NULL, 87 | `VehicleCom` varchar(20) NOT NULL, 88 | `Vehicle_Model` varchar(20) NOT NULL, 89 | `Manager_ID` int DEFAULT NULL, 90 | `Emp_ID` int DEFAULT NULL, 91 | PRIMARY KEY (`Vehicle_plateNO`), 92 | KEY `Manager_ID` (`Manager_ID`), 93 | KEY `Emp_ID` (`Emp_ID`), 94 | CONSTRAINT `vehicle_ibfk_1` FOREIGN KEY (`Manager_ID`) REFERENCES `manager` (`Manager_ID`), 95 | CONSTRAINT `vehicle_ibfk_2` FOREIGN KEY (`Emp_ID`) REFERENCES `employee` (`Emp_ID`) 96 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 97 | /*!40101 SET character_set_client = @saved_cs_client */; 98 | 99 | -- 100 | -- Dumping data for table `vehicle` 101 | -- 102 | 103 | LOCK TABLES `vehicle` WRITE; 104 | /*!40000 ALTER TABLE `vehicle` DISABLE KEYS */; 105 | INSERT INTO `vehicle` VALUES ('-4 342333','Corolla','1995',NULL,10),('-6 12333','Benz','2023',1,NULL),('temp 2333','Passo','2010',NULL,100); 106 | /*!40000 ALTER TABLE `vehicle` ENABLE KEYS */; 107 | UNLOCK TABLES; 108 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 109 | 110 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 111 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 112 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 113 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 114 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 115 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 116 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 117 | 118 | -- Dump completed on 2024-11-19 20:44:29 119 | -------------------------------------------------------------------------------- /Student Projects/Hasibullah Noori #02278026/Futsal-Team-ERD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Student Projects/Hasibullah Noori #02278026/Futsal-Team-ERD.png -------------------------------------------------------------------------------- /Student Projects/Hasibullah Noori #02278026/Futsal-Team.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 8.0.31, for Win64 (x86_64) 2 | -- 3 | -- Host: localhost Database: futsalteam 4 | -- ------------------------------------------------------ 5 | -- Server version 8.0.31 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!50503 SET NAMES utf8mb4 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `matches` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `matches`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!50503 SET character_set_client = utf8mb4 */; 25 | CREATE TABLE `matches` ( 26 | `Match_ID` int NOT NULL AUTO_INCREMENT, 27 | `Date` date NOT NULL, 28 | `Location` varchar(25) NOT NULL, 29 | `Home_Team_ID` int NOT NULL, 30 | `Away_Team_ID` int NOT NULL, 31 | `Home_Team_Score` int NOT NULL, 32 | `Away_Team_Score` int NOT NULL, 33 | PRIMARY KEY (`Match_ID`), 34 | KEY `Home_Team_ID` (`Home_Team_ID`), 35 | KEY `Away_Team_ID` (`Away_Team_ID`), 36 | CONSTRAINT `matches_ibfk_1` FOREIGN KEY (`Home_Team_ID`) REFERENCES `teams` (`Team_ID`), 37 | CONSTRAINT `matches_ibfk_2` FOREIGN KEY (`Away_Team_ID`) REFERENCES `teams` (`Team_ID`) 38 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 39 | /*!40101 SET character_set_client = @saved_cs_client */; 40 | 41 | -- 42 | -- Dumping data for table `matches` 43 | -- 44 | 45 | LOCK TABLES `matches` WRITE; 46 | /*!40000 ALTER TABLE `matches` DISABLE KEYS */; 47 | INSERT INTO `matches` VALUES (1,'2024-03-12','Yallan Ground',2,1,12,0); 48 | /*!40000 ALTER TABLE `matches` ENABLE KEYS */; 49 | UNLOCK TABLES; 50 | 51 | -- 52 | -- Table structure for table `player_team` 53 | -- 54 | 55 | DROP TABLE IF EXISTS `player_team`; 56 | /*!40101 SET @saved_cs_client = @@character_set_client */; 57 | /*!50503 SET character_set_client = utf8mb4 */; 58 | CREATE TABLE `player_team` ( 59 | `Player_ID` int DEFAULT NULL, 60 | `Team_ID` int DEFAULT NULL, 61 | KEY `Player_ID` (`Player_ID`), 62 | KEY `Team_ID` (`Team_ID`), 63 | CONSTRAINT `player_team_ibfk_1` FOREIGN KEY (`Player_ID`) REFERENCES `players` (`Player_ID`), 64 | CONSTRAINT `player_team_ibfk_2` FOREIGN KEY (`Team_ID`) REFERENCES `teams` (`Team_ID`) 65 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 66 | /*!40101 SET character_set_client = @saved_cs_client */; 67 | 68 | -- 69 | -- Dumping data for table `player_team` 70 | -- 71 | 72 | LOCK TABLES `player_team` WRITE; 73 | /*!40000 ALTER TABLE `player_team` DISABLE KEYS */; 74 | INSERT INTO `player_team` VALUES (1,2),(2,2),(3,2),(4,2),(5,2),(6,2),(7,2),(8,2),(9,2),(10,2),(11,2); 75 | /*!40000 ALTER TABLE `player_team` ENABLE KEYS */; 76 | UNLOCK TABLES; 77 | 78 | -- 79 | -- Table structure for table `players` 80 | -- 81 | 82 | DROP TABLE IF EXISTS `players`; 83 | /*!40101 SET @saved_cs_client = @@character_set_client */; 84 | /*!50503 SET character_set_client = utf8mb4 */; 85 | CREATE TABLE `players` ( 86 | `Player_ID` int NOT NULL AUTO_INCREMENT, 87 | `Player_Name` varchar(25) NOT NULL, 88 | `Last_Name` varchar(25) NOT NULL, 89 | `Age` int NOT NULL, 90 | `Position` varchar(25) NOT NULL, 91 | `Join_Date` date NOT NULL, 92 | PRIMARY KEY (`Player_ID`) 93 | ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 94 | /*!40101 SET character_set_client = @saved_cs_client */; 95 | 96 | -- 97 | -- Dumping data for table `players` 98 | -- 99 | 100 | LOCK TABLES `players` WRITE; 101 | /*!40000 ALTER TABLE `players` DISABLE KEYS */; 102 | INSERT INTO `players` VALUES (1,'Mohammad Zahid','Dawari',22,'Mid fielder','2020-01-01'),(2,'Hasibullah','Noorzai',19,'Right winger','2022-12-12'),(3,'Ali Agha','Ali zade',19,'Mid fielder','2022-12-23'),(4,'Mahmood ','Farhan',21,'Attack Mid fielder','2023-12-23'),(5,'Pasoon','Barakzai',21,'Defense Mid fielder','2023-12-23'),(6,'AB Hasib','Sakhi',21,'Center Back','2023-09-01'),(7,'AB Mujeer','Hamdard',30,'Goal Keeper','2019-09-01'),(8,'Sajad','Ahamdi',22,'Center Forward','2020-09-01'),(9,'Didar','Ramaki',22,'Left Winger','2020-10-01'),(10,'Mujtaba','Hashimi',20,'Right Back','2020-10-01'),(11,'Elham','Rahimi',20,'Left Back','2020-10-01'); 103 | /*!40000 ALTER TABLE `players` ENABLE KEYS */; 104 | UNLOCK TABLES; 105 | 106 | -- 107 | -- Table structure for table `teams` 108 | -- 109 | 110 | DROP TABLE IF EXISTS `teams`; 111 | /*!40101 SET @saved_cs_client = @@character_set_client */; 112 | /*!50503 SET character_set_client = utf8mb4 */; 113 | CREATE TABLE `teams` ( 114 | `Team_ID` int NOT NULL AUTO_INCREMENT, 115 | `Team_Name` varchar(25) NOT NULL, 116 | `Coach_Name` varchar(25) NOT NULL, 117 | `Founded_Year` int DEFAULT NULL, 118 | PRIMARY KEY (`Team_ID`) 119 | ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 120 | /*!40101 SET character_set_client = @saved_cs_client */; 121 | 122 | -- 123 | -- Dumping data for table `teams` 124 | -- 125 | 126 | LOCK TABLES `teams` WRITE; 127 | /*!40000 ALTER TABLE `teams` DISABLE KEYS */; 128 | INSERT INTO `teams` VALUES (1,'Pashtoon','Ahmad',2015),(2,'FC MUSLIM UNITED','Hasibullah Noori',2012); 129 | /*!40000 ALTER TABLE `teams` ENABLE KEYS */; 130 | UNLOCK TABLES; 131 | 132 | -- 133 | -- Table structure for table `training_sessions` 134 | -- 135 | 136 | DROP TABLE IF EXISTS `training_sessions`; 137 | /*!40101 SET @saved_cs_client = @@character_set_client */; 138 | /*!50503 SET character_set_client = utf8mb4 */; 139 | CREATE TABLE `training_sessions` ( 140 | `Session_ID` int NOT NULL AUTO_INCREMENT, 141 | `Date` date NOT NULL, 142 | `Time` time NOT NULL, 143 | `Location` varchar(25) NOT NULL, 144 | `Team_ID` int NOT NULL, 145 | PRIMARY KEY (`Session_ID`), 146 | KEY `Team_ID` (`Team_ID`), 147 | CONSTRAINT `training_sessions_ibfk_1` FOREIGN KEY (`Team_ID`) REFERENCES `teams` (`Team_ID`) 148 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 149 | /*!40101 SET character_set_client = @saved_cs_client */; 150 | 151 | -- 152 | -- Dumping data for table `training_sessions` 153 | -- 154 | 155 | LOCK TABLES `training_sessions` WRITE; 156 | /*!40000 ALTER TABLE `training_sessions` DISABLE KEYS */; 157 | INSERT INTO `training_sessions` VALUES (1,'2024-03-23','20:00:00','Training ground',2); 158 | /*!40000 ALTER TABLE `training_sessions` ENABLE KEYS */; 159 | UNLOCK TABLES; 160 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 161 | 162 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 163 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 164 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 165 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 166 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 167 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 168 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 169 | 170 | -- Dump completed on 2024-11-23 11:03:53 171 | -------------------------------------------------------------------------------- /Student Projects/Matiullah_02278144/ DormetoryERD.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Student Projects/Matiullah_02278144/ DormetoryERD.pdf -------------------------------------------------------------------------------- /Student Projects/Matiullah_02278144/dormetory.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 8.0.31, for Win64 (x86_64) 2 | -- 3 | -- Host: localhost Database: dormetory 4 | -- ------------------------------------------------------ 5 | -- Server version 8.0.31 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!50503 SET NAMES utf8mb4 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `dormetory` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `dormetory`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!50503 SET character_set_client = utf8mb4 */; 25 | CREATE TABLE `dormetory` ( 26 | `number_D` int NOT NULL, 27 | `name` varchar(15) DEFAULT NULL, 28 | `adderss` varchar(20) DEFAULT NULL, 29 | PRIMARY KEY (`number_D`) 30 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 31 | /*!40101 SET character_set_client = @saved_cs_client */; 32 | 33 | -- 34 | -- Dumping data for table `dormetory` 35 | -- 36 | 37 | LOCK TABLES `dormetory` WRITE; 38 | /*!40000 ALTER TABLE `dormetory` DISABLE KEYS */; 39 | INSERT INTO `dormetory` VALUES (21,'Kateb','darullaman'); 40 | /*!40000 ALTER TABLE `dormetory` ENABLE KEYS */; 41 | UNLOCK TABLES; 42 | 43 | -- 44 | -- Table structure for table `principle` 45 | -- 46 | 47 | DROP TABLE IF EXISTS `principle`; 48 | /*!40101 SET @saved_cs_client = @@character_set_client */; 49 | /*!50503 SET character_set_client = utf8mb4 */; 50 | CREATE TABLE `principle` ( 51 | `p_id` int NOT NULL, 52 | `name` varchar(20) DEFAULT NULL, 53 | `last_name` varchar(20) DEFAULT NULL, 54 | `phone_num` int NOT NULL, 55 | `address` varchar(30) DEFAULT NULL, 56 | `number_D` int DEFAULT NULL, 57 | PRIMARY KEY (`p_id`), 58 | KEY `number_D` (`number_D`), 59 | CONSTRAINT `principle_ibfk_1` FOREIGN KEY (`number_D`) REFERENCES `dormetory` (`number_D`) 60 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 61 | /*!40101 SET character_set_client = @saved_cs_client */; 62 | 63 | -- 64 | -- Dumping data for table `principle` 65 | -- 66 | 67 | LOCK TABLES `principle` WRITE; 68 | /*!40000 ALTER TABLE `principle` DISABLE KEYS */; 69 | INSERT INTO `principle` VALUES (1,'ahmad','ahmadi',78223211,'kabul',NULL); 70 | /*!40000 ALTER TABLE `principle` ENABLE KEYS */; 71 | UNLOCK TABLES; 72 | 73 | -- 74 | -- Table structure for table `room` 75 | -- 76 | 77 | DROP TABLE IF EXISTS `room`; 78 | /*!40101 SET @saved_cs_client = @@character_set_client */; 79 | /*!50503 SET character_set_client = utf8mb4 */; 80 | CREATE TABLE `room` ( 81 | `room_id` int NOT NULL, 82 | `capacity` int NOT NULL, 83 | `is_empty` varchar(9) DEFAULT NULL, 84 | `is_full` varchar(9) DEFAULT NULL, 85 | `number_D` int DEFAULT NULL, 86 | `std_id` int DEFAULT NULL, 87 | `p_id` int DEFAULT NULL, 88 | PRIMARY KEY (`room_id`), 89 | KEY `number_D` (`number_D`), 90 | KEY `std_id` (`std_id`), 91 | KEY `p_id` (`p_id`), 92 | CONSTRAINT `room_ibfk_1` FOREIGN KEY (`number_D`) REFERENCES `dormetory` (`number_D`), 93 | CONSTRAINT `room_ibfk_2` FOREIGN KEY (`std_id`) REFERENCES `student` (`std_id`), 94 | CONSTRAINT `room_ibfk_3` FOREIGN KEY (`p_id`) REFERENCES `principle` (`p_id`), 95 | CONSTRAINT `room_ibfk_4` FOREIGN KEY (`p_id`) REFERENCES `principle` (`p_id`) 96 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 97 | /*!40101 SET character_set_client = @saved_cs_client */; 98 | 99 | -- 100 | -- Dumping data for table `room` 101 | -- 102 | 103 | LOCK TABLES `room` WRITE; 104 | /*!40000 ALTER TABLE `room` DISABLE KEYS */; 105 | /*!40000 ALTER TABLE `room` ENABLE KEYS */; 106 | UNLOCK TABLES; 107 | 108 | -- 109 | -- Table structure for table `student` 110 | -- 111 | 112 | DROP TABLE IF EXISTS `student`; 113 | /*!40101 SET @saved_cs_client = @@character_set_client */; 114 | /*!50503 SET character_set_client = utf8mb4 */; 115 | CREATE TABLE `student` ( 116 | `std_id` int NOT NULL, 117 | `name` varchar(25) DEFAULT NULL, 118 | `last_name` varchar(15) DEFAULT NULL, 119 | `address` varchar(29) DEFAULT NULL, 120 | `phone_num` int NOT NULL, 121 | `number_D` int DEFAULT NULL, 122 | `p_id` int DEFAULT NULL, 123 | PRIMARY KEY (`std_id`), 124 | KEY `number_D` (`number_D`), 125 | KEY `p_id` (`p_id`), 126 | CONSTRAINT `student_ibfk_1` FOREIGN KEY (`number_D`) REFERENCES `dormetory` (`number_D`), 127 | CONSTRAINT `student_ibfk_2` FOREIGN KEY (`p_id`) REFERENCES `principle` (`p_id`) 128 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 129 | /*!40101 SET character_set_client = @saved_cs_client */; 130 | 131 | -- 132 | -- Dumping data for table `student` 133 | -- 134 | 135 | LOCK TABLES `student` WRITE; 136 | /*!40000 ALTER TABLE `student` DISABLE KEYS */; 137 | INSERT INTO `student` VALUES (222,'mohammad','ali','laghman',783332211,NULL,NULL); 138 | /*!40000 ALTER TABLE `student` ENABLE KEYS */; 139 | UNLOCK TABLES; 140 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 141 | 142 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 143 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 144 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 145 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 146 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 147 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 148 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 149 | 150 | -- Dump completed on 2024-11-19 20:53:30 151 | -------------------------------------------------------------------------------- /Student Projects/abdullah_02278008/S.Abdullah02278008/ERD_OfCourse.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Student Projects/abdullah_02278008/S.Abdullah02278008/ERD_OfCourse.jpeg -------------------------------------------------------------------------------- /Student Projects/abdullah_02278008/S.Abdullah02278008/coursemis.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 8.0.31, for Win64 (x86_64) 2 | -- 3 | -- Host: localhost Database: course 4 | -- ------------------------------------------------------ 5 | -- Server version 8.0.31 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!50503 SET NAMES utf8mb4 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `course` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `course`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!50503 SET character_set_client = utf8mb4 */; 25 | CREATE TABLE `course` ( 26 | `Course_ID` int NOT NULL, 27 | `Course_Name` varchar(30) DEFAULT NULL, 28 | `Founded` int DEFAULT NULL, 29 | PRIMARY KEY (`Course_ID`) 30 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 31 | /*!40101 SET character_set_client = @saved_cs_client */; 32 | 33 | -- 34 | -- Dumping data for table `course` 35 | -- 36 | 37 | LOCK TABLES `course` WRITE; 38 | /*!40000 ALTER TABLE `course` DISABLE KEYS */; 39 | INSERT INTO `course` VALUES (1,'Kateb',2000); 40 | /*!40000 ALTER TABLE `course` ENABLE KEYS */; 41 | UNLOCK TABLES; 42 | 43 | -- 44 | -- Table structure for table `student` 45 | -- 46 | 47 | DROP TABLE IF EXISTS `student`; 48 | /*!40101 SET @saved_cs_client = @@character_set_client */; 49 | /*!50503 SET character_set_client = utf8mb4 */; 50 | CREATE TABLE `student` ( 51 | `Student_ID` int NOT NULL, 52 | `Student_Name` varchar(20) DEFAULT NULL, 53 | `Last_Name` varchar(20) DEFAULT NULL, 54 | `F_Name` varchar(20) DEFAULT NULL, 55 | `Student_Age` int DEFAULT NULL, 56 | `Student_Sub` varchar(10) DEFAULT NULL, 57 | `Student_fice` int DEFAULT NULL, 58 | `Course_ID` int DEFAULT NULL, 59 | PRIMARY KEY (`Student_ID`), 60 | KEY `Course_ID` (`Course_ID`), 61 | CONSTRAINT `student_ibfk_1` FOREIGN KEY (`Course_ID`) REFERENCES `course` (`Course_ID`) 62 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 63 | /*!40101 SET character_set_client = @saved_cs_client */; 64 | 65 | -- 66 | -- Dumping data for table `student` 67 | -- 68 | 69 | LOCK TABLES `student` WRITE; 70 | /*!40000 ALTER TABLE `student` DISABLE KEYS */; 71 | INSERT INTO `student` VALUES (100,'Zahid','Dawari','M Arif',22,'English',2000,1); 72 | /*!40000 ALTER TABLE `student` ENABLE KEYS */; 73 | UNLOCK TABLES; 74 | 75 | -- 76 | -- Table structure for table `teacher` 77 | -- 78 | 79 | DROP TABLE IF EXISTS `teacher`; 80 | /*!40101 SET @saved_cs_client = @@character_set_client */; 81 | /*!50503 SET character_set_client = utf8mb4 */; 82 | CREATE TABLE `teacher` ( 83 | `Teacher_ID` int NOT NULL, 84 | `Teacher_Name` varchar(20) DEFAULT NULL, 85 | `Teacher_Sub` varchar(15) DEFAULT NULL, 86 | `Teacher_salary` int DEFAULT NULL, 87 | `Course_ID` int DEFAULT NULL, 88 | PRIMARY KEY (`Teacher_ID`), 89 | KEY `Course_ID` (`Course_ID`), 90 | CONSTRAINT `teacher_ibfk_1` FOREIGN KEY (`Course_ID`) REFERENCES `course` (`Course_ID`) 91 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 92 | /*!40101 SET character_set_client = @saved_cs_client */; 93 | 94 | -- 95 | -- Dumping data for table `teacher` 96 | -- 97 | 98 | LOCK TABLES `teacher` WRITE; 99 | /*!40000 ALTER TABLE `teacher` DISABLE KEYS */; 100 | INSERT INTO `teacher` VALUES (1213,'Ahmad','English',9000,1),(1214,'farhan','English',9000,1); 101 | /*!40000 ALTER TABLE `teacher` ENABLE KEYS */; 102 | UNLOCK TABLES; 103 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 104 | 105 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 106 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 107 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 108 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 109 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 110 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 111 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 112 | 113 | -- Dump completed on 2024-10-30 10:10:49 114 | -------------------------------------------------------------------------------- /Student Projects/mohammad jaseem_ID 02278091/Clinic.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 8.0.31, for Win64 (x86_64) 2 | -- 3 | -- Host: localhost Database: clintc 4 | -- ------------------------------------------------------ 5 | -- Server version 8.0.31 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!50503 SET NAMES utf8mb4 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `diagnose` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `diagnose`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!50503 SET character_set_client = utf8mb4 */; 25 | CREATE TABLE `diagnose` ( 26 | `code` int NOT NULL, 27 | `details` varchar(20) NOT NULL, 28 | PRIMARY KEY (`code`) 29 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 30 | /*!40101 SET character_set_client = @saved_cs_client */; 31 | 32 | -- 33 | -- Dumping data for table `diagnose` 34 | -- 35 | 36 | LOCK TABLES `diagnose` WRITE; 37 | /*!40000 ALTER TABLE `diagnose` DISABLE KEYS */; 38 | INSERT INTO `diagnose` VALUES (21,'the_is problem'); 39 | /*!40000 ALTER TABLE `diagnose` ENABLE KEYS */; 40 | UNLOCK TABLES; 41 | 42 | -- 43 | -- Table structure for table `docter` 44 | -- 45 | 46 | DROP TABLE IF EXISTS `docter`; 47 | /*!40101 SET @saved_cs_client = @@character_set_client */; 48 | /*!50503 SET character_set_client = utf8mb4 */; 49 | CREATE TABLE `docter` ( 50 | `id` int NOT NULL AUTO_INCREMENT, 51 | `first_name` varchar(20) NOT NULL, 52 | `last_name` varchar(20) NOT NULL, 53 | `fees` int DEFAULT NULL, 54 | PRIMARY KEY (`id`) 55 | ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 56 | /*!40101 SET character_set_client = @saved_cs_client */; 57 | 58 | -- 59 | -- Dumping data for table `docter` 60 | -- 61 | 62 | LOCK TABLES `docter` WRITE; 63 | /*!40000 ALTER TABLE `docter` DISABLE KEYS */; 64 | INSERT INTO `docter` VALUES (1,'jaseem','noori',NULL),(2,'jaseem','noori',200); 65 | /*!40000 ALTER TABLE `docter` ENABLE KEYS */; 66 | UNLOCK TABLES; 67 | 68 | -- 69 | -- Table structure for table `patient` 70 | -- 71 | 72 | DROP TABLE IF EXISTS `patient`; 73 | /*!40101 SET @saved_cs_client = @@character_set_client */; 74 | /*!50503 SET character_set_client = utf8mb4 */; 75 | CREATE TABLE `patient` ( 76 | `id` int NOT NULL AUTO_INCREMENT, 77 | `first_name` varchar(20) NOT NULL, 78 | `last_name` varchar(20) NOT NULL, 79 | `insurance_number` int DEFAULT NULL, 80 | PRIMARY KEY (`id`) 81 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 82 | /*!40101 SET character_set_client = @saved_cs_client */; 83 | 84 | -- 85 | -- Dumping data for table `patient` 86 | -- 87 | 88 | LOCK TABLES `patient` WRITE; 89 | /*!40000 ALTER TABLE `patient` DISABLE KEYS */; 90 | INSERT INTO `patient` VALUES (1,'ruallah','sayed',NULL); 91 | /*!40000 ALTER TABLE `patient` ENABLE KEYS */; 92 | UNLOCK TABLES; 93 | 94 | -- 95 | -- Table structure for table `specialization` 96 | -- 97 | 98 | DROP TABLE IF EXISTS `specialization`; 99 | /*!40101 SET @saved_cs_client = @@character_set_client */; 100 | /*!50503 SET character_set_client = utf8mb4 */; 101 | CREATE TABLE `specialization` ( 102 | `id` int DEFAULT NULL, 103 | `description` varchar(20) DEFAULT NULL, 104 | KEY `id` (`id`), 105 | CONSTRAINT `specialization_ibfk_1` FOREIGN KEY (`id`) REFERENCES `docter` (`id`) 106 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 107 | /*!40101 SET character_set_client = @saved_cs_client */; 108 | 109 | -- 110 | -- Dumping data for table `specialization` 111 | -- 112 | 113 | LOCK TABLES `specialization` WRITE; 114 | /*!40000 ALTER TABLE `specialization` DISABLE KEYS */; 115 | /*!40000 ALTER TABLE `specialization` ENABLE KEYS */; 116 | UNLOCK TABLES; 117 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 118 | 119 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 120 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 121 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 122 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 123 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 124 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 125 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 126 | 127 | -- Dump completed on 2024-11-23 11:11:45 128 | -------------------------------------------------------------------------------- /Student Projects/mohammad jaseem_ID 02278091/clinic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Student Projects/mohammad jaseem_ID 02278091/clinic.png -------------------------------------------------------------------------------- /Student Projects/reza-hassani-02278073/BookStore.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 8.0.31, for Win64 (x86_64) 2 | -- 3 | -- Host: localhost Database: book_store 4 | -- ------------------------------------------------------ 5 | -- Server version 8.0.31 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!50503 SET NAMES utf8mb4 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `author` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `author`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!50503 SET character_set_client = utf8mb4 */; 25 | CREATE TABLE `author` ( 26 | `author_id` int NOT NULL, 27 | `author_first_name` varchar(30) DEFAULT NULL, 28 | `author_last_name` varchar(30) DEFAULT NULL, 29 | `author_date_of_birth` timestamp NULL DEFAULT NULL, 30 | `author_gender` varchar(30) DEFAULT NULL, 31 | `country` varchar(20) DEFAULT NULL, 32 | PRIMARY KEY (`author_id`) 33 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 34 | /*!40101 SET character_set_client = @saved_cs_client */; 35 | 36 | -- 37 | -- Dumping data for table `author` 38 | -- 39 | 40 | LOCK TABLES `author` WRITE; 41 | /*!40000 ALTER TABLE `author` DISABLE KEYS */; 42 | INSERT INTO `author` VALUES (1,'M.Zahid','Dawari','2002-10-02 19:30:00','Male','AFG'); 43 | /*!40000 ALTER TABLE `author` ENABLE KEYS */; 44 | UNLOCK TABLES; 45 | 46 | -- 47 | -- Table structure for table `book_categories` 48 | -- 49 | 50 | DROP TABLE IF EXISTS `book_categories`; 51 | /*!40101 SET @saved_cs_client = @@character_set_client */; 52 | /*!50503 SET character_set_client = utf8mb4 */; 53 | CREATE TABLE `book_categories` ( 54 | `book_category_code` int NOT NULL, 55 | `book_cat_des` varchar(30) DEFAULT NULL, 56 | PRIMARY KEY (`book_category_code`) 57 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 58 | /*!40101 SET character_set_client = @saved_cs_client */; 59 | 60 | -- 61 | -- Dumping data for table `book_categories` 62 | -- 63 | 64 | LOCK TABLES `book_categories` WRITE; 65 | /*!40000 ALTER TABLE `book_categories` DISABLE KEYS */; 66 | INSERT INTO `book_categories` VALUES (11,'scientific'); 67 | /*!40000 ALTER TABLE `book_categories` ENABLE KEYS */; 68 | UNLOCK TABLES; 69 | 70 | -- 71 | -- Table structure for table `books` 72 | -- 73 | 74 | DROP TABLE IF EXISTS `books`; 75 | /*!40101 SET @saved_cs_client = @@character_set_client */; 76 | /*!50503 SET character_set_client = utf8mb4 */; 77 | CREATE TABLE `books` ( 78 | `book_id` int NOT NULL, 79 | `author_id` int NOT NULL, 80 | `book_category_code` int NOT NULL, 81 | `date_of_publication` date DEFAULT NULL, 82 | `date_of_aquired` date DEFAULT NULL, 83 | `book_title` varchar(30) DEFAULT NULL, 84 | `book_comments` varchar(40) DEFAULT NULL, 85 | `book_price` int DEFAULT NULL, 86 | PRIMARY KEY (`book_id`), 87 | KEY `author_id` (`author_id`), 88 | KEY `book_category_code` (`book_category_code`), 89 | CONSTRAINT `books_ibfk_1` FOREIGN KEY (`author_id`) REFERENCES `author` (`author_id`), 90 | CONSTRAINT `books_ibfk_2` FOREIGN KEY (`book_category_code`) REFERENCES `book_categories` (`book_category_code`) 91 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 92 | /*!40101 SET character_set_client = @saved_cs_client */; 93 | 94 | -- 95 | -- Dumping data for table `books` 96 | -- 97 | 98 | LOCK TABLES `books` WRITE; 99 | /*!40000 ALTER TABLE `books` DISABLE KEYS */; 100 | INSERT INTO `books` VALUES (1000,1,11,'2022-12-29','2023-12-12','DARK INVENTIONS','STRUGGLE',1200); 101 | /*!40000 ALTER TABLE `books` ENABLE KEYS */; 102 | UNLOCK TABLES; 103 | 104 | -- 105 | -- Table structure for table `customer` 106 | -- 107 | 108 | DROP TABLE IF EXISTS `customer`; 109 | /*!40101 SET @saved_cs_client = @@character_set_client */; 110 | /*!50503 SET character_set_client = utf8mb4 */; 111 | CREATE TABLE `customer` ( 112 | `cus_ID` int NOT NULL, 113 | `cus_code` int NOT NULL, 114 | `cus_name` varchar(20) NOT NULL, 115 | `country` varchar(20) DEFAULT NULL, 116 | `province` varchar(20) DEFAULT NULL, 117 | `cus_phone` char(13) NOT NULL, 118 | `cus_email` varchar(25) DEFAULT NULL, 119 | PRIMARY KEY (`cus_ID`), 120 | UNIQUE KEY `cus_code` (`cus_code`) 121 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 122 | /*!40101 SET character_set_client = @saved_cs_client */; 123 | 124 | -- 125 | -- Dumping data for table `customer` 126 | -- 127 | 128 | LOCK TABLES `customer` WRITE; 129 | /*!40000 ALTER TABLE `customer` DISABLE KEYS */; 130 | INSERT INTO `customer` VALUES (1,1001,'Ali Alizade','AFG','Ghazni','+93678766556','ali@gmail.com'); 131 | /*!40000 ALTER TABLE `customer` ENABLE KEYS */; 132 | UNLOCK TABLES; 133 | 134 | -- 135 | -- Table structure for table `order_items` 136 | -- 137 | 138 | DROP TABLE IF EXISTS `order_items`; 139 | /*!40101 SET @saved_cs_client = @@character_set_client */; 140 | /*!50503 SET character_set_client = utf8mb4 */; 141 | CREATE TABLE `order_items` ( 142 | `items_num` int NOT NULL, 143 | `order_ID` int NOT NULL, 144 | `book_id` int NOT NULL, 145 | `item_price` int DEFAULT NULL, 146 | `item_comment` varchar(20) DEFAULT NULL, 147 | PRIMARY KEY (`items_num`), 148 | KEY `book_id` (`book_id`), 149 | KEY `order_ID` (`order_ID`), 150 | CONSTRAINT `order_items_ibfk_1` FOREIGN KEY (`book_id`) REFERENCES `books` (`book_id`), 151 | CONSTRAINT `order_items_ibfk_2` FOREIGN KEY (`order_ID`) REFERENCES `orders` (`order_ID`) 152 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 153 | /*!40101 SET character_set_client = @saved_cs_client */; 154 | 155 | -- 156 | -- Dumping data for table `order_items` 157 | -- 158 | 159 | LOCK TABLES `order_items` WRITE; 160 | /*!40000 ALTER TABLE `order_items` DISABLE KEYS */; 161 | INSERT INTO `order_items` VALUES (12,100,1000,1200,'STRUGGLE'); 162 | /*!40000 ALTER TABLE `order_items` ENABLE KEYS */; 163 | UNLOCK TABLES; 164 | 165 | -- 166 | -- Table structure for table `orders` 167 | -- 168 | 169 | DROP TABLE IF EXISTS `orders`; 170 | /*!40101 SET @saved_cs_client = @@character_set_client */; 171 | /*!50503 SET character_set_client = utf8mb4 */; 172 | CREATE TABLE `orders` ( 173 | `order_ID` int NOT NULL, 174 | `cus_ID` int NOT NULL, 175 | `order_date` date NOT NULL, 176 | `order_value` int NOT NULL, 177 | PRIMARY KEY (`order_ID`), 178 | KEY `cus_ID` (`cus_ID`), 179 | CONSTRAINT `orders_ibfk_1` FOREIGN KEY (`cus_ID`) REFERENCES `customer` (`cus_ID`) 180 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 181 | /*!40101 SET character_set_client = @saved_cs_client */; 182 | 183 | -- 184 | -- Dumping data for table `orders` 185 | -- 186 | 187 | LOCK TABLES `orders` WRITE; 188 | /*!40000 ALTER TABLE `orders` DISABLE KEYS */; 189 | INSERT INTO `orders` VALUES (100,1,'2024-09-12',1200); 190 | /*!40000 ALTER TABLE `orders` ENABLE KEYS */; 191 | UNLOCK TABLES; 192 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 193 | 194 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 195 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 196 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 197 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 198 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 199 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 200 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 201 | 202 | -- Dump completed on 2024-10-30 10:17:10 203 | -------------------------------------------------------------------------------- /Student Projects/reza-hassani-02278073/Book_Store_ERD.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Student Projects/reza-hassani-02278073/Book_Store_ERD.jpg -------------------------------------------------------------------------------- /Student Projects/sajadahmad-02278100/BookStore_ERD.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SaadullahKarimi/Database_Concept_Course/4bf8776caa7de3c4b1a7e1af89d3482a27278e49/Student Projects/sajadahmad-02278100/BookStore_ERD.jpg -------------------------------------------------------------------------------- /Student Projects/sajadahmad-02278100/bookstore.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 8.0.31, for Win64 (x86_64) 2 | -- 3 | -- Host: localhost Database: bookstore 4 | -- ------------------------------------------------------ 5 | -- Server version 8.0.31 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!50503 SET NAMES utf8mb4 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `author` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `author`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!50503 SET character_set_client = utf8mb4 */; 25 | CREATE TABLE `author` ( 26 | `author_id` int DEFAULT NULL, 27 | `first_Name` varchar(20) DEFAULT NULL, 28 | `Last_Name` varchar(20) DEFAULT NULL, 29 | `data_of_birth` date DEFAULT NULL, 30 | `gender` varchar(20) DEFAULT NULL 31 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 32 | /*!40101 SET character_set_client = @saved_cs_client */; 33 | 34 | -- 35 | -- Dumping data for table `author` 36 | -- 37 | 38 | LOCK TABLES `author` WRITE; 39 | /*!40000 ALTER TABLE `author` DISABLE KEYS */; 40 | INSERT INTO `author` VALUES (2278,'reza','hassani','2003-06-13','male'); 41 | /*!40000 ALTER TABLE `author` ENABLE KEYS */; 42 | UNLOCK TABLES; 43 | 44 | -- 45 | -- Table structure for table `books` 46 | -- 47 | 48 | DROP TABLE IF EXISTS `books`; 49 | /*!40101 SET @saved_cs_client = @@character_set_client */; 50 | /*!50503 SET character_set_client = utf8mb4 */; 51 | CREATE TABLE `books` ( 52 | `book_id` int DEFAULT NULL, 53 | `author_id` int DEFAULT NULL, 54 | `date_of_publication` date DEFAULT NULL, 55 | `date_aquired` date DEFAULT NULL, 56 | `book_title` varchar(20) DEFAULT NULL, 57 | `book_price` int DEFAULT NULL 58 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 59 | /*!40101 SET character_set_client = @saved_cs_client */; 60 | 61 | -- 62 | -- Dumping data for table `books` 63 | -- 64 | 65 | LOCK TABLES `books` WRITE; 66 | /*!40000 ALTER TABLE `books` DISABLE KEYS */; 67 | INSERT INTO `books` VALUES (1,1,'2020-04-05','2021-05-06','darkness',200); 68 | /*!40000 ALTER TABLE `books` ENABLE KEYS */; 69 | UNLOCK TABLES; 70 | 71 | -- 72 | -- Table structure for table `customer` 73 | -- 74 | 75 | DROP TABLE IF EXISTS `customer`; 76 | /*!40101 SET @saved_cs_client = @@character_set_client */; 77 | /*!50503 SET character_set_client = utf8mb4 */; 78 | CREATE TABLE `customer` ( 79 | `customer_id` int NOT NULL, 80 | `customer_code` int DEFAULT NULL, 81 | `customer_Name` varchar(20) DEFAULT NULL, 82 | `customer_adress` varchar(20) DEFAULT NULL, 83 | `customer_phone` int DEFAULT NULL, 84 | PRIMARY KEY (`customer_id`) 85 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 86 | /*!40101 SET character_set_client = @saved_cs_client */; 87 | 88 | -- 89 | -- Dumping data for table `customer` 90 | -- 91 | 92 | LOCK TABLES `customer` WRITE; 93 | /*!40000 ALTER TABLE `customer` DISABLE KEYS */; 94 | INSERT INTO `customer` VALUES (22,3444,'hadi','kabul',22988874); 95 | /*!40000 ALTER TABLE `customer` ENABLE KEYS */; 96 | UNLOCK TABLES; 97 | 98 | -- 99 | -- Table structure for table `orders` 100 | -- 101 | 102 | DROP TABLE IF EXISTS `orders`; 103 | /*!40101 SET @saved_cs_client = @@character_set_client */; 104 | /*!50503 SET character_set_client = utf8mb4 */; 105 | CREATE TABLE `orders` ( 106 | `order_id` int NOT NULL, 107 | `customer_id` int DEFAULT NULL, 108 | `order_date` date DEFAULT NULL, 109 | `order_value` varchar(20) DEFAULT NULL, 110 | PRIMARY KEY (`order_id`) 111 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 112 | /*!40101 SET character_set_client = @saved_cs_client */; 113 | 114 | -- 115 | -- Dumping data for table `orders` 116 | -- 117 | 118 | LOCK TABLES `orders` WRITE; 119 | /*!40000 ALTER TABLE `orders` DISABLE KEYS */; 120 | INSERT INTO `orders` VALUES (2,22,'2022-04-12','200'); 121 | /*!40000 ALTER TABLE `orders` ENABLE KEYS */; 122 | UNLOCK TABLES; 123 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 124 | 125 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 126 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 127 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 128 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 129 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 130 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 131 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 132 | 133 | -- Dump completed on 2024-11-22 23:30:32 134 | --------------------------------------------------------------------------------