IBM

1.采用DB2创建以下结构数据表:
(1)TableName:MONTH_TOTAL

FIELD NAME  TYPE 
ID   BIGINT  自动递增
YEAR   BIGINT
MONTH  BIGINT
TOTAL  BIGINT
EMPLOYEE_ID BIGINT

(2)TableName:EMPLOYEE_INFO
ID  BIGINT   自动递增
NAME  VARCHAR

2.从指定的名为monthTotalData.xml的XML文件中读取数据插入到MONTH_TOTAL,EMPLOYEE_INFO 表中。
XML文件数据结构:
<data>
<monthTotalData>
 <year>1996</year>
 <month>1</month>
 <total>200</total>
 <employeeId>2</employeeId>
</monthTotalData>

<monthTotalData>
 <year>1996</year>
 <month>2</month>
 <total>300</total>
 <employeeId>2</employeeId>
</monthTotalData>

<monthTotalData>
 <year>1996</year>
 <month>5</month>
 <total>500</total>
 <employeeId>3</employeeId>
</monthTotalData>

<monthTotalData>
 <year>1997</year>
 <month>8</month>
 <total>500</total>
 <employeeId>3</employeeId>
</monthTotalData>

<monthTotalData>
 <year>1997</year>
 <month>9</month>
 <total>600</total>
 <employeeId>2</employeeId>
</monthTotalData>

<monthTotalData>
 <year>1997</year>
 <month>10</month>
 <total>600</total>
 <employeeId>2</employeeId>
</monthTotalData>

<monthTotalData>
 <year>2009</year>
 <month>3</month>
 <total>600</total>
 <employeeId>1</employeeId>
</monthTotalData>

<monthTotalData>
 <year>2010</year>
 <month>5</month>
 <total>700</total>
 <employeeId>1</employeeId>
</monthTotalData>

<monthTotalData>
 <year>2009</year>
 <month>9</month>
 <total>500</total>
 <employeeId>2</employeeId>
</monthTotalData>
</data>

EmployeeData.xml
<data>
 <employee>
  <id>1</id>
  <name>张三</name>
 </employee>

 <employee>
  <id>2</id>
  <name>李四</name>
 </employee>

 <employee>
  <id>3</id>
  <name>王五</name>
 </employee>
</data>

3.采用JAVA编写WEB应用程序连接DB2数据库从MONTH_TOTAL表中查询数据,统计每一年各个季度的total和,并且采用以下格式显示在JSP页面上:
员工名称 年份(year) 第一季度(total) 第二季度(total) 第三季度(total) 第四季度(total)
张三  1996  500   600   700   800
李四  1997  800   300   600   900
....

 

 

4.开发环境

WEB服务器为TOMCAT6.0

开发环境Eclipse 3.5

数据库DB2



 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值