<em>Mac</em>Book项目 2009年学校开始实施<em>Mac</em>Book项目,所有师生配备一本<em>Mac</em>Book,并同步更新了校园无线网络。学校每周进行电脑技术更新,每月发送技术支持资料,极大改变了教学及学习方式。因此2011
2021-06-01 09:32:01
DROP TABLE IF EXISTS `tb_dept`; CREATE TABLE `tb_dept` ( `deptno` tinyint(2) UNSIGNED NOT NULL COMMENT '部門編號', `dname` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部門名稱', `loc` varchar(13) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部門地址', PRIMARY KEY (`deptno`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; INSERT INTO `tb_dept` VALUES (10, 'ACCOUNTING', 'NEW YORK'); INSERT INTO `tb_dept` VALUES (20, 'RESEARCH', 'DALLAS'); INSERT INTO `tb_dept` VALUES (30, 'SALES', 'CHICAGO'); INSERT INTO `tb_dept` VALUES (40, 'OPERATIONS', 'BOSTON'); ------------------------------------------------------------------- DROP TABLE IF EXISTS `tb_emp`; CREATE TABLE `tb_emp` ( `empno` int(4) UNSIGNED NOT NULL, `ename` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `job` varchar(9) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `mgr` int(4) UNSIGNED NULL DEFAULT NULL, `hiredate` date NULL DEFAULT NULL, `sal` decimal(7, 2) NULL DEFAULT NULL, `comm` decimal(7, 2) NULL DEFAULT NULL, `deptno` tinyint(2) UNSIGNED NULL DEFAULT NULL, PRIMARY KEY (`empno`) USING BTREE, INDEX `deptno`(`deptno`) USING BTREE, CONSTRAINT `tb_emp_ibfk_1` FOREIGN KEY (`deptno`) REFERENCES `tb_dept` (`deptno`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; INSERT INTO `tb_emp` VALUES (7369, 'SMITH', 'CLERK', 7902, '1980-12-17', 800.00, NULL, 20); INSERT INTO `tb_emp` VALUES (7499, 'ALLEN', 'SALESMAN', 7698, '1981-02-20', 1600.00, 300.00, 30); INSERT INTO `tb_emp` VALUES (7521, 'WARD', 'SALESMAN', 7698, '1981-02-22', 1250.00, 500.00, 30); INSERT INTO `tb_emp` VALUES (7566, 'JONES', 'MANAGER', 7839, '1981-04-02', 2975.00, NULL, 20); INSERT INTO `tb_emp` VALUES (7654, 'MARTIN', 'SALESMAN', 7698, '1981-09-28', 1250.00, 1400.00, 30); INSERT INTO `tb_emp` VALUES (7698, 'BLAKE', 'MANAGER', 7839, '1981-05-01', 2850.00, NULL, 30); INSERT INTO `tb_emp` VALUES (7782, 'CLARK', 'MANAGER', 7839, '1981-06-09', 2450.00, NULL, 10); INSERT INTO `tb_emp` VALUES (7788, 'SCOTT', 'ANALYST', 7566, '1987-04-19', 3000.00, NULL, 20); INSERT INTO `tb_emp` VALUES (7839, 'KING', 'PRESIDENT', NULL, '1981-11-17', 5000.00, NULL, 10); INSERT INTO `tb_emp` VALUES (7844, 'TURNER', 'SALESMAN', 7698, '1981-09-08', 1500.00, 0.00, 30); INSERT INTO `tb_emp` VALUES (7876, 'ADAMS', 'CLERK', 7788, '1987-05-23', 1100.00, NULL, 20); INSERT INTO `tb_emp` VALUES (7900, 'JAMES', 'CLERK', 7698, '1981-12-03', 950.00, NULL, 30); INSERT INTO `tb_emp` VALUES (7902, 'FORD', 'ANALYST', 7566, '1981-12-03', 3000.00, NULL, 20); INSERT INTO `tb_emp` VALUES (7934, 'MILLER', 'CLERK', 7782, '1982-01-23', 1300.00, NULL, 10);
/** * 部門 * @author HC * */ public class Dept { /** * 部門編號 */ private Integer deptno; /** * 部門名稱 */ private String dname; /** * 部門地址 */ private String loc; public Dept() { } public Dept(Integer deptno, String dname, String loc) { this.deptno = deptno; this.dname = dname; this.loc = loc; } public Integer getDeptno() { return deptno; } public void setDeptno(Integer deptno) { this.deptno = deptno; } public String getDname() { return dname; } public void setDname(String dname) { this.dname = dname; } public String getLoc() { return loc; } public void setLoc(String loc) { this.loc = loc; } @Override public String toString() { return "Dept{" + "deptno=" + deptno + ", dname='" + dname + ''' + ", loc='" + loc + ''' + '}'; } }
/** * 員工 * @author HC */ public class Emp { /** * 員工編號 */ private Integer empno; /** * 員工姓名 */ private String ename; /** * 工作 */ private String job; /** * 上級領導編號 */ private Integer mgr; /** * 受僱日期 */ private LocalDate hiredate; /** * 薪資 */ private Double sal; /** * 獎金 */ private Double comm; /** * 部門編號 */ private Integer deptno; public Emp() { } public Emp(Integer empno, String ename, String job, Integer mgr, LocalDate hiredate, Double sal, Double comm, Integer deptno) { this.empno = empno; this.ename = ename; this.job = job; this.mgr = mgr; this.hiredate = hiredate; this.sal = sal; this.comm = comm; this.deptno = deptno; } public Integer getEmpno() { return empno; } public void setEmpno(Integer empno) { this.empno = empno; } public String getEname() { return ename; } public void setEname(String ename) { this.ename = ename; } public String getJob() { return job; } public void setJob(String job) { this.job = job; } public Integer getMgr() { return mgr; } public void setMgr(Integer mgr) { this.mgr = mgr; } public LocalDate getHiredate() { return hiredate; } public void setHiredate(LocalDate hiredate) { this.hiredate = hiredate; } public Double getSal() { return sal; } public void setSal(Double sal) { this.sal = sal; } public Double getComm() { return comm; } public void setComm(Double comm) { this.comm = comm; } public Integer getDeptno() { return deptno; } public void setDeptno(Integer deptno) { this.deptno = deptno; } @Override public String toString() { return "Emp{" + "empno=" + empno + ", ename='" + ename + ''' + ", job='" + job + ''' + ", mgr=" + mgr + ", hiredate=" + hiredate + ", sal=" + sal + ", comm=" + comm + ", deptno=" + deptno + '}'; } }
public class DB { private static List<Emp> emps = new ArrayList<>(); private static List<Dept> depts = new ArrayList<>(); static { depts.add(new Dept(10,"ACCOUNTING","NEWYORK")); depts.add(new Dept(20,"RESEARCH","DALLAS")); depts.add(new Dept(30,"SALES","CHICAGO")); depts.add(new Dept(40,"OPERATIONS","BOSTON")); emps.add(new Emp(7369, "SMITH", "CLERK", 7902,LocalDate.of(1980, 12, 17), 800D, null, 20)); emps.add(new Emp(7499, "ALLEN", "SALESMAN", 7698, LocalDate.of(1981, 2, 20), 1600D, 300D, 30)); emps.add(new Emp(7521, "WARD", "SALESMAN", 7698, LocalDate.of(1981, 2, 22), 1250D, 500D, 30)); emps.add(new Emp(7566, "JONES", "MANAGER", 7893, LocalDate.of(1981, 4, 2), 2975D, null, 20)); emps.add(new Emp(7654, "MARTIN", "SALESMAN", 7698, LocalDate.of(1981, 9, 28), 1250D, 1400D, 30)); emps.add(new Emp(7698, "BLAKE", "MANAGER", 7839, LocalDate.of(1981, 5, 1), 2850D, null, 30)); emps.add(new Emp(7782, "CLARK", "MANAGER", 7839, LocalDate.of(1981, 6, 9), 2450D, 600D, 10)); emps.add(new Emp(7788, "SCOTT", "ANALYST", 7566, LocalDate.of(1987, 4, 19), 3000D, null, 20)); emps.add(new Emp(7839, "KING", "PRESIDENT", null, LocalDate.of(1981, 11, 17), 5000D, null, 10)); emps.add(new Emp(7844, "TURNER", "SALESMAN", 7698, LocalDate.of(1981, 9, 8), 1500D, null, 30)); emps.add(new Emp(7876, "ADAMS", "CLERK", 7788, LocalDate.of(1987, 5, 23), 1100D, 350D, 20)); emps.add(new Emp(7900, "JAMES", "CLERK", 7698, LocalDate.of(1981, 12, 3), 950D, null, 30)); emps.add(new Emp(7902, "FORD", "ANALYST", 7566, LocalDate.of(1981, 12, 3), 3000D, null, 20)); emps.add(new Emp(7934, "MILLER", "CLERK", 7782, LocalDate.of(1982, 1, 23), 1300D, 400D, 10)); } public static List<Emp> getEmps() { return emps; } public static List<Dept> getDepts() { return depts; } }
到此這篇關於Scott 資料 對映 MySQL程式碼分享的文章就介紹到這了,更多相關Scott 資料 對映 MySQL內容請搜尋it145.com以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援it145.com!
相關文章
<em>Mac</em>Book项目 2009年学校开始实施<em>Mac</em>Book项目,所有师生配备一本<em>Mac</em>Book,并同步更新了校园无线网络。学校每周进行电脑技术更新,每月发送技术支持资料,极大改变了教学及学习方式。因此2011
2021-06-01 09:32:01
综合看Anker超能充系列的性价比很高,并且与不仅和iPhone12/苹果<em>Mac</em>Book很配,而且适合多设备充电需求的日常使用或差旅场景,不管是安卓还是Switch同样也能用得上它,希望这次分享能给准备购入充电器的小伙伴们有所
2021-06-01 09:31:42
除了L4WUDU与吴亦凡已经多次共事,成为了明面上的厂牌成员,吴亦凡还曾带领20XXCLUB全队参加2020年的一场音乐节,这也是20XXCLUB首次全员合照,王嗣尧Turbo、陈彦希Regi、<em>Mac</em> Ova Seas、林渝植等人全部出场。然而让
2021-06-01 09:31:34
目前应用IPFS的机构:1 谷歌<em>浏览器</em>支持IPFS分布式协议 2 万维网 (历史档案博物馆)数据库 3 火狐<em>浏览器</em>支持 IPFS分布式协议 4 EOS 等数字货币数据存储 5 美国国会图书馆,历史资料永久保存在 IPFS 6 加
2021-06-01 09:31:24
开拓者的车机是兼容苹果和<em>安卓</em>,虽然我不怎么用,但确实兼顾了我家人的很多需求:副驾的门板还配有解锁开关,有的时候老婆开车,下车的时候偶尔会忘记解锁,我在副驾驶可以自己开门:第二排设计很好,不仅配置了一个很大的
2021-06-01 09:30:48
不仅是<em>安卓</em>手机,苹果手机的降价力度也是前所未有了,iPhone12也“跳水价”了,发布价是6799元,如今已经跌至5308元,降价幅度超过1400元,最新定价确认了。iPhone12是苹果首款5G手机,同时也是全球首款5nm芯片的智能机,它
2021-06-01 09:30:45