- 浏览: 58756 次
- 性别:
- 来自: 济南
最新评论
文章列表
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Too ...
- 2017-02-27 22:40
- 浏览 310
- 评论(0)
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Too ...
- 2017-02-27 22:39
- 浏览 373
- 评论(0)
package cn.bdqn.studentInfo.entity;
import java.util.HashSet;
import java.util.Set;
/**
* 老师的实体类
* @author Administrator
*
*/
public class Teacher {
private Integer id;
private String name;
private Set<Student> students =new HashSet<Student>();
public Integer getId() {
return ...
- 2017-02-27 22:38
- 浏览 247
- 评论(0)
package cn.bdqn.studentInfo.entity;
import java.util.HashSet;
import java.util.Set;
/**
* 学生表的实体类
* @author Administrator
*
*/
public class Student {
private Integer id;
private String name;
private Set<Teacher>teachers=new HashSet<Teacher>();
public Integer getId() {
return i ...
- 2017-02-27 22:36
- 浏览 259
- 评论(0)
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<!-- Generated by MyEclipse Hibernate Tools. ...
- 2017-02-27 22:34
- 浏览 226
- 评论(0)
package org.hibernate_one;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.util.ConfigHelper;
import org.hibernate_one.entity.Dept;
import org.junit.Test;
/*
* 单元测试
* 记得加@Test导入包
* ...
- 2017-02-17 23:00
- 浏览 239
- 评论(0)
package org.hibernate_one.entity;
import java.io.Serializable;
/*
* 部门实体类
* 符合javabean规范
* 1.公共类
* 2.具有公共的无参的构造方法
* 3.私有属性
* 4.getter setter方法
* 5.实现序列化接口Serializable java.io
*/
public class Dept implements Serializable {
//部门编号
private Integer deptNo;
//部门名称
private String dName; ...
- 2017-02-17 22:59
- 浏览 168
- 评论(0)
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping
package="org.hibernate_one.entity">
<!-- 对应的类和数 ...
- 2017-02-17 22:57
- 浏览 259
- 评论(0)
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="foo">
<!--数据库连接配置4项 -->
<! ...
- 2017-02-17 22:56
- 浏览 215
- 评论(0)
1、sql server驱动
com.microsoft.sqlserver.jdbc.SQLServerDriver
//sql验证
jdbc:sqlserver://127.0.0.1:1433;databasename=mydb;User=sa;Password=171268
2、oracle驱动
oracle.jdbc.driver.OracleDriver
jdbc:oracle:thin:@127.0.0.1:1521:orcl
3、mysql驱动
com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306/mydb?us ...
- 2017-02-17 22:52
- 浏览 175
- 评论(0)
1、sql server驱动
com.microsoft.sqlserver.jdbc.SQLServerDriver
//sql验证
jdbc:sqlserver://127.0.0.1:1433;databasename=mydb;User=sa;Password=171268
2、oracle驱动
oracle.jdbc.driver.OracleDriver
jdbc:oracle:thin:@127.0.0.1:1521:orcl
3、mysql驱动
com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306/mydb?us ...
- 2017-02-17 22:52
- 浏览 152
- 评论(0)
/*
=========================================================
PL/SQL编程
=========================================================
*/
--先把scott里面的表弄到test表空间里面来
CREATE TABLE EMP AS
SELECT * FROM SCOTT.EMP;
CREATE TABLE DEPT AS
SELECT * FROM SCOTT.DEPT;
/*
上机1 ...
- 2017-02-17 22:51
- 浏览 324
- 评论(0)
/*
=============================================================================
pl/sql编程
=============================================================================
*/
--pl/sql块的结构
declare
--声明部门:在此声明pl/sql用到的变量、类型以及游 ...
- 2017-02-17 22:49
- 浏览 177
- 评论(0)
/*
===================================================================
===================================================================
*/
/*
tp_orders表空间,大小10M,文件大小可自动增长,允许文件扩展,最大限度为无限制
创建A_oe用户的默认表空间为tp_orders
密码 bdqn
授予connect,resource权限党文a_hr用户的employee
*/
--创建表空间和用户,并授予访问数据库的权限
create tabl ...
- 2017-02-14 21:35
- 浏览 202
- 评论(0)
/*
Oracle数据库的应用
*/
--创建一个自动增长的表空间worktbs
create tablespace worktbs
datafile 'E:\E盘\worktbs01.dbf'
size 10M autoextend on;
--删除表空间
--drop tablespace worktbs;
--在表空间里面创建一个新用户
create user martin --用户名
identifie ...
- 2017-02-14 21:32
- 浏览 204
- 评论(0)