关于ORA-00942: 表或视图不存在

最近在研究如何将jbpm与SSH整合起来用,虽然对jbpm也是刚开始研究,找了个现有的SSH+jbpm的项目来看,原有的项目是使用mssql的,我在oracle中将表同样建立起来了,修改了hibernate的配置,但运行起来就出问题了,不知有没高人能解决或给点建议,下面我贴出我的配置及数据库信息,最后放上原项目。

 

首先是错误信息:

2008-9-18 15:17:00 org.apache.catalina.startup.Catalina start
信息: Server startup in 9898 ms
Hibernate: select tbuser0_.user_id as user1_36_, tbuser0_.user_name as user2_36_, tbuser0_.user_password as user3_36_, tbuser0_.user_type as user4_36_ from tb_user tbuser0_ where tbuser0_.user_name='boss' and tbuser0_.user_password='123'
Hibernate: select tbbaoxiaos0_.user_id as user2_1_, tbbaoxiaos0_.baoxiao_id as baoxiao1_1_, tbbaoxiaos0_.baoxiao_id as baoxiao1_34_0_, tbbaoxiaos0_.user_id as user2_34_0_, tbbaoxiaos0_.baoxiao_title as baoxiao3_34_0_, tbbaoxiaos0_.baoxiao_memo as baoxiao4_34_0_, tbbaoxiaos0_.baoxiao_date as baoxiao5_34_0_, tbbaoxiaos0_.baoxiao_flag as baoxiao6_34_0_ from tb_baoxiao tbbaoxiaos0_ where tbbaoxiaos0_.user_id=?
Hibernate: select tbapproves0_.user_id as user2_1_, tbapproves0_.approve_id as approve1_1_, tbapproves0_.approve_id as approve1_33_0_, tbapproves0_.user_id as user2_33_0_, tbapproves0_.baoxiao_id as baoxiao3_33_0_, tbapproves0_.approve_result as approve4_33_0_, tbapproves0_.approve_memo as approve5_33_0_, tbapproves0_.approve_date as approve6_33_0_ from tb_approve tbapproves0_ where tbapproves0_.user_id=?
Hibernate: select taskinstan0_.ID_ as ID1_27_, taskinstan0_.NAME_ as NAME3_27_, taskinstan0_.DESCRIPTION_ as DESCRIPT4_27_, taskinstan0_.ACTORID_ as ACTORID5_27_, taskinstan0_.CREATE_ as CREATE6_27_, taskinstan0_.START_ as START7_27_, taskinstan0_.END_ as END8_27_, taskinstan0_.DUEDATE_ as DUEDATE9_27_, taskinstan0_.PRIORITY_ as PRIORITY10_27_, taskinstan0_.ISCANCELLED_ as ISCANCE11_27_, taskinstan0_.ISSUSPENDED_ as ISSUSPE12_27_, taskinstan0_.ISOPEN_ as ISOPEN13_27_, taskinstan0_.ISSIGNALLING_ as ISSIGNA14_27_, taskinstan0_.ISBLOCKING_ as ISBLOCKING15_27_, taskinstan0_.TASK_ as TASK16_27_, taskinstan0_.TOKEN_ as TOKEN17_27_, taskinstan0_.SWIMLANINSTANCE_ as SWIMLAN18_27_, taskinstan0_.TASKMGMTINSTANCE_ as TASKMGM19_27_ from JBPM_TASKINSTANCE taskinstan0_ where taskinstan0_.ACTORID_=? and taskinstan0_.ISSUSPENDED_<>1 and taskinstan0_.ISOPEN_=1
Hibernate: select distinct taskinstan2_.ID_ as ID1_27_, taskinstan2_.NAME_ as NAME3_27_, taskinstan2_.DESCRIPTION_ as DESCRIPT4_27_, taskinstan2_.ACTORID_ as ACTORID5_27_, taskinstan2_.CREATE_ as CREATE6_27_, taskinstan2_.START_ as START7_27_, taskinstan2_.END_ as END8_27_, taskinstan2_.DUEDATE_ as DUEDATE9_27_, taskinstan2_.PRIORITY_ as PRIORITY10_27_, taskinstan2_.ISCANCELLED_ as ISCANCE11_27_, taskinstan2_.ISSUSPENDED_ as ISSUSPE12_27_, taskinstan2_.ISOPEN_ as ISOPEN13_27_, taskinstan2_.ISSIGNALLING_ as ISSIGNA14_27_, taskinstan2_.ISBLOCKING_ as ISBLOCKING15_27_, taskinstan2_.TASK_ as TASK16_27_, taskinstan2_.TOKEN_ as TOKEN17_27_, taskinstan2_.SWIMLANINSTANCE_ as SWIMLAN18_27_, taskinstan2_.TASKMGMTINSTANCE_ as TASKMGM19_27_ from JBPM_POOLEDACTOR pooledacto0_, JBPM_TASKACTORPOOL taskinstan1_, JBPM_TASKINSTANCE taskinstan2_ where pooledacto0_.ID_=taskinstan1_.POOLEDACTOR_ and taskinstan1_.TASKINSTANCE_=taskinstan2_.ID_ and pooledacto0_.ACTORID_=? and (taskinstan2_.ACTORID_ is null) and taskinstan2_.ISSUSPENDED_<>1 and taskinstan2_.ISOPEN_=1
Hibernate: select taskinstan0_.ID_ as ID1_27_, taskinstan0_.NAME_ as NAME3_27_, taskinstan0_.DESCRIPTION_ as DESCRIPT4_27_, taskinstan0_.ACTORID_ as ACTORID5_27_, taskinstan0_.CREATE_ as CREATE6_27_, taskinstan0_.START_ as START7_27_, taskinstan0_.END_ as END8_27_, taskinstan0_.DUEDATE_ as DUEDATE9_27_, taskinstan0_.PRIORITY_ as PRIORITY10_27_, taskinstan0_.ISCANCELLED_ as ISCANCE11_27_, taskinstan0_.ISSUSPENDED_ as ISSUSPE12_27_, taskinstan0_.ISOPEN_ as ISOPEN13_27_, taskinstan0_.ISSIGNALLING_ as ISSIGNA14_27_, taskinstan0_.ISBLOCKING_ as ISBLOCKING15_27_, taskinstan0_.TASK_ as TASK16_27_, taskinstan0_.TOKEN_ as TOKEN17_27_, taskinstan0_.SWIMLANINSTANCE_ as SWIMLAN18_27_, taskinstan0_.TASKMGMTINSTANCE_ as TASKMGM19_27_ from JBPM_TASKINSTANCE taskinstan0_ where taskinstan0_.ACTORID_='4'
Hibernate: select message0_.ID_ as ID1_26_, message0_.DESTINATION_ as DESTINAT3_26_, message0_.EXCEPTION_ as EXCEPTION4_26_, message0_.ISSUSPENDED_ as ISSUSPEN5_26_, message0_.TOKEN_ as TOKEN6_26_, message0_.TEXT_ as TEXT7_26_, message0_.ACTION_ as ACTION8_26_, message0_.NODE_ as NODE9_26_, message0_.TRANSITIONNAME_ as TRANSIT10_26_, message0_.TASKINSTANCE_ as TASKINS11_26_, message0_.CLASS_ as CLASS2_26_ from JBPM_MESSAGE message0_ where message0_.DESTINATION_=? and message0_.ISSUSPENDED_<>1 and (message0_.EXCEPTION_ is null)
2008-9-18 15:25:14 org.apache.catalina.core.ApplicationDispatcher invoke
严重: Servlet.service() for servlet action threw exception
java.sql.SQLException: ORA-00942: 表或视图不存在

	at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
	at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
	at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
	at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
	at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
	at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
	at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
	at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
	at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
	at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
	at org.hibernate.loader.Loader.doQuery(Loader.java:662)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
	at org.hibernate.loader.Loader.doList(Loader.java:2150)
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
	at org.hibernate.loader.Loader.list(Loader.java:2024)
	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300)
	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:146)
	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1093)
	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
	at org.jbpm.db.MessagingSession.findMessages(MessagingSession.java:103)
	at com.business.BaoxiaoBus.findUserMessageByUsername(BaoxiaoBus.java:162)
	at com.struts.action.TasklistAction.execute(TasklistAction.java:59)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
	at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
	at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.workflow.servlet.ChinaFilter.doFilter(ChinaFilter.java:23)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619)

 在是我的hibernate配置信息:

<?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">

<hibernate-configuration>
<session-factory>

	<!-- jdbc connection properties-->

	<property name="connection.pool.size">3</property>
	<property name="show_sql">true</property>

	<property name="hibernate.cache.provider_class">
		org.hibernate.cache.HashtableCacheProvider
	</property>
	<property name="hbm2ddl.auto">update</property>

	<property name="hibernate.show_sql">true</property>
	<!-- ############################################ -->
	<!-- # mapping files with external dependencies # -->
	<!-- ############################################ -->

	<!-- following mapping file has a dependendy on   -->
	<!-- 'bsh-{version}.jar'.                         -->
	<!-- uncomment this if you don't have bsh on your -->
	<!-- classpath.  you won't be able to use the     -->
	<!-- script element in process definition files   -->
	<property name="myeclipse.connection.profile">Oracle</property>
	<property name="connection.url">
		jdbc:oracle:thin:@192.168.162.202:1521:TEST
	</property>
	<property name="connection.username">system</property>
	<property name="connection.password">test</property>
	<property name="connection.driver_class">
		oracle.jdbc.driver.OracleDriver
	</property>
	<property name="dialect">
		org.hibernate.dialect.Oracle9Dialect
	</property>
	<mapping resource="org/jbpm/graph/action/Script.hbm.xml" />

	<!-- following mapping files have a dependendy on  -->
	<!-- 'jbpm-identity-{version}.jar', mapping files  -->
	<!-- of the pluggable jbpm identity component.     -->
	<!-- comment out the following 3 lines if you don't-->
	<!-- want to use the default jBPM identity mgmgt   -->
	<!-- component                                     -->
	<mapping resource="org/jbpm/identity/User.hbm.xml" />
	<mapping resource="org/jbpm/identity/Group.hbm.xml" />
	<mapping resource="org/jbpm/identity/Membership.hbm.xml" />

	<!-- ###################### -->
	<!-- # jbpm mapping files # -->
	<!-- ###################### -->

	<!-- hql queries and type defs -->
	<mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />

	<!-- graph.def mapping files -->
	<mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml" />
	<mapping resource="org/jbpm/graph/def/Node.hbm.xml" />
	<mapping resource="org/jbpm/graph/def/Transition.hbm.xml" />
	<mapping resource="org/jbpm/graph/def/Event.hbm.xml" />
	<mapping resource="org/jbpm/graph/def/Action.hbm.xml" />
	<mapping resource="org/jbpm/graph/def/SuperState.hbm.xml" />
	<mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml" />
	<mapping resource="org/jbpm/instantiation/Delegation.hbm.xml" />

	<!-- graph.node mapping files -->
	<mapping resource="org/jbpm/graph/node/StartState.hbm.xml" />
	<mapping resource="org/jbpm/graph/node/EndState.hbm.xml" />
	<mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml" />
	<mapping resource="org/jbpm/graph/node/Decision.hbm.xml" />
	<mapping resource="org/jbpm/graph/node/Fork.hbm.xml" />
	<mapping resource="org/jbpm/graph/node/Join.hbm.xml" />
	<mapping resource="org/jbpm/graph/node/State.hbm.xml" />
	<mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml" />

	<!-- context.def mapping files -->
	<mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml" />
	<mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml" />

	<!-- taskmgmt.def mapping files -->
	<mapping
		resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml" />

	<!-- module.def mapping files -->
	<mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml" />

	<!-- bytes mapping files -->
	<mapping resource="org/jbpm/bytes/ByteArray.hbm.xml" />

	<!-- file.def mapping files -->
	<mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml" />

	<!-- scheduler.def mapping files -->
	<mapping
		resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml" />
	<mapping
		resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml" />

	<!-- graph.exe mapping files -->
	<mapping resource="org/jbpm/graph/exe/Comment.hbm.xml" />
	<mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml" />
	<mapping resource="org/jbpm/graph/exe/Token.hbm.xml" />
	<mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml" />

	<!-- module.exe mapping files -->
	<mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml" />

	<!-- context.exe mapping files -->
	<mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml" />
	<mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml" />
	<mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml" />
	<mapping
		resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml" />

	<!-- msg.db mapping files -->
	<mapping resource="org/jbpm/msg/Message.hbm.xml" />
	<mapping resource="org/jbpm/msg/db/TextMessage.hbm.xml" />
	<mapping resource="org/jbpm/command/ExecuteActionCommand.hbm.xml" />
	<mapping resource="org/jbpm/command/ExecuteNodeCommand.hbm.xml" />
	<mapping resource="org/jbpm/command/SignalCommand.hbm.xml" />
	<mapping resource="org/jbpm/command/TaskInstanceEndCommand.hbm.xml" />

	<!-- taskmgmt.exe mapping files -->
	<mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml" />

	<!-- scheduler.exe mapping files -->
	<mapping resource="org/jbpm/scheduler/exe/Timer.hbm.xml" />

	<!-- logging mapping files -->
	<mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml" />
	<mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml" />
	<mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml" />
	<mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml" />
	<mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml" />
	<mapping
		resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml" />
	<mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml" />
	<mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml" />
	<mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml" />
	<mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml" />
	<mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml" />
	<mapping resource="org/jbpm/context/log/VariableLog.hbm.xml" />
	<mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml" />
	<mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml" />
	<mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml" />
	<mapping
		resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml" />
	<mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml" />
	<mapping resource="com/po/TbApprove.hbm.xml" />
	<mapping resource="com/po/TbBaoxiao.hbm.xml" />
	<mapping resource="com/po/TbBaoxiaoItem.hbm.xml" />
	<mapping resource="com/po/TbUser.hbm.xml" />
</session-factory>
</hibernate-configuration>

 

 再则是数据库:

--用户表
create table tb_user(
	user_id			int primary key identity(1,1),--用户ID
	user_name		varchar(30),--用户名
	user_password		varchar(30),--密码
	user_type		int --用户类型(0为普通用户,1为主管,2为老板,3为财务人员)
)
go
--报销表
create table tb_baoxiao(
	baoxiao_id		int primary key identity(1,1),
	baoxiao_title		varchar(30),--报销主题
	baoxiao_memo		varchar(30),--备注
	user_id			int,--报销人
	baoxiao_date		datetime, --报销时间
	baoxiao_flag		bit	--报销状态(0为未处理,1为已处理)
)
go
--报销项目表
create table tb_baoxiao_item(
	item_id			int primary key identity(1,1),
	item_name		varchar(30),--项目名称
	item_money		varchar(100),--项目金额
	baoxiao_id		int --报销表ID
)
go
--审核意见表
create table tb_approve(
	approve_id		int primary key identity(1,1),
	user_id			int,--审核人ID
	baoxiao_id		int,--报销表ID
	approve_result		varchar(30),--审核结果
	approve_memo		varchar(30),--审核意见
	approve_date		datetime --审核日期
)
go

--为报销表添加外键
alter table tb_baoxiao add CONSTRAINT baoxiao_foreign_key foreign key (user_id) references tb_user(user_id)
go

--为报销项目表添加外键
alter table tb_baoxiao_item add CONSTRAINT baoxiao_item_foreign_key foreign key (baoxiao_id) references tb_baoxiao(baoxiao_id)
go

--为审核意见表添加外键
alter table tb_approve add CONSTRAINT approve_user_foreign_key foreign key (user_id) references tb_user(user_id)
go

alter table tb_approve add CONSTRAINT approve_baoxiao_foreign_key foreign key (baoxiao_id) references tb_baoxiao(baoxiao_id)
go

 该数据库是其自带的,我已经在oracle中重新建立。

希望有朋友可以帮忙解答分析一下,谢谢

抱歉项目有29MB无法上传,需要的朋友留email

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值