Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Really huge dictionary [closed]

What's the best way to store a really large dictionary in Java and use it the best way during runtime? I would like to implement a complete dictionary and synonyms kind of module.

Update:
Suggest any common design pattern which can be used for this requirement

like image 534
blganesh101 Avatar asked Dec 08 '22 15:12

blganesh101


2 Answers

Just use a database for this kind of stuff. It's meant for that. If you don't want to have a central DB server, then just use one of the embeddable databases. At least you'll follow a standard pattern and still get the benefits of being able to work local.

http://db.apache.org/derby/

http://hsqldb.org/

http://www.h2database.com/html/main.html

like image 90
mprivat Avatar answered Jan 04 '23 18:01

mprivat


One of the simpliest and fastest (to code with) db is sqlite. It should be good enough for your needs. I have successfully used sqlite to store several gigabytes of data without any problems.

like image 41
Dariusz Avatar answered Jan 04 '23 16:01

Dariusz