MySQL 測試數據(附開源網站)

MySQL測試數據

前言:

   筆者接下來要步入MySQL DQL的學習階段了,然而在開始學習時,苦苦沒有測試數據,故花了很長時間利用某開源網站(附在文章最後)製作了4個數據表,四個表之間筆者經過考慮並沒有添加物理外鍵,不過留下了相應的索引,如有需要,讀者可自行添加邏輯外鍵。四個表數據我會在正文中分別陳述。製作不易,留個👍再走吧!

測試數據如下:

1 創建school數據表

/*創建school數據表*/
DROP DATABASE IF EXISTS `school`;
CREATE DATABASE `school`;

USE `school`;

2 創建年級表並插入數據

/*創建年級表*/
DROP TABLE IF EXISTS `grade`;
CREATE TABLE `grade`(
	`GradeID` INT(1) NOT NULL COMMENT '年級編號',
	`GradeName` VARCHAR(20) NOT NULL COMMENT '年級名稱',
	PRIMARY KEY (`GradeID`)
)ENGINE=INNODB DEFAULT CHARSET=utf8;
-- 年級數據:
INSERT INTO `grade` VALUES
(1,'大一'),(2,'大二'),(3,'大三'),(4,'大四');

Sequel Pro 中展示:

在這裏插入圖片描述

3 創建學生表並插入數據

(共200條數據!)

/*創建學生表*/

DROP TABLE `student`;

CREATE TABLE `student` (
  `StudentNo` mediumint NOT NULL COMMENT '學號',
  `LoginPwd` varchar(255) COMMENT '登陸密碼',
  `Name` varchar(255) default NULL COMMENT '學生姓名',
  `Gender` varchar(255) default NULL COMMENT '性別',
  `Phone` varchar(100) default NULL COMMENT '聯繫電話,允許爲空,可選輸入',
  `GradeId` varchar(255) default NULL COMMENT '年級',
  `Address` varchar(255) COMMENT '地址',
  `Birth` DATETIME COMMENT '出生時間',
  `Email` varchar(255) default NULL COMMENT '郵箱',
  `IDCard` varchar(13) default NULL COMMENT '身份證號',
  PRIMARY KEY (`StudentNo`),
  UNIQUE KEY `IDCard` (`IDCard`),
  KEY `Email` (`Email`)
) AUTO_INCREMENT=1 ENGINE=INNODB DEFAULT CHARSET=utf8;

-- 學生數據如下:共200條

INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10001,"3074","Roanna","female","(323) 505-2056","1","Épinal","2000-04-18 07:32:36","[email protected]","16811101 9181"),(10002,"5067","Wanda","female","(521) 102-9181","2","Kontich","2000-06-10 21:12:39","[email protected]","16451023 2202"),(10003,"1200","Lila","female","(830) 232-6495","3","Łomża","2000-02-13 20:55:31","[email protected]","16550309 4426"),(10004,"1518","Damian","female","(727) 438-4260","1","Chandler","2000-08-05 02:32:51","[email protected]","16130219 6652"),(10005,"4033","Zeph","female","(315) 639-6899","2","Stalowa Wola","2000-01-02 12:22:42","[email protected]","16150907 1245"),(10006,"8300","Wynne","female","(813) 242-6704","4","Recco","1999-12-26 07:35:36","[email protected]","16410325 6741"),(10007,"8274","Rogan","female","(338) 362-0943","1","Castri di Lecce","1999-06-13 08:35:20","[email protected]","16400513 8922"),(10008,"9199","Maxwell","male","(726) 474-9574","3","Little Rock","1999-07-17 22:28:21","[email protected]","16301124 3296"),(10009,"4729","Sheila","male","(717) 378-7174","3","Erie","2000-03-14 00:02:58","[email protected]","16810525 4091"),(10010,"1973","Chantale","male","(351) 388-8842","4","Tasikmalaya","2000-04-20 18:50:21","[email protected]","16751123 5611");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10011,"3800","Logan","female","(855) 154-1347","2","Rance","1999-05-04 04:03:36","[email protected]","16350522 6344"),(10012,"1674","Neil","female","(592) 910-7632","4","Adoni","2000-11-05 13:47:54","[email protected]","16671222 3673"),(10013,"9815","Georgia","female","(773) 212-7683","4","Archennes","2000-09-11 20:44:34","[email protected]","16881127 5091"),(10014,"9462","Ebony","male","(114) 817-2113","1","Wyoming","2000-02-13 15:12:27","[email protected]","16110701 0728"),(10015,"2778","Preston","male","(891) 962-8039","4","Abaetetuba","1999-05-05 00:09:19","[email protected]","16360729 5072"),(10016,"2369","Jermaine","female","(402) 289-2888","3","Santo Stefano del Sole","1999-08-25 17:59:14","[email protected]","16280616 4204"),(10017,"9876","Mallory","male","(808) 912-7250","2","Rathenow","2000-04-22 21:31:46","[email protected]","16010610 9051"),(10018,"6566","Avye","female","(560) 697-3827","2","Bedollo","1999-08-18 04:11:47","[email protected]","16970513 2687"),(10019,"8629","Chase","male","(170) 567-9101","3","Valbrevenna","1999-10-21 09:26:26","[email protected]","16210614 7396"),(10020,"3767","Judith","female","(556) 416-2606","4","Duncan","2000-08-30 16:39:13","[email protected]","16171128 2200");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10021,"2170","Ori","male","(332) 111-1672","3","Sars-la-Buissire","2000-01-23 23:02:13","[email protected]","16040911 4691"),(10022,"7645","Noelle","female","(741) 639-3344","4","Vico nel Lazio","2000-04-18 04:19:15","[email protected]","16650814 9033"),(10023,"1537","Herman","male","(482) 675-8775","3","Wood Buffalo","2001-02-11 23:42:40","[email protected]","16051224 5697"),(10024,"8493","Orli","female","(657) 851-0898","2","Tiegem","2000-06-20 10:25:36","[email protected]","16700216 8800"),(10025,"7168","Brynn","male","(372) 272-2797","3","Conselice","1999-04-18 19:24:29","[email protected]","16370418 2694"),(10026,"8497","Kelly","male","(167) 327-4944","2","Narowal","2000-03-24 01:45:46","[email protected]","16470807 9274"),(10027,"7590","Honorato","male","(353) 202-8536","4","Hualpén","2000-09-30 19:07:05","[email protected]","16470729 9410"),(10028,"9326","Violet","female","(951) 281-9997","4","Tacoma","2000-12-30 23:42:36","[email protected]","16280323 9546"),(10029,"1687","Summer","female","(396) 662-1902","2","Großpetersdorf","2000-07-13 19:13:02","[email protected]","16140716 8630"),(10030,"8335","Zelenia","female","(406) 575-8418","2","Bokaro Steel City","2001-01-09 22:03:42","[email protected]","16701029 2873");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10031,"7285","May","male","(206) 508-8925","4","Saint-Denis-Bovesse","1999-05-28 03:19:20","[email protected]","16080104 1625"),(10032,"5832","Logan","female","(955) 838-3533","2","Yellowhead County","2001-02-28 09:54:49","[email protected]","16780227 6332"),(10033,"2743","MacKensie","female","(615) 702-4257","1","Volokonovka","2001-03-13 09:28:31","[email protected]","16350619 0044"),(10034,"2554","Lareina","male","(207) 417-4357","3","Oaxaca","2000-09-15 15:35:36","[email protected]","16050127 5010"),(10035,"4370","Susan","male","(355) 749-1428","1","Kallo","2001-01-02 03:06:27","[email protected]","16830208 9993"),(10036,"4761","Branden","male","(129) 562-2679","3","Rocca Santo Stefano","2000-07-31 19:38:41","[email protected]","16810915 6581"),(10037,"6268","Oliver","female","(330) 204-5219","1","Murree","2000-10-12 17:37:18","[email protected]","16910907 1762"),(10038,"3096","Gay","female","(313) 870-1744","4","Şereflikoçhisar","2000-09-29 00:44:18","[email protected]","16871004 9746"),(10039,"8834","Ria","male","(789) 424-7591","4","Loy","1999-10-06 01:11:01","[email protected]","16131105 5691"),(10040,"6203","Dolan","male","(796) 144-1850","1","Snezhinsk","2001-03-12 11:41:17","[email protected]","16110807 8393");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10041,"9732","Tallulah","female","(930) 862-0731","3","Tank","2001-01-10 20:03:56","[email protected]","16080118 3377"),(10042,"4682","Martha","male","(744) 522-4997","1","Evesham","1999-07-22 14:35:35","[email protected]","16840720 4216"),(10043,"6442","Caesar","male","(561) 983-2221","4","Chandannagar","2000-09-12 01:05:25","[email protected]","16440108 1064"),(10044,"1808","Inga","male","(210) 882-9858","3","Açailândia","2000-06-11 01:10:15","[email protected]","16450114 6072"),(10045,"3276","Idola","male","(742) 860-3321","3","Warminster","1999-10-05 23:33:21","[email protected]","16370724 8617"),(10046,"7410","Allistair","female","(470) 218-5854","1","Máfil","2001-03-26 05:55:31","[email protected]","16910525 0063"),(10047,"6560","Macey","male","(238) 934-7916","4","Ceranesi","1999-08-27 23:13:33","[email protected]","16071025 1349"),(10048,"5322","Hyatt","female","(973) 383-6943","1","Schwalbach","2000-05-01 11:48:13","[email protected]","16641226 7855"),(10049,"7673","Sigourney","female","(617) 472-7649","3","Osimo","2000-07-28 10:03:05","[email protected]","16120606 4683"),(10050,"3112","Dara","female","(203) 917-2419","3","Temploux","2000-12-01 21:29:05","[email protected]","16610822 0572");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10051,"6760","Amos","male","(478) 226-6830","3","Livorno","1999-09-08 05:46:13","[email protected]","16131217 8690"),(10052,"8390","Melinda","male","(586) 616-5838","1","Caramanico Terme","2001-03-17 03:44:41","[email protected]","16750710 0795"),(10053,"3594","Ramona","male","(119) 532-8120","1","Hoofddorp","2001-02-01 08:37:19","[email protected]","16330329 4056"),(10054,"2072","Daryl","female","(204) 524-5540","1","Nakusp","2000-12-12 03:40:47","[email protected]","16850812 5013"),(10055,"2127","Grant","male","(540) 572-3967","1","Maple Creek","1999-04-27 13:12:05","[email protected]","16600214 8556"),(10056,"3953","Howard","female","(149) 575-8574","4","Colombes","2000-03-17 06:41:18","[email protected]","16690817 7998"),(10057,"6821","Ishmael","male","(327) 911-0776","3","Castiglione di Sicilia","2000-10-15 00:37:07","[email protected]","16260606 1055"),(10058,"1716","Yen","female","(935) 482-4765","2","Castello Tesino","1999-06-09 23:33:32","[email protected]","16070311 0098"),(10059,"3951","Cade","female","(801) 882-3259","4","San Isidro","1999-11-17 12:22:34","[email protected]","16551009 4724"),(10060,"1220","Hashim","male","(392) 515-7311","4","Wierde","2000-06-13 03:14:40","[email protected]","16680119 0122");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10061,"3222","Willa","female","(314) 640-8126","2","Sullana","2000-02-29 01:13:47","[email protected]","16130519 2831"),(10062,"2314","Sonia","female","(873) 515-3725","2","Pettoranello del Molise","1999-06-22 19:43:35","[email protected]","16980112 0859"),(10063,"9628","Zahir","female","(487) 745-6510","1","Blevio","2000-08-25 08:49:17","[email protected]","16210206 1617"),(10064,"8629","Hope","female","(122) 766-9684","4","Fresia","2000-04-28 15:50:12","[email protected]","16391123 8800"),(10065,"3687","Shoshana","male","(933) 150-6125","3","Hermosillo","2000-10-08 01:24:20","[email protected]","16160821 2203"),(10066,"3606","Gareth","male","(328) 269-7400","1","Vaughan","1999-10-30 10:15:59","[email protected]","16121123 3208"),(10067,"9433","Piper","male","(214) 925-7984","1","Cisano Bergamasco","2000-01-14 22:54:29","[email protected]","16620907 5867"),(10068,"6983","Kennedy","male","(659) 372-9206","3","Alnwick","2000-12-04 07:34:05","[email protected]","16990308 4029"),(10069,"8176","Irma","female","(441) 321-1276","2","Renfrew","1999-05-06 00:02:36","[email protected]","16160125 1133"),(10070,"6913","Gavin","male","(877) 457-6858","3","Terme","1999-04-30 00:54:13","[email protected]","16940802 4009");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10071,"9301","Xantha","male","(154) 904-2155","1","Carleton","1999-09-18 04:01:05","[email protected]","16531217 5101"),(10072,"9047","Camden","male","(860) 354-2246","3","Chañaral","2000-01-05 01:59:58","[email protected]","16291211 9043"),(10073,"9329","Athena","female","(909) 761-7133","1","Vaughan","2001-01-09 15:34:36","[email protected]","16081128 0916"),(10074,"7554","Louis","male","(746) 566-7343","1","Icheon","2000-09-15 20:18:30","[email protected]","16200403 2054"),(10075,"8200","Kenneth","male","(241) 358-7716","4","Llandrindod Wells","2000-02-25 18:25:14","[email protected]","16620114 5122"),(10076,"9061","Randall","female","(749) 279-8690","4","Sohbatpur","2000-11-20 07:26:15","[email protected]","16061203 8422"),(10077,"8543","Jerome","male","(108) 183-8613","4","Orosei","2000-09-08 12:02:36","[email protected]","16291214 3993"),(10078,"6300","Maya","female","(293) 906-7499","4","Grayvoron","1999-07-15 19:13:07","[email protected]","16050218 0284"),(10079,"3937","Hedda","female","(399) 429-1800","1","Heredia","2000-10-17 03:52:47","[email protected]","16570517 1386"),(10080,"3804","Gareth","female","(533) 754-0122","1","Svitino","1999-06-09 14:01:37","[email protected]","16510224 1345");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10081,"8293","Margaret","male","(717) 797-2927","3","Jaunpur","1999-05-13 08:18:04","[email protected]","16350301 1813"),(10082,"3633","Marcia","female","(960) 510-2093","4","Bremen","2000-01-04 04:49:22","[email protected]","16570703 0747"),(10083,"6890","Tashya","male","(950) 486-4969","4","Norfolk County","1999-08-19 11:44:54","[email protected]","16930908 7527"),(10084,"7040","Cairo","female","(499) 906-0228","2","West Jordan","2000-04-23 05:11:12","[email protected]","16080821 8051"),(10085,"4391","Lucas","male","(652) 110-5570","1","Gualdo Tadino","1999-07-20 21:53:17","[email protected]","16850626 2115"),(10086,"4975","Gray","male","(412) 254-4585","3","Levin","1999-11-14 05:18:58","[email protected]","16001023 5901"),(10087,"9688","Colin","male","(979) 563-9734","3","Wrexham","2000-06-18 07:19:03","[email protected]","16510420 3285"),(10088,"8706","Anne","female","(171) 639-3734","2","Munger","2000-07-31 09:10:47","[email protected]","16180516 4686"),(10089,"1693","Walter","female","(615) 494-5344","3","Gistel","2001-03-19 04:40:13","[email protected]","16380215 0353"),(10090,"8366","Gavin","male","(208) 936-2086","2","Campofelice di Fitalia","1999-08-12 19:32:28","[email protected]","16571210 6151");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10091,"3700","Ruth","male","(610) 334-0543","4","Noragugume","1999-12-25 16:31:47","[email protected]","16930219 1987"),(10092,"2803","Lawrence","female","(479) 886-5256","3","Ulyanovsk","1999-09-10 08:38:05","[email protected]","16430223 0026"),(10093,"2454","Brody","male","(629) 779-6201","1","Fulda","2001-02-23 23:40:11","[email protected]","16971115 0160"),(10094,"6116","Tyrone","female","(196) 152-8261","3","San Ramón","2000-03-30 20:25:42","[email protected]","16700229 4754"),(10095,"2405","Martin","female","(795) 323-7952","1","Picture Butte","1999-10-01 16:10:01","[email protected]","16120320 3334"),(10096,"8049","Hadassah","female","(194) 835-0732","4","San Luis Río Colorado","2000-08-19 16:55:46","[email protected]","16880411 1782"),(10097,"6488","Kaye","female","(801) 135-5286","2","Córdoba","2001-03-19 03:13:01","[email protected]","16970908 9446"),(10098,"6873","Mara","male","(921) 174-6896","2","Palangka Raya","1999-08-15 03:34:17","[email protected]","16170714 3887"),(10099,"6953","Bell","male","(279) 484-8297","2","Helena","2000-03-27 19:16:34","[email protected]","16040207 5519"),(10100,"2114","Jacob","male","(683) 602-0487","4","Norrköping","1999-10-08 19:15:15","[email protected]","16831017 1650");

INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10101,"6883","Nigel","male","(461) 780-3702","4","Calera de Tango","2000-10-07 15:35:32","[email protected]","16940130 6833"),(10102,"5392","Olympia","male","(900) 815-7381","3","Burnaby","2000-06-11 18:14:46","[email protected]","16550118 0748"),(10103,"2833","Declan","male","(391) 358-1661","3","Vanier","2000-10-11 21:39:53","[email protected]","16700728 1079"),(10104,"2489","Kaitlin","male","(573) 479-5894","1","Kidderminster","1999-05-26 11:45:53","[email protected]","16020625 7438"),(10105,"2964","Jesse","male","(164) 328-0166","4","Fort Worth","2000-05-01 12:33:53","[email protected]","16910527 2984"),(10106,"7855","Callum","male","(824) 484-5043","2","Montgomery","1999-04-26 22:28:17","[email protected]","16910422 8714"),(10107,"3030","Ingrid","male","(178) 169-8661","3","Rotheux-RimiŽre","1999-07-26 04:53:30","[email protected]","16750120 5236"),(10108,"9781","Zachery","female","(179) 907-4611","2","Macchia Valfortore","1999-08-13 05:45:36","[email protected]","16370629 0727"),(10109,"6192","Ivor","female","(250) 795-6806","2","Vijayawada","2000-08-15 17:36:48","[email protected]","16420409 5634"),(10110,"8705","Gary","male","(182) 946-0569","2","San Isidro","2000-09-29 06:48:17","[email protected]","16690602 7955");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10111,"1179","Burke","male","(442) 952-6427","2","Bosa","1999-05-19 08:31:51","[email protected]","16220126 2918"),(10112,"6866","Lester","female","(426) 763-6378","2","Maglie","2000-09-08 16:57:52","[email protected]","16111124 0246"),(10113,"8154","Deirdre","male","(797) 413-5651","4","Châlons-en-Champagne","2000-09-21 04:44:37","[email protected]","16451013 1693"),(10114,"3628","Shoshana","male","(307) 902-7292","3","Fosses-la-Ville","2000-12-18 21:27:15","[email protected]","16340606 0552"),(10115,"5863","Kim","male","(195) 469-6492","2","WagnelŽe","2000-09-27 13:37:03","[email protected]","16050712 8262"),(10116,"8613","Mallory","male","(422) 759-4260","4","Kufstein","1999-07-29 14:22:32","[email protected]","16150306 9914"),(10117,"9415","Theodore","male","(183) 554-0520","2","Kerkrade","2000-05-01 13:51:42","[email protected]","16040519 9837"),(10118,"4225","Halla","female","(349) 611-8705","1","Buguma","1999-05-05 22:11:16","[email protected]","16410923 7547"),(10119,"8149","Grady","female","(347) 442-8164","2","Kamalia","2000-12-09 15:06:13","[email protected]","16570322 4161"),(10120,"5061","Davis","female","(556) 968-5309","1","Fort Wayne","1999-07-13 03:05:41","[email protected]","16990929 4903");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10121,"8478","Jemima","male","(604) 450-3040","4","Oldenzaal","2000-12-02 07:17:53","[email protected]","16001127 8090"),(10122,"8836","Blake","female","(113) 931-5272","4","Hallein","2000-07-17 14:45:24","[email protected]","16220926 4163"),(10123,"3178","Hadassah","male","(996) 748-2518","2","Saint-L�onard","1999-12-08 20:06:13","[email protected]","16620224 6846"),(10124,"3146","Karleigh","female","(287) 601-3115","2","Laarne","1999-05-19 23:15:08","[email protected]","16921003 3172"),(10125,"9819","Uma","female","(841) 615-7397","4","Kalisz","2000-12-28 04:03:43","[email protected]","16171125 9604"),(10126,"6287","Katelyn","female","(622) 431-8036","1","Seevetal","2000-05-05 11:43:04","[email protected]","16020916 3559"),(10127,"3926","Hoyt","male","(681) 471-7497","2","Körfez","2000-09-14 08:20:06","[email protected]","16770711 6252"),(10128,"7487","Demetrius","female","(116) 106-7116","3","Sint-Denijs-Westrem","1999-10-09 12:46:14","[email protected]","16930618 6694"),(10129,"6154","Steven","male","(254) 487-0714","3","Crieff","2000-03-17 07:33:26","[email protected]","16861207 1533"),(10130,"2726","Natalie","female","(992) 959-9294","2","Salem","2001-01-17 14:26:00","[email protected]","16170725 9170");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10131,"3701","Maxwell","female","(427) 237-8847","3","Kitchener","2000-08-30 13:59:56","[email protected]","16730930 6673"),(10132,"4138","Tanek","female","(168) 332-2102","1","Freirina","2000-10-17 18:16:13","[email protected]","16800221 6334"),(10133,"1321","Germane","female","(214) 370-2958","1","Pushchino","1999-07-30 08:05:27","[email protected]","16740404 9608"),(10134,"3180","Keaton","female","(798) 464-5672","3","Ponoka","2001-01-30 10:26:31","[email protected]","16090120 8090"),(10135,"8257","Nina","female","(891) 184-5310","2","Saint-L�onard","1999-09-10 02:29:30","[email protected]","16080813 6758"),(10136,"6561","Elijah","female","(296) 499-1992","3","Chile Chico","2000-07-03 13:41:53","[email protected]","16971225 9614"),(10137,"8751","Clare","female","(545) 130-0984","4","Oelegem","1999-09-11 16:57:36","[email protected]","16040917 1949"),(10138,"7688","Raven","female","(288) 730-0509","2","Rotheux-RimiŽre","2000-04-15 00:05:30","[email protected]","16360223 8929"),(10139,"9128","Rhona","female","(516) 562-1100","4","Valbrevenna","1999-05-02 02:34:52","[email protected]","16740104 4016"),(10140,"4242","Rama","female","(645) 712-9788","1","Milena","2000-06-04 21:53:47","[email protected]","16421027 9107");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10141,"1247","Timon","male","(600) 527-1728","4","Affligem","1999-07-24 07:45:15","[email protected]","16000420 9169"),(10142,"5751","Aretha","female","(370) 274-0276","3","Murree","2000-09-05 05:51:22","[email protected]","16970426 9555"),(10143,"3111","Serina","female","(432) 266-0904","2","Laarne","1999-08-18 03:40:13","[email protected]","16261208 6005"),(10144,"4597","Grady","female","(375) 495-4980","4","Millesimo","2000-09-13 08:23:58","[email protected]","16660211 5641"),(10145,"9265","Camille","female","(479) 431-5126","1","Eyemouth","2000-03-22 05:28:33","[email protected]","16030614 4114"),(10146,"1117","Caleb","female","(126) 107-2135","3","Devon","1999-09-05 10:50:25","[email protected]","16700104 1065"),(10147,"8842","Felix","female","(193) 889-1551","2","Lambersart","1999-04-19 09:17:26","[email protected]","16860823 0275"),(10148,"3224","MacKensie","male","(106) 217-9580","3","Livorno","2001-03-19 19:13:45","[email protected]","16740105 3355"),(10149,"9684","Samantha","male","(847) 234-5403","1","Pabianice","1999-08-21 12:26:32","[email protected]","16630221 9263"),(10150,"6975","Josiah","female","(885) 447-1212","1","Saint-Nicolas","2000-12-26 15:01:34","[email protected]","16761028 3934");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10151,"1832","Geoffrey","female","(439) 743-4864","3","Liernu","2000-02-14 22:39:26","[email protected]","16990601 3413"),(10152,"8609","Connor","male","(334) 654-6333","1","Anjou","2001-03-02 13:02:31","[email protected]","16140507 0739"),(10153,"9486","Harriet","female","(631) 573-3038","4","Osan","2000-01-28 12:11:51","[email protected]","16850716 0144"),(10154,"5195","Nash","male","(236) 758-1646","3","Hafizabad","1999-08-04 00:57:39","[email protected]","16130227 8435"),(10155,"9839","Kadeem","male","(687) 497-7652","3","Bergama","2000-03-19 16:29:28","[email protected]","16240907 8082"),(10156,"3952","Astra","male","(505) 316-9438","4","Ponte nelle Alpi","2000-08-04 15:45:04","[email protected]","16871019 1928"),(10157,"2930","Blaze","male","(925) 467-5670","4","Ciudad Real","1999-12-04 10:08:49","[email protected]","16201001 5382"),(10158,"5980","Stuart","male","(854) 748-6356","1","Miranda","2000-03-10 02:12:06","[email protected]","16690604 9900"),(10159,"5381","Hilda","male","(323) 353-3580","4","Hohenems","1999-11-01 14:14:12","[email protected]","16630602 6870"),(10160,"6140","Priscilla","female","(362) 846-7280","4","Rves","2000-12-05 19:10:19","[email protected]","16910221 7099");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10161,"4712","Yoko","male","(647) 386-5023","2","Fort Wayne","2000-06-28 10:31:33","[email protected]","16541209 6827"),(10162,"5828","Cedric","male","(613) 419-2445","4","Bhagalpur","2000-03-10 22:54:49","[email protected]","16790606 5367"),(10163,"9991","Chase","female","(485) 574-9810","2","Henis","1999-07-06 13:42:03","[email protected]","16350423 3457"),(10164,"5420","Perry","male","(921) 560-4279","4","Redwater","2000-12-15 21:18:20","[email protected]","16000724 8396"),(10165,"9794","Thor","male","(451) 187-3307","4","Sachs Harbour","2000-10-03 14:34:23","[email protected]","16230609 4323"),(10166,"5426","Denton","male","(427) 843-5803","2","Grand-Reng","2000-10-29 09:20:30","[email protected]","16690926 1080"),(10167,"8696","Devin","male","(487) 835-9247","1","Herne","1999-09-18 04:18:48","[email protected]","16640717 1153"),(10168,"9496","Carter","male","(808) 439-2136","2","Metro","2000-07-21 19:33:21","[email protected]","16640203 3531"),(10169,"3455","Bruce","male","(513) 181-4093","1","San Massimo","1999-04-26 02:21:40","[email protected]","16410920 9033"),(10170,"3205","Naida","female","(383) 800-5033","3","Kohat","2000-12-26 02:59:15","[email protected]","16730727 7355");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10171,"4957","Mollie","female","(125) 442-2279","2","Jalandhar (Jullundur)","2000-01-28 14:03:05","[email protected]","16590522 4316"),(10172,"8783","Cain","female","(962) 871-6184","3","Stralsund","1999-07-06 05:33:32","[email protected]","16090420 8113"),(10173,"3873","Belle","female","(883) 631-3315","1","Herne","2000-06-07 12:06:39","[email protected]","16160126 6255"),(10174,"9642","Dakota","male","(435) 144-4385","1","Bersillies-l'Abbaye","2000-08-04 23:30:31","[email protected]","16181213 7394"),(10175,"5604","Isabelle","female","(798) 295-2525","2","Ñuñoa","2001-03-28 14:53:09","[email protected]","16950712 5681"),(10176,"3324","Imelda","male","(922) 752-6824","3","Thame","1999-09-23 09:17:07","[email protected]","16111023 1733"),(10177,"2258","Colette","female","(379) 546-9103","3","Kooigem","2000-06-22 22:26:45","[email protected]","16800117 7867"),(10178,"8591","Cedric","male","(185) 577-8787","1","Valverde","2000-02-10 18:12:17","[email protected]","16150419 2608"),(10179,"3349","Travis","female","(662) 629-2194","3","Murree","2000-11-27 15:07:37","[email protected]","16000628 1398"),(10180,"5244","Neville","male","(280) 761-3681","1","Caplan","1999-10-28 08:47:39","[email protected]","16560508 9290");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10181,"8802","Callie","male","(379) 360-3543","4","Mandi Bahauddin","2000-04-04 02:03:23","[email protected]","16171119 6137"),(10182,"9953","Oliver","male","(296) 182-0235","1","Sankt Ingbert","1999-10-16 08:25:19","[email protected]","16760621 6377"),(10183,"5732","Hyatt","female","(209) 535-3579","2","Cap-de-la-Madeleine","2000-10-17 18:17:05","[email protected]","16090125 1025"),(10184,"6533","Megan","male","(899) 221-5186","4","Queanbeyan","1999-11-27 02:50:44","[email protected]","16181215 3474"),(10185,"2276","Ciaran","male","(406) 644-4582","2","Canmore","2001-02-12 05:28:03","[email protected]","16670414 5637"),(10186,"5350","Candice","male","(523) 156-3903","1","Jhansi","2001-02-09 09:22:13","[email protected]","16570527 6086"),(10187,"4773","Devin","male","(320) 715-7774","3","Gwangju","2000-04-12 06:31:58","[email protected]","16081106 8964"),(10188,"4350","Ria","female","(807) 335-8864","4","Ulhasnagar","2000-02-26 20:07:15","[email protected]","16511130 5669"),(10189,"9364","Tobias","female","(941) 326-8820","1","La Thuile","1999-09-21 18:37:41","[email protected]","16820127 9281"),(10190,"2934","Porter","male","(935) 949-3505","3","Meix-Devant-Virton","2000-10-15 16:13:07","[email protected]","16161227 6962");
INSERT INTO `student` (`StudentNo`,`LoginPwd`,`Name`,`Gender`,`Phone`,`GradeId`,`Address`,`Birth`,`Email`,`IDCard`) VALUES (10191,"8993","Omar","female","(429) 329-5624","1","Wibrin","1999-12-17 02:18:05","[email protected]","16840726 1141"),(10192,"8332","Dexter","female","(637) 852-6275","1","Habay","2000-09-09 11:22:44","[email protected]","16700204 1429"),(10193,"9855","Violet","female","(931) 460-1253","1","Castelbaldo","1999-09-16 15:14:37","[email protected]","16910507 6039"),(10194,"3713","Emerson","male","(102) 866-2086","2","Onoz","2000-12-11 02:47:46","[email protected]","16501113 7048"),(10195,"3105","Igor","male","(258) 849-7269","3","Ponoka","2001-01-07 23:27:48","[email protected]","16610802 5906"),(10196,"9145","Sonya","male","(956) 242-9243","4","Cartagena","2000-09-05 13:17:34","[email protected]","16930107 4937"),(10197,"5956","Alea","male","(966) 833-3518","1","Padang Sidempuan","1999-07-08 19:22:52","[email protected]","16730713 7609"),(10198,"1244","Darius","female","(764) 115-2264","3","Asnières-sur-Seine","2000-09-13 19:19:24","[email protected]","16490901 9459"),(10199,"5649","Lacota","male","(587) 191-2371","1","Neusiedl am See","1999-08-26 03:32:47","[email protected]","16240904 3367"),(10200,"6812","Austin","female","(864) 672-4438","4","Macchia Valfortore","2000-04-27 09:26:02","[email protected]","16140420 5716");

Sequel Pro中展示:

在這裏插入圖片描述

4 創建學科表並插入數據

(共50條數據!)

/*創建科目表*/
DROP TABLE `subject`;

CREATE TABLE `subject` (
  `SubjectNo` mediumint NOT NULL,
  `SubjectName` varchar(255) default NULL,
  `ClassHour` varchar(255) default NULL,
  PRIMARY KEY (`SubjectNo`)
)ENGINE=INNODB DEFAULT CHARSET=utf8;

-- 科目數據:共50條
INSERT INTO `subject` (`SubjectNo`,`SubjectName`,`ClassHour`) VALUES (1001,"Research and Development","37"),(1009,"Finances","41"),(1017,"Accounting","11"),(1025,"Customer Relations","41"),(1033,"Public Relations","19"),(1041,"Customer Service","31"),(1049,"Accounting","29"),(1057,"Customer Relations","47"),(1065,"Customer Service","23"),(1073,"Public Relations","17");
INSERT INTO `subject` (`SubjectNo`,`SubjectName`,`ClassHour`) VALUES (1081,"Research and Development","13"),(1089,"Quality Assurance","37"),(1097,"Legal Department","17"),(1105,"Legal Department","29"),(1113,"Asset Management","11"),(1121,"Research and Development","59"),(1129,"Accounting","31"),(1137,"Human Resources","67"),(1145,"Customer Service","31"),(1153,"Finances","43");
INSERT INTO `subject` (`SubjectNo`,`SubjectName`,`ClassHour`) VALUES (1161,"Sales and Marketing","53"),(1169,"Public Relations","19"),(1177,"Asset Management","23"),(1185,"Legal Department","31"),(1193,"Public Relations","43"),(1201,"Asset Management","29"),(1209,"Human Resources","29"),(1217,"Finances","67"),(1225,"Research and Development","59"),(1233,"Human Resources","53");
INSERT INTO `subject` (`SubjectNo`,`SubjectName`,`ClassHour`) VALUES (1241,"Media Relations","41"),(1249,"Sales and Marketing","11"),(1257,"Legal Department","41"),(1265,"Advertising","23"),(1273,"Payroll","67"),(1281,"Research and Development","61"),(1289,"Customer Relations","61"),(1297,"Customer Relations","13"),(1305,"Customer Relations","17"),(1313,"Accounting","13");
INSERT INTO `subject` (`SubjectNo`,`SubjectName`,`ClassHour`) VALUES (1321,"Media Relations","19"),(1329,"Human Resources","47"),(1337,"Advertising","53"),(1345,"Payroll","11"),(1353,"Legal Department","29"),(1361,"Public Relations","17"),(1369,"Advertising","23"),(1377,"Accounting","59"),(1385,"Payroll","23"),(1393,"Customer Relations","23");

Sequel Pro中展示:

在這裏插入圖片描述

5 創建成績表並插入數據

(共50條數據!)

/*創建成績表:*/
DROP TABLE IF EXISTS `result`;

CREATE TABLE `result` (
  `StudentNo` mediumint default NULL COMMENT '學生學號',
  `SubjectNo` mediumint default NULL COMMENT '科目學號',
  `ExamDate` varchar(255) COMMENT '考試日期',
  `StudentResult` mediumint default NULL COMMENT'考試結果',
  KEY `SubjectNo` (`SubjectNo`),
  KEY `StudentNo` (`StudentNo`)
)ENGINE=INNODB DEFAULT CHARSET=utf8;

INSERT INTO `result` (`StudentNo`,`SubjectNo`,`ExamDate`,`StudentResult`) VALUES (10195,1001,"2020-11-15 23:13:47",78),(10199,1009,"2020-12-30 14:23:38",59),(10183,1017,"2019-07-07 11:29:23",60),(10048,1025,"2020-09-21 14:46:17",56),(10022,1033,"2020-05-25 05:19:54",48),(10101,1041,"2019-04-26 05:31:46",43),(10048,1049,"2019-10-24 05:20:45",51),(10120,1057,"2020-04-29 10:48:27",95),(10082,1065,"2020-04-02 23:06:25",46),(10194,1073,"2020-12-18 12:27:09",64);
INSERT INTO `result` (`StudentNo`,`SubjectNo`,`ExamDate`,`StudentResult`) VALUES (10068,1081,"2020-07-07 03:18:56",71),(10105,1089,"2020-10-31 16:01:46",55),(10003,1097,"2019-10-30 21:18:19",40),(10113,1105,"2019-08-17 19:39:18",75),(10059,1113,"2019-07-11 20:06:51",88),(10166,1121,"2020-10-11 18:51:54",72),(10165,1129,"2020-07-03 05:53:26",81),(10151,1137,"2019-10-13 04:18:52",97),(10169,1145,"2020-01-20 17:48:30",76),(10019,1153,"2020-02-05 12:31:08",45);
INSERT INTO `result` (`StudentNo`,`SubjectNo`,`ExamDate`,`StudentResult`) VALUES (10095,1161,"2019-09-17 04:12:20",92),(10088,1169,"2019-10-26 20:46:53",53),(10133,1177,"2021-02-02 16:14:46",48),(10156,1185,"2020-04-26 00:16:59",78),(10037,1193,"2020-11-27 17:03:31",81),(10038,1201,"2021-01-19 23:23:07",42),(10181,1209,"2021-03-20 04:50:49",82),(10032,1217,"2020-06-08 13:30:29",92),(10107,1225,"2020-02-27 17:18:31",92),(10015,1233,"2019-11-18 18:28:48",62);
INSERT INTO `result` (`StudentNo`,`SubjectNo`,`ExamDate`,`StudentResult`) VALUES (10051,1241,"2019-06-27 16:50:18",74),(10189,1249,"2019-08-28 08:15:00",56),(10005,1257,"2020-05-28 10:41:59",84),(10073,1265,"2020-07-28 12:51:52",56),(10195,1273,"2019-07-02 03:46:34",54),(10193,1281,"2020-11-12 15:11:40",48),(10120,1289,"2020-03-07 16:50:23",58),(10134,1297,"2019-12-27 00:43:10",83),(10140,1305,"2020-10-03 15:34:32",53),(10150,1313,"2019-10-21 17:36:46",57);
INSERT INTO `result` (`StudentNo`,`SubjectNo`,`ExamDate`,`StudentResult`) VALUES (10126,1321,"2020-06-06 02:26:16",89),(10027,1329,"2021-01-03 19:57:37",70),(10117,1337,"2020-07-06 19:51:15",96),(10001,1345,"2019-05-05 00:42:37",78),(10049,1353,"2021-04-01 16:53:35",51),(10085,1361,"2021-01-12 09:15:42",68),(10189,1369,"2021-02-26 20:31:07",67),(10027,1377,"2020-06-30 12:56:44",49),(10084,1385,"2020-04-22 17:24:12",66),(10037,1393,"2019-11-18 17:10:48",85);

Sequel Pro中展示:

在這裏插入圖片描述

數據生成網站(開源):

http://www.generatedata.com/?lang=zh#t1

說明: 網站生成數據部分均是英文,且所生成數據也不支持中文,信息的相關格式可以按照自己需求進行調整,若在生成步驟中有問題,可以在評論區留言,盡我所能幫忙解決!

寫在最後

愛在左,同情在右,走在生命的兩旁,隨時撒種,隨時開花,將這一徑長途,點綴得香花瀰漫,使穿枝拂葉的行人,踏着荊棘,不覺得痛苦,有淚可落,卻不是悲涼。——冰心

To Demut and Dottie!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章