Text tables in HSQLDB

View: New views
5 Messages — Rating Filter:   Alert me  

Text tables in HSQLDB

by lucky001 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

I am running HSQLDB server inside my appilcation that is running on a micro device that has only 64MB of RAM. I am creating a TEXT table on the device that can hold data.

Here is how I am creating text table


// Creating table
sql= "CREATE TEXT TABLE CAT (CATID VARCHAR(20), DESC1 VARCHAR(50),....)";
ps = con.prepareStatement(sql);
ps.executeUpdate();

// Creating Index
sql="CREATE INDEX cat_index ON CAT (CATID)";
ps = con.prepareStatement(sql);
ps.executeUpdate();
con.commit();

sql = "SET TABLE CAT SOURCE \"cat.dat;fs=|;all_quoted=true;quoted=true\"";


Once this table is created onto the device. My legacy will generate a data file (cat.dat) and then will FTP that data file onto device.

Now my question is:
===================
When I use SELECT statement on the device (inside my application on the device) it does not show data.

Any clue?

Thanks in advance.
Sohail



     

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user

Re: Text tables in HSQLDB

by fredt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Your cat.dat data file is obviously not where is should be in the micro
device.

You can check by inserting some data in the table on the device and see
where it creates the cat.dat file.

Fred
----- Original Message -----
From: "Sohail Mahmood" <soh_mah@...>
To: <hsqldb-user@...>
Sent: 04 July 2008 16:43
Subject: [Hsqldb-user] Text tables in HSQLDB


Hi

I am running HSQLDB server inside my appilcation that is running on a micro
device that has only 64MB of RAM. I am creating a TEXT table on the device
that can hold data.

Here is how I am creating text table


// Creating table
sql= "CREATE TEXT TABLE CAT (CATID VARCHAR(20), DESC1 VARCHAR(50),....)";
ps = con.prepareStatement(sql);
ps.executeUpdate();

// Creating Index
sql="CREATE INDEX cat_index ON CAT (CATID)";
ps = con.prepareStatement(sql);
ps.executeUpdate();
con.commit();

sql = "SET TABLE CAT SOURCE \"cat.dat;fs=|;all_quoted=true;quoted=true\"";


Once this table is created onto the device. My legacy will generate a data
file (cat.dat) and then will FTP that data file onto device.

Now my question is:
===================
When I use SELECT statement on the device (inside my application on the
device) it does not show data.

Any clue?

Thanks in advance.
Sohail





-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user 


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user

Re: Text tables in HSQLDB

by lucky001 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Fred - Thanks for all your time and efforts to answer my questions.

A quick question for you.

After few more tests I notice that when database server is started inside my application that has a TEXT table with 40,000 rows (approx 1MB CSV data file) is taking more than 9MB of RAM and when I empty this data file it hardly take couple KB to start the database up.

Is this normal to take that many times of RAM at start up of database for TEXT table?





fredt wrote:
Your cat.dat data file is obviously not where is should be in the micro
device.

You can check by inserting some data in the table on the device and see
where it creates the cat.dat file.

Fred
----- Original Message -----
From: "Sohail Mahmood" <soh_mah@yahoo.com>
To: <hsqldb-user@lists.sourceforge.net>
Sent: 04 July 2008 16:43
Subject: [Hsqldb-user] Text tables in HSQLDB


Hi

I am running HSQLDB server inside my appilcation that is running on a micro
device that has only 64MB of RAM. I am creating a TEXT table on the device
that can hold data.

Here is how I am creating text table


// Creating table
sql= "CREATE TEXT TABLE CAT (CATID VARCHAR(20), DESC1 VARCHAR(50),....)";
ps = con.prepareStatement(sql);
ps.executeUpdate();

// Creating Index
sql="CREATE INDEX cat_index ON CAT (CATID)";
ps = con.prepareStatement(sql);
ps.executeUpdate();
con.commit();

sql = "SET TABLE CAT SOURCE \"cat.dat;fs=|;all_quoted=true;quoted=true\"";


Once this table is created onto the device. My legacy will generate a data
file (cat.dat) and then will FTP that data file onto device.

Now my question is:
===================
When I use SELECT statement on the device (inside my application on the
device) it does not show data.

Any clue?

Thanks in advance.
Sohail





-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hsqldb-user 


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hsqldb-user

Re: Text tables in HSQLDB

by fredt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The database engine creates indexes, and caches, which take memory. Data is
stored as Java objects which takes more memory than the text.

Fred
----- Original Message -----
From: "lucky001" <soh_mah@...>
To: <hsqldb-user@...>
Sent: 11 July 2008 03:16
Subject: Re: [Hsqldb-user] Text tables in HSQLDB



Hi Fred - Thanks for all your time and efforts to answer my questions.

A quick question for you.

After few more tests I notice that when database server is started inside my
application that has a TEXT table with 40,000 rows (approx 1MB CSV data
file) is taking more than 9MB of RAM and when I empty this data file it
hardly take couple KB to start the database up.

Is this normal to take that many times of RAM at start up of database for
TEXT table?






fredt wrote:

>
> Your cat.dat data file is obviously not where is should be in the micro
> device.
>
> You can check by inserting some data in the table on the device and see
> where it creates the cat.dat file.
>
> Fred
> ----- Original Message -----
> From: "Sohail Mahmood" <soh_mah@...>
> To: <hsqldb-user@...>
> Sent: 04 July 2008 16:43
> Subject: [Hsqldb-user] Text tables in HSQLDB
>
>
> Hi
>
> I am running HSQLDB server inside my appilcation that is running on a
> micro
> device that has only 64MB of RAM. I am creating a TEXT table on the device
> that can hold data.
>
> Here is how I am creating text table
>
>
> // Creating table
> sql= "CREATE TEXT TABLE CAT (CATID VARCHAR(20), DESC1 VARCHAR(50),....)";
> ps = con.prepareStatement(sql);
> ps.executeUpdate();
>
> // Creating Index
> sql="CREATE INDEX cat_index ON CAT (CATID)";
> ps = con.prepareStatement(sql);
> ps.executeUpdate();
> con.commit();
>
> sql = "SET TABLE CAT SOURCE \"cat.dat;fs=|;all_quoted=true;quoted=true\"";
>
>
> Once this table is created onto the device. My legacy will generate a data
> file (cat.dat) and then will FTP that data file onto device.
>
> Now my question is:
> ===================
> When I use SELECT statement on the device (inside my application on the
> device) it does not show data.
>
> Any clue?
>
> Thanks in advance.
> Sohail
>
>
>
>
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> Hsqldb-user mailing list
> Hsqldb-user@...
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> Hsqldb-user mailing list
> Hsqldb-user@...
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>
>

--
View this message in context:
http://www.nabble.com/Text-tables-in-HSQLDB-tp18281816p18395567.html
Sent from the HSQLDB - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user 


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user

Re: Text tables in HSQLDB

by lucky001 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is hsqldb doing all these at database startup?

fredt wrote:
The database engine creates indexes, and caches, which take memory. Data is
stored as Java objects which takes more memory than the text.

Fred
----- Original Message -----
From: "lucky001" <soh_mah@yahoo.com>
To: <hsqldb-user@lists.sourceforge.net>
Sent: 11 July 2008 03:16
Subject: Re: [Hsqldb-user] Text tables in HSQLDB



Hi Fred - Thanks for all your time and efforts to answer my questions.

A quick question for you.

After few more tests I notice that when database server is started inside my
application that has a TEXT table with 40,000 rows (approx 1MB CSV data
file) is taking more than 9MB of RAM and when I empty this data file it
hardly take couple KB to start the database up.

Is this normal to take that many times of RAM at start up of database for
TEXT table?






fredt wrote:
>
> Your cat.dat data file is obviously not where is should be in the micro
> device.
>
> You can check by inserting some data in the table on the device and see
> where it creates the cat.dat file.
>
> Fred
> ----- Original Message -----
> From: "Sohail Mahmood" <soh_mah@yahoo.com>
> To: <hsqldb-user@lists.sourceforge.net>
> Sent: 04 July 2008 16:43
> Subject: [Hsqldb-user] Text tables in HSQLDB
>
>
> Hi
>
> I am running HSQLDB server inside my appilcation that is running on a
> micro
> device that has only 64MB of RAM. I am creating a TEXT table on the device
> that can hold data.
>
> Here is how I am creating text table
>
>
> // Creating table
> sql= "CREATE TEXT TABLE CAT (CATID VARCHAR(20), DESC1 VARCHAR(50),....)";
> ps = con.prepareStatement(sql);
> ps.executeUpdate();
>
> // Creating Index
> sql="CREATE INDEX cat_index ON CAT (CATID)";
> ps = con.prepareStatement(sql);
> ps.executeUpdate();
> con.commit();
>
> sql = "SET TABLE CAT SOURCE \"cat.dat;fs=|;all_quoted=true;quoted=true\"";
>
>
> Once this table is created onto the device. My legacy will generate a data
> file (cat.dat) and then will FTP that data file onto device.
>
> Now my question is:
> ===================
> When I use SELECT statement on the device (inside my application on the
> device) it does not show data.
>
> Any clue?
>
> Thanks in advance.
> Sohail
>
>
>
>
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> Hsqldb-user mailing list
> Hsqldb-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> Hsqldb-user mailing list
> Hsqldb-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>
>

--
View this message in context:
http://www.nabble.com/Text-tables-in-HSQLDB-tp18281816p18395567.html
Sent from the HSQLDB - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hsqldb-user 


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
LightInTheBox - Buy quality products at wholesale price