SQL
共 9 篇文章
Oracle存储过程中如何正确使用行锁
Oracle存储过程中如何正确使用行锁 http://database.51cto.com/art/201004/196669.htm 以下的文章主要是讲述 Oracle 存储过程中如何正确的使用行锁的实际示例,如果一张入库单表中的相关字段status用来记录相关的入库状态,入库前我们要先判断其入库的标识。如果没有入库的话,我们则做入库的相关处理。 否则则做另一个操作,问题来了,当两个人同时做入库处理时,取得的状态都为'未入库',于是,你可以想到,发生了两次入库操作。在并发问题中,一不 小心就可能出现一些不易发现的错误。这里可以通过一个Oracle存储过程中使用行锁来解决这个问题,通过锁,使…
2012-08-01 09:46 · SQL
什么是Oracle RAC?
Source: http://hi.baidu.com/movieyouth/blog/item/9478800140d788d2277fb5a1.html RAC就是real application clusters的缩写,跟rack的读音同。 Oracle Real Application Clusters (RAC)可以支持24 x 7 有效的数据库应用 系统,您可以在由低成本的服务器构成的高可用性系统上自由部署您的应用,而无需修改您的应用程序。已经有超过4200个用户从中受益。现在Oracle在10g RAC中更提供免费的集群软件和存储管理软件,为您降低应用成本。拥有RAC您无需再为…
2010-04-28 13:58 · SQL
A good specification about Schema and User
Source: http://edu.qudong.com/program/Oracle/jishujinghua/20080408/6296.html 假如我们想了解数据库中的User和Schema究竟是什么关系,首先必须了解一下数据库中User和Schema到底是什么概念。 在SQL Server2000中,由于架构的原因,User和Schema总有一层隐含的关系,让我们很少意识到其实User和Schema是两种完全不同的概念,不过在SQL Server2005中这种架构被打破了,User和Schema也被分开了。 首先我来做一个比喻, 什么是Database,什么是Schema,什么是…
2010-04-20 10:49 · SQL
Ibatis configuration 2
now getting SqlMapClient: SqlAppConfig.java /** * */ package com.dingfei.config; import java.io.Reader; import com.ibatis.common.resources.Resources; import com.ibatis.sqlmap.client.SqlMapClient; import com.ibatis.sqlmap.client.SqlMapClientBuilder; /** * @author Jeffy * */ public class SqlAppConfig…
2009-06-21 21:43 · SQL
Ibatis configuration
db.properties driver=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/test username=root password=root SqlMapConfig.xml <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"> …
2009-06-21 21:41 · SQL
Using Ibatis 3
Test.java /** * */ package com.test; import java.sql.SQLException; import java.util.HashMap; import java.util.Iterator; import java.util.List; import com.dingfei.config.SqlAppConfig; import com.dingfei.vo.Employee; import com.dingfei.vo.SiteConfig; import com.ibatis.sqlmap.client.SqlMapClient; /** …
2009-06-21 21:38 · SQL
Using Ibatis 2
DB table: employee.sql, and SiteConfig.sql -- phpMyAdmin SQL Dump -- version 2.10.2 -- http://www.phpmyadmin.net -- -- 主机: localhost -- 生成日期: 2009 年 06 月 21 日 13:33 -- 服务器版本: 5.0.15 -- PHP 版本: 5.2.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- 数据库: `test` -- -- --------------------------------------…
2009-06-21 21:36 · SQL
Using Ibatis 1
1.mapping file: site.xml <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <sqlMap namespace="SiteConfig"> <typeAlias alias="SiteConfig" type="com.dingfei.vo.SiteConfig" /> <resultMap id="SiteCon…
2009-06-21 21:19 · SQL