- 浏览: 592148 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (223)
- JavaCore (5)
- JavaWeb (16)
- HTML/CSS (14)
- MySQL (10)
- iBatis (2)
- Struts2 (12)
- OpenSource (18)
- 杂记 (16)
- IDE (10)
- Linux (4)
- Javacript (24)
- Hibernate (21)
- Extjs (1)
- jQuery (19)
- Database (5)
- DesignPattern (7)
- Spring (11)
- DWR (1)
- Hadoop (2)
- PHP (1)
- Flex4 (7)
- Nodejs (1)
- Maven (3)
- Firefox (5)
- SCM (1)
- 服务器架构 (2)
最新评论
-
明明如月:
这个方法不错
解决Failed to execute goal org.apache.maven.plugins -
srhlwdamon:
可是我的为什么解决不了。。。。。。。。。!!
解决Failed to execute goal org.apache.maven.plugins -
di1984HIT:
写的不错。
Memcached 在window下部署和测试示例 -
只为学英语:
正解,十分感谢
解决Failed to execute goal org.apache.maven.plugins -
落雪封:
谢谢,解决了,少导入jar包了
Spring MVC 的json问题(406 Not Acceptable)
学习和部署 h2 database 算了, h2 database 是 hsqldb 的作者后来的又一力作 ,更好用,更高效
1.hsqldb 有如下功能:
核心:
HyperSQL RDBMS Engine (HSQLDB)
HyperSQL JDBC Driver
扩展:
Database Manager (GUI database access tool, with Swing and AWT versions)
Sql Tool (command line database access tool) - sqltool.jar
2.启动gui
方式a:
设置环境变量后
bat方式启动:
方式b:
双击hsqldb.jar,更爽
3.hsqldb三种数据保存方式:
->内存
->文件
->jar中
若file则生成这些文件:
-
test.properties 记录数据库设置
-
test.script 表定义和数据库对象的定义语句
-
test.log 记录数据库最近的日志和更改
-
test.data 缓存表中的数据
-
test.backup 对最近表中数据的备份
-
test.lobs
->test.lck用来记录数据库正在open
->当SHUTDOWN则移除test.log,
test.lck
4.若在window下,则在c盘下的对应路径创建数据库
Connection c = DriverManager.getConnection("jdbc:hsqldb:file:/opt/db/testdb", "SA", "123");
5.两个或许不同
Class.forName("org.hsqldb.jdbc.JDBCDriver" ); Class.forName("org.hsqldb.jdbcDriver" );
6.当最后一个连接关闭,则关闭数据库.[我也不太明白??]
jdbc:hsqldb:file:/opt/db/testdb;shutdown=true
7.
如果testdb存在,则连接到testdb,如果不存在则抛出异常
jdbc:hsqldb:file:/opt/db/testdb;ifexists=true
如果testdb不存在,则创建
jdbc:hsqldb:file:/opt/db/testdb
8.支持的数据类型
-
Numeric types TINYINT, SMALLINT, INTEGER and BIGINT are types with fixed binary precision. These types are more efficient to store and retrieve. NUMERIC and DECIMAL are types with user-defined decimal precision. They can be used with zero scale to store very large integers, or with a non-zero scale to store decimal fractions. The DOUBLE type is a 64 bit, approximate floating point types. HyperSQL even allows you to store infinity in this type.
-
The BOOLEAN type is for logical values and can hold TRUE, FALSE or UNKNOWN. Although HyperSQL allows you to use one and zero in assignment or comparison, you should use the standard values for this type.
-
Character string types are CHAR(L), VARCHAR(L) and CLOB . CHAR is for fixed width strings and any string that is assigned to this type is padded with spaces at the end. Do not use this type for general storage of strings. If you use CHAR without the length L, then it is interpreted as a single character string. Use VARCHAR(L) for general strings. There are only memory limits and performance implications for the maximum length of VARCHAR(L). If the strings are larger than a few kilobytes, consider using CLOB. The CLOB types is for very large strings. Do not use this type for short strings as there are performance implications. The CLOB type is a better choice for the storage of long strings. By default LONGVARCHAR is a synonym for a long VARCHAR and can be used without specifying the size. You can set LONGVARCHAR to map to CLOB, with the
sql.longvar_is_lob
connection property or the SET DATABASE SQL LONGVAR IS LOB TRUE statement. -
Binary string types are BINARY(L), VARBINARY(L) and BLOB. Do not use BINARY(L) unless you are storing keys such as UUID. This type pads short binary strings with zero bytes. BINARY without the length L means a single byte. Use VARBINARY(L) for general binary strings, and BLOB for large binary objects. You should apply the same considerations as with the character string types. By default LONGVARBINARY is a synonym for a long VARCHAR and can be used without specifying the size. You can set LONGVARBINARY to map to BLOB, with the
sql.longvar_is_lob
connection property or the SET DATABASE SQL LONGVAR IS LOB TRUE statement. -
The BIT(L) and BITVARYING(L) types are for bit maps. Do not use them for other types of data. BIT without the length L argument means a single bit and is sometimes used as a logical type. Use BOOLEAN instead of this type.
-
The datetime types DATE, TIME and TIMESTAMP , together with their WITH TIME ZONE variations are available. Read the details in this chapter on how to use these types.
-
The INTERVAL type is very powerful when used together with the datetime types. This is very easy to use, but is supported mainly by "big iron" database systems. Note that functions that add days or months to datetime values are not really a substitute for the INTERVAL type. Expressions such as
(datecol - 7 DAY) > CURRENT_DATE
are optimised to use indexes when it is possible, while the equivalent function calls are not optimised. -
The OTHER type is for storage of Java objects. If your objects are large, serialize them in your application and store them as BLOB in the database.
-
The ARRAY type supports all base types except LOB and OTHER types. ARRAY data objects are held in memory while being processed. It is therefore not recommended to store more than about a thousand objects in an ARRAY in normal operations with disk based databases. For specialised applications, use ARRAY with as many elements as your memory allocation can support.
9.关于SA
This user is automatically created with a new database and has the DBA role . Initially, the password for this user is an empty string. After connecting to the new database as this user, it is possible to change the password, create other users and created new schema objects. The SA user can be dropped by another user that has the DBA role.
10.
学习和部署 h2 database 算了, h2 database 是 hsqldb 的作者后来的又一力作 ,更好用,更高效
发表评论
-
jTidy入门和实践
2012-10-14 21:05 3363测试html代码: <!DOCTYPE ... -
window部署nodeclub 出现问题,跪求支援
2012-05-23 17:29 5828因为操作比文字更具有说服力和把事情说清楚,因此我把自己的操作贴 ... -
net.sf.json.JSONException Property 'data' has no getter method in class 的问题解决
2012-04-11 09:20 23401.异常: net.sf.json.JSONEx ... -
Guava Joiner 用法
2012-03-15 21:18 0package com.github.zhongl.util; ... -
log4jdbc 使用入门
2011-10-21 13:30 2550log4jdbc 可以将占位符与参数全部合并在一起显示,方便直 ... -
log4jdbc 使用入门
2011-10-21 13:27 0log4jdbc 可以将占位符与参数全部合并在一起显示,方便直 ... -
hsqldb起步
2011-05-02 22:17 7141.复制 hsqldb.jar 到 "d:\db&q ... -
[原创]slf4j+logback 的详细配置
2011-03-29 23:43 68371.类库: logback-classic-0.9.28.j ... -
了解Quartz体系结构
2011-03-26 10:22 838了解Quartz体系结构 Quartz对任 ... -
Quartz入门例子
2011-03-26 00:25 1077//给女友打电话是一个job public class Ca ... -
com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could
2011-03-04 20:59 10086Spring结合c3p0的时候,出现如下异常: com ... -
c3p0的ComboPooledDataSource
2011-03-04 20:33 4610acquireIncrement -> 5 acqu ... -
commons-logging与log4j的贴心组合
2010-12-30 17:28 910一.查找 LogFactory 的顺序: 1.从系统属性中查 ... -
dbutils的count问题
2010-12-17 20:04 1237/** * 根据车次和座位类型获得对应的已订座位数 ... -
xerces.jar与tomcat的reload出现异常
2010-12-07 19:14 1939xerces.jar将导致tomcat reload异常 ... -
Proxool过程
2010-12-06 23:00 7721.http://proxool.sourceforge.ne ... -
commons.dbutils的BeanHandler数据封装
2010-11-21 17:01 41681.实体: public class Order { p ... -
BeanShell资源和简单例子
2010-10-28 15:12 1554http://www.beanshell.org/manual ... -
JRebel+Tomcat实现热部署
2010-10-17 23:06 3127如题,当修改了类文件,不需要重启tomcat! 1.下 ...
相关推荐
2. **SQL问题**:探讨了HSQLDB对SQL标准的支持程度,包括对各种SQL语句(如SELECT、UPDATE等)的解释和示例,以及如何使用HSQLDB来管理数据完整性约束。 3. **UNIX下快速起步**:提供了一套适用于UNIX系统的快速入门...
- **部署问题**:HSQLDB支持多种部署环境,包括UNIX系统下的快速起步指导,以及针对不同操作模式和表的部署策略,确保数据库的稳定运行和高效使用。 通过以上知识点的阐述,可以看出HSQLDB不仅是一款功能强大的轻量...
### JAVA-SERVLET-+-MYSQL-+-JBOSS-开发起步 #### 一、Java Servlet、Jboss、Mysql、Eclipse 开发介绍 在现代Web应用开发领域中,Java Servlet技术结合MySQL数据库以及JBoss应用服务器是构建企业级应用的常见组合...
例如,如果在 classpath 中发现了 HSQLDB 数据库驱动,那么就会自动配置相关的数据源。 5. **使用 Spring Boot 实现 RESTful API** - 添加 `spring-boot-starter-web` 起步依赖。 - 创建 Controller 类,使用 `@...
2. **起步依赖(Starters)** Spring Boot的起步依赖是一系列精心打包的Maven或Gradle依赖,它们包含了开发特定功能所需的所有依赖。例如,如果你想开发一个Web应用,只需要添加`spring-boot-starter-web`依赖即可...
2. **起步依赖(Starter POMs)**: Spring Boot通过一系列的"starter" pom文件,简化了项目的构建配置。例如,如果你想使用MyBatis,只需要引入`spring-boot-starter-data-jpa`依赖即可,其他的依赖和配置都会自动完成...
例如,如果你的类路径中有HSQLDB,那么Spring Boot就会自动配置内存数据库。 5. **内嵌Servlet容器**: - Spring Boot可以内嵌Tomcat、Jetty或Undertow等Servlet容器,无需额外部署WAR文件,简化了开发流程。 6. ...
在本文中,我们将探讨如何使用Java Servlet、MySQL、JBoss以及Eclipse进行软件开发的起步过程。首先,我们需要确保拥有所有必要的工具和库。以下是一份详尽的准备清单: 1. **Tomcat**:作为Servlet容器,Tomcat ...
2. **Spring Boot CLI**: CLI是Command Line Interface的缩写,是Spring Boot提供的命令行工具。它可以让你直接运行Groovy脚本来创建和运行Spring应用,无需构建整个项目。这在快速原型开发或者测试小段代码时非常...
2. **起步依赖(Starters)**:SpringBoot的起步依赖是一组Maven或Gradle的依赖管理模块,它们封装了常用功能的依赖集合,如`spring-boot-starter-web`用于web开发,`spring-boot-starter-data-jpa`用于数据库操作等...
2. **起步依赖**:Spring Boot通过“起步依赖”(Starter POMs)来管理依赖,如`spring-boot-starter-web`包含Tomcat和Spring MVC。这简化了Maven或Gradle的配置,开发者只需要引入相应的起步依赖,就能获得所需的...
1. **起步依赖(Starters)**:Spring Boot通过一系列的起步依赖来简化Maven或Gradle的配置,这些起步依赖包含了一组默认的依赖集合,比如`spring-boot-starter-web`用于web开发,`spring-boot-starter-data-jpa`...
例如,如果在类路径下发现`HSQLDB`,那么Spring Boot将自动配置一个内存数据库。 - **起步依赖**:Spring Boot通过起步依赖简化了添加和管理Maven或Gradle项目的依赖。如需使用某项功能,只需引入相应的起步依赖...
3. **起步依赖(Starter POMs)**:SpringBoot 提供了一系列的起步依赖,开发者只需在 Maven 或 Gradle 的构建文件中引入相应依赖,即可快速搭建所需环境,如 `spring-boot-starter-web` 用于 web 开发,`spring-...
例如,如果项目中有HSQLDB库,Spring Boot会自动配置内存数据库;有JDBC依赖,它会配置数据源。 文档中还将详细讲解如何创建“可执行的jar”(Executable JARs)。Spring Boot允许你打包应用为一个可运行的jar,...
1. **起步依赖(Starters)**:SpringBoot 的起步依赖是其简洁配置的关键。它们是一组预定义的 Maven 或 Gradle 依赖集合,例如 `spring-boot-starter-web` 用于构建 Web 应用,`spring-boot-starter-data-jpa` 用于...
2. **起步依赖**:SpringBoot提供了许多起步依赖(Starter POMs),这些依赖简化了Maven或Gradle配置,比如`spring-boot-starter-web`用于web开发,`spring-boot-starter-data-jpa`用于数据库访问。 3. **内嵌...
1. **快速起步与项目构建** Spring Boot通过提供默认配置,使得开发者能够快速启动项目。只需添加必要的依赖,就可以创建一个完整的可运行的JAR或WAR。"spring-boot-mmanyexamples"可能包含了多个示例项目,每个...
2. **起步依赖(Starter POMs)**:Spring Boot通过一系列“起步依赖”POMs帮助开发者快速选择所需功能。例如,`spring-boot-starter-web`提供了Web开发的基本依赖,包括Tomcat服务器和Spring MVC。 3. **内嵌式Web...