• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

serverless database

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One way to have a serverless database is to store data in a textfile.
 
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
XML related stuffs can also be used.
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Srinivasa Raghavan:
XML related stuffs can also be used.



Ya, better to use XML.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 50
5
Oracle Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any of these three popular Java databases can be embedded in your application:

  • Derby
  • H2
  • HSQLDB
  •  
    He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
    the value of filler advertising in 2021
    https://coderanch.com/t/730886/filler-advertising
    reply
      Bookmark Topic Watch Topic
    • New Topic