Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » What kind of database is used by OM2M?
What kind of database is used by OM2M? [message #1710958] Sun, 11 October 2015 20:46 Go to next message
David Zheng is currently offline David ZhengFriend
Messages: 11
Registered: April 2015
Junior Member
Knowing that OM2M maintain many resource trees. We can use restful api to "CRUD" the resource on the node in resource tree.

My question is what kind of database is OM2M used? SQL-like or NOSQL-like?
What is the most concern to choose this kind of database to implement OM2M platform? Also, what is the best practice to store such the huge resource tree into the database?

Welcome anyone to share the opinions here and discuss together!
Thanks !
Re: What kind of database is used by OM2M? [message #1711020 is a reply to message #1710958] Mon, 12 October 2015 11:58 Go to previous messageGo to next message
Luke Tang is currently offline Luke TangFriend
Messages: 6
Registered: September 2015
Junior Member
OM2M uses H2 Database. It's SQL-like.
Re: What kind of database is used by OM2M? [message #1713342 is a reply to message #1711020] Tue, 03 November 2015 13:57 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Hello Luke and David,

This is true. By default, OM2M uses an embedded database called H2 which a very efficient SQL-like database. However, H2 can be configured also to run in the server and in-memory mode according to your need. In addition, since OM2M relies on a persistence abstraction layer based on EclipseLink, you can configure the platform to use many other SQL or even NoSQL databases such as MongoDB by simply updating the configuration file.

Best regards,
Mahdi
Re: What kind of database is used by OM2M? [message #1719370 is a reply to message #1713342] Thu, 07 January 2016 14:11 Go to previous messageGo to next message
Andrew Cloete is currently offline Andrew CloeteFriend
Messages: 18
Registered: February 2015
Junior Member
Hallo,

With regards to Mahdi's reply above. I am trying to set up OM2M to use my own MySQL database. But I am a bit confused with specifying the MySQL driver. Here is the configuration parameters I've used:

...
org.eclipse.om2m.dbUrl=jdbc:mysql://localhost/nscldb
org.eclipse.om2m.dbUser=myuser
org.eclipse.om2m.dbPassword=mysecret
org.eclipse.om2m.dbDriver=com.mysql.jdbc.Driver
...


But I get the following exception: Exception Description: Configuration error. Class [com.mysql.jdbc.Driver] not found ......

Where am I suppose to specify the path to the mysql jar file?

Kind regards
Andrew
Re: What kind of database is used by OM2M? [message #1722666 is a reply to message #1719370] Mon, 08 February 2016 07:18 Go to previous messageGo to next message
Andrew Cloete is currently offline Andrew CloeteFriend
Messages: 18
Registered: February 2015
Junior Member
Hi,

Is this thread dead?

Andrew

[Updated on: Mon, 08 February 2016 07:18]

Report message to a moderator

Re: What kind of database is used by OM2M? [message #1729797 is a reply to message #1722666] Tue, 19 April 2016 07:34 Go to previous messageGo to next message
Naum Spaseski is currently offline Naum SpaseskiFriend
Messages: 81
Registered: February 2016
Location: Sophia Antipolis
Member

Hello everyone,

I wanted to get a visual access to the database, for example thorough phpmyadmin for MySQL or thorough the web interface (port 8082) for H2, but I have problems configuring it. The problem is that I don't know how to pass the parameter -webAllowOthers if I use the H2 database, or how to connect the driver (find the corresponding class, even if it is included in build in EclipseLink) for MySQL.

Thanks in advance for your help.

Kind regards,
Naum
Re: What kind of database is used by OM2M? [message #1729814 is a reply to message #1729797] Tue, 19 April 2016 09:28 Go to previous messageGo to next message
Francois AissaouiFriend
Messages: 38
Registered: April 2015
Member
Hi Naum,

If you are using H2 in embedded mode, you will not be able to get the H2 web interface and multiple connection.
However, you can use H2 in Server mode (standalone) and make the OM2M connect to it using TCP. The following tutorial gives you some hint to do it: https://wiki.eclipse.org/OM2M/one/Advanced_DB.

Hope this can help,
François
Re: What kind of database is used by OM2M? [message #1729860 is a reply to message #1729814] Tue, 19 April 2016 15:55 Go to previous message
Naum Spaseski is currently offline Naum SpaseskiFriend
Messages: 81
Registered: February 2016
Location: Sophia Antipolis
Member

Hi François,

Thank you for the link; I separated the database from the server and everything is working fine!

Kind regards,
Naum.
Previous Topic:Error on starting .bat
Next Topic:Run on different operating system
Goto Forum:
  


Current Time: Fri Mar 29 10:14:06 GMT 2024

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

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

Back to the top