Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Kura and use of database
Kura and use of database [message #1708680] Fri, 18 September 2015 16:15 Go to next message
Silvio Tavilla is currently offline Silvio TavillaFriend
Messages: 7
Registered: September 2015
Junior Member
Hi all,
I would like to save my data on Kura's database and understand how to create and manage it.
Any guide about it?

Thanks in advance!!

Re: Kura and use of database [message #1708751 is a reply to message #1708680] Sun, 20 September 2015 07:45 Go to previous messageGo to next message
Amit Kumar Mondal is currently offline Amit Kumar MondalFriend
Messages: 108
Registered: March 2015
Location: Munich, Germany
Senior Member

Hi Silvio,

If I am not wrong, you want to save your data locally to your Kura Device. First of all, Eclipse Kura doesn't provide any packaged database with it but it has HyperSQL accessor OSGi Bundle which would help you to mange your own HyperSQL Databases.

There are quite a few no of ways you can follow to manage your own HyperSQL Database using Kura's DBService.
You have to configure Kura System Properties with the proper configuration Parameters for your HyperSQL Connection.

1. You can create an OSGi Metatype Bundle to configure the required system properties using Kura's SystemService
2. Or you can configure the parameters in proper configuration properties file in Eclipse Kura

After configuring your HyperSQL Configuration Parameters, you can use DBService to access the database to store and retrieve data locally.

For your reference, do find the required system properties which you have to set. I have created the Metatype configuration file which you can use to set the System Properties externally by creating an OSGi Metatype Bundle.

<MetaData xmlns="http://www.osgi.org/xmlns/metatype/v1.2.0"
	localization="en_us">
	<OCD id="com.amitinside.hsql.conf" name="HyperSQL"
		description="This is used to configure HyperSQL Connection">

		<Icon
			resource="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/128/Places-server-database-icon.png"
			size="32" />

		<AD id="db.service.hsqldb.url" name="db.service.hsqldb.url" type="String"
			cardinality="0" required="true" default="jdbc:hsqldb:hsql://localhost/iva"
			description="Configurable property to set HyperSQL Connection URL" />

		<AD id="db.service.hsqldb.cache_rows" name="db.service.hsqldb.cache_rows"
			type="Integer" cardinality="0" required="false" default="50000"
			description="Configurable Property to set caching of rows" />

		<AD id="db.service.hsqldb.lob_file_scale" name="db.service.hsqldb.lob_file_scale"
			type="Integer" cardinality="0" required="false" default="32"
			description="Configurable Property to set lob file scaling size" />

		<AD id="db.service.hsqldb.defrag_limit" name="db.service.hsqldb.defrag_limit"
			type="Integer" cardinality="0" required="false" default="0"
			description="Configurable Property to set defragmentation limit" />

		<AD id="db.service.hsqldb.log_data" name="db.service.hsqldb.log_data"
			type="Boolean" cardinality="0" required="false" default="false"
			description="Configurable Property to set log data" />

		<AD id="db.service.hsqldb.log_size" name="db.service.hsqldb.log_size"
			type="Integer" cardinality="0" required="false" default="50"
			description="Configurable Property to set log size" />

		<AD id="db.service.hsqldb.nio_data_file" name="db.service.hsqldb.nio_data_file"
			type="Boolean" cardinality="0" required="false" default="true"
			description="Configurable Property to set NIO data file" />

		<AD id="db.service.hsqldb.write_delay_millis" name="db.service.hsqldb.write_delay_millis"
			type="Integer" cardinality="0" required="false" default="500"
			description="Configurable Property to set write delay in milliseconds" />

	</OCD>

	<Designate pid="com.amitinside.hsql.conf">
		<Object ocdref="com.amitinside.hsql.conf" />
	</Designate>
</MetaData>


I hope it helps.


Amit Kumar Mondal
Email: admin@amitinside.com
Skype: arsenalnerk Blog: blog.amitinside.com

[Updated on: Sun, 20 September 2015 08:58]

Report message to a moderator

Re: Kura and use of database [message #1708752 is a reply to message #1708751] Sun, 20 September 2015 07:46 Go to previous messageGo to next message
Amit Kumar Mondal is currently offline Amit Kumar MondalFriend
Messages: 108
Registered: March 2015
Location: Munich, Germany
Senior Member

For your reference, have a look on Kura's DBService API Docs:

http://download.eclipse.org/kura/docs/api/0.7.0/org/eclipse/kura/db/DbService.html


Amit Kumar Mondal
Email: admin@amitinside.com
Skype: arsenalnerk Blog: blog.amitinside.com

[Updated on: Sun, 20 September 2015 08:07]

Report message to a moderator

Re: Kura and use of database [message #1708754 is a reply to message #1708752] Sun, 20 September 2015 08:51 Go to previous messageGo to next message
Amit Kumar Mondal is currently offline Amit Kumar MondalFriend
Messages: 108
Registered: March 2015
Location: Munich, Germany
Senior Member

Hi Silvio,

Have a look on Kura's SystemService on how to use it to set custom system properties.

http://download.eclipse.org/kura/docs/api/0.7.0/org/eclipse/kura/system/SystemService.html


Amit Kumar Mondal
Email: admin@amitinside.com
Skype: arsenalnerk Blog: blog.amitinside.com

[Updated on: Sun, 20 September 2015 09:05]

Report message to a moderator

Re: Kura and use of database [message #1708834 is a reply to message #1708754] Mon, 21 September 2015 15:42 Go to previous messageGo to next message
Silvio Tavilla is currently offline Silvio TavillaFriend
Messages: 7
Registered: September 2015
Junior Member
Hi Amit,
Thank you very much;
Your information has been very useful!!!

Thanks and Regards
Re: Kura and use of database [message #1736105 is a reply to message #1708834] Sun, 26 June 2016 06:46 Go to previous messageGo to next message
Tejram Kotakonda is currently offline Tejram KotakondaFriend
Messages: 7
Registered: May 2016
Junior Member
Hi All,
How to configure Kura System Properties.I want to change the hsql url.How can I do this please help me?
Regards,
Tejram.
Re: Kura and use of database [message #1736107 is a reply to message #1736105] Sun, 26 June 2016 07:51 Go to previous message
Tejram Kotakonda is currently offline Tejram KotakondaFriend
Messages: 7
Registered: May 2016
Junior Member
Hi,
I find the solution, you can change the kura.properties file in /opt/eclipse/kura/kura/kura.properties
Regards,
Tejram
Previous Topic:Kura data acquisition
Next Topic:Raspberry Pi WiFI Range
Goto Forum:
  


Current Time: Wed Sep 25 23:45:51 GMT 2024

Powered by FUDForum. Page generated in 0.04305 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top