内存数据库的概念以及如何查看我的数据是否正在HSQL DB中填充? [英] Concept of In Memory Database and how to see if my data is being populated in HSQL DB?

查看:206
本文介绍了内存数据库的概念以及如何查看我的数据是否正在HSQL DB中填充?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在内存数据库中使用HSQL来测试我的应用程序,并使用SQL Server作为主数据库,现在当我做测试,然后HSQL数据库被填充相同的数据,我在我的SQL Server,现在我试着测试从数据库检索数据的特定服务(如果直接服务被运行,它将查询MS服务器,如果从测试中调用,它将查询HSQL数据库)



在运行查询时从MS Server查看数据,但是如果运行相同的查询,则HSQL Db不返回任何数据。我在这里的希望是HSQL数据库不填充数据,是否有一种方法,在我可以去看看我在HSQL数据库中的表和如何数据填充在HSQLDB,我想看到数据和i没有任何gui客户端来查看HSQL数据库是如何填充的,什么数据在什么表中。我们有一个良好的客户端,如何连接到HSQL数据库使用它,我怎么能看到事情发生在HSQL覆盖,而不是只是假设HSQL正确填充我们在SQL Server? / p>

任何建议都会很长时间?

解决方案

详细步骤



如何在服务器模式下运行仅内存HSQLDB



1)下载最新版本 hsqldb- 2.2.5.zip



2)解压缩,打开bin文件夹



修改runServer.bat如
cd ..\data
@java -classpath ../lib/hsqldb.jar org.hsqldb.server.Server -database.0 mem:aname -dbname.0 aliasdb
并单击runServer.bat启动服务器



4)运行runManager.bat,选择服务器类型,输入url
jdbc: hsqldb:hsql:// localhost / aliasdb,connect,创建一些测试表和测试数据



5)再次运行runManager.bat启动另一个客户端, ,输入url jdbc:hsqldb:hsql:// localhost / aliasdb,connect,你会发现你创建的数据。


I am using HSQL in memory database for test purpose of my application and using SQL Server as main database, now when am doing test then HSQL Database is being populated with same data that I have in my SQL Server, now I am trying to test particular service which is retrieving data from Database(it would query MS Server if directly service is run or it will query HSQL Database if called from test)

I am able to see data from MS Server when I run the query but HSQL Db does not return any data if am running same query on it. My hunch here is that HSQL DB is not being populated with the data, is there a way where in I can go and look in what tables I have in HSQL DB and how data is being populated in HSQLDB, i want to see data and i do not have any gui client to see how HSQL Database is populated and what data goes in what table. Do we have a good client for the same and how can I connect to HSQL Database using it and also how can I actually see things happening under HSQL Cover rather than just assuming that HSQL is being populated properly with what we have in SQL Server?

Any suggestions would go long way?

解决方案

Here I add a detailed steps of

How To Running a memory-only HSQLDB in server mode?

1) Download the latest version hsqldb-2.2.5.zip

2) unzip it,open the bin folder

3) modify the runServer.bat like cd ..\data @java -classpath ../lib/hsqldb.jar org.hsqldb.server.Server -database.0 mem:aname -dbname.0 aliasdb and click the runServer.bat to start server

4) run the runManager.bat, select Server type, enter the url jdbc:hsqldb:hsql://localhost/aliasdb,connect, create some test table and test data

5) run the runManager.bat again to start another client,select Server type, enter the url jdbc:hsqldb:hsql://localhost/aliasdb, connect, you will find the data you created.

这篇关于内存数据库的概念以及如何查看我的数据是否正在HSQL DB中填充?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆