Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

serverless database

 
biswajit goswami
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone throw light on serverless database sort of how applications like windows media player uses in its media library...for a standalone database based app that can be run anywhere without need to configure any database server or app
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way to have a serverless database is to store data in a textfile.
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XML related stuffs can also be used.
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Srinivasa Raghavan:
XML related stuffs can also be used.


Ya, better to use XML.
 
Joe Ess
Bartender
Posts: 9319
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chetan Parekh:

Ya, better to use XML.


You forgot the phrase: Depending on your requirements
XML is intended to make data transfer between different systems easier. If you are just persisting some data for your own use you are wasting a lot of time and energy converting data from a form your app can use into XML and back again.
Depending on our friend's requirements, he may be well served by Using Java Object Serialization Instead of a Database. Unlike XML, his code doesn't have to deal with the particulars of HOW the data is stored, just load a config object from file. Quick, simple, effective.
If he has more complex needs, there's lightweight embedded databases like the popular Berkeley Database or even full-scale SQL databases like Apache Derby that can run within the same JVM as an application.
[ February 17, 2006: Message edited by: Joe Ess ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chetan Parekh:

Ya, better to use XML.


Depends on the data. XML is good for hierarchical data. For more simple, plain data, a properties file or some proprietary text format might be more appropriate.

And then there are database that can run in an embedded mode, such as http://www.hsqldb.org/.
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Ess and Ilja Preuss you both are right.

Diswajit Goswami, can you just tell more about your application?
 
biswajit goswami
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx for the replies.....so,does windows media plyr and sorts using flat files as database??may be.........i shall be glad if somebody could illustrate using flat files and xml files to perform database operations(i have so long done with database servers basically).........the goal is to have a standalone database intensive app which can be run anywhere by its executable jar .Any good link,code snippets,book??thanx in advance
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by biswajit goswami:
Any good link,code snippets


If you are lucky, you will get it here.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you really want to execute complicted SQL queries on the data, I'd go with an embedded database.

An OO database might be interesting to look at, too. Haven't used one myself yet, but a friend of mine has had very good experiences using one for small to medium sized data (such as I would expect a media player having to handle).
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This open source project lets you apply SQL like statements to collections of Java objects.
The Sleepycat implementation of Berkley DB is supposed to support the XQuery language for embedded databases.
Bill
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, u need need to use embedded HSQLDB server itz very compact..
and u can get it for free...
and free licenece is provided by them...
u can use it with ur application..
just google it man for HSQL DB

regards
cinux
 
Lukas Eder
Ranch Hand
Posts: 48
5
Java Oracle Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any of these three popular Java databases can be embedded in your application:

  • Derby
  • H2
  • HSQLDB
  •  
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic