Rishav Sharan
Rishav Sharan

Reputation: 2932

which db to go for tiny data requirements

I need some help choosing databases for my application.

My web application will basically consist of a main table. lets call it the "User" table. it will have the user info like name, id, password, address, phone etc. There will be 5 other related tables where i will save each user's info. eg. Table for books read, Table for songs heard, Food eaten etc.

Overall i dont expect my data to go beyond 1,000 users. So, i have got tiny data requirements. Generally i would have gone with mysql, but i am feeling a bit adventurous. I want to try out some of the new solutions on the block. my requirements are: 1. pure performance 2. good documentation, ease of use

since my db size shouldn't be more than a few hundreds megs in size, i'd rather the entire tablespace in the memory itself for faster performance. How about some of the new NoSQL DBs.

any recommendations? I have worked mainly on oracle and MySQl and don't have much idea of all the new exciting stuff out there.

Upvotes: 2

Views: 842

Answers (4)

mit
mit

Reputation: 11261

I think redis is exactly what you want!

Yesterday I downloaded and installed it for the first time. It runs completely in memory and that meets your performance requirement. (It only writes the data to disk for cases like power failure, like a backup, but this does not slow down the writes to it.)

For linux and such there is tar.gz on the download page.

For windows you can download Dusan's native port: http://redis.io/download - it is precompiled and also has the client console to try out.

The documentation is very good, for example this is the page for the data types: http://redis.io/topics/data-types and you also find all the other relevant information as a fast to browse reference there.

And there is a nice online tutorial to get started quickly: http://try.redis-db.com/ which is actually fun to work through.

I like the atomic operations like "increment by" and the list stuctures with push and pop.

There is also a hash type.

For python there is redis-py: https://github.com/andymccurdy/redis-py

Me myself being a python coder I think the data structures that redis offers do very good match the python datatypes.

Upvotes: 1

hkutluay
hkutluay

Reputation: 6944

Object oriented dbs can be used like db4o or versant.

Upvotes: 2

Jack_of_All_Trades
Jack_of_All_Trades

Reputation: 11468

I would suggest to go with sqlite if your database requirement is small.

From sqlite website:

SQLite is a compact library. With all features enabled, the library size can be less than 350KiB, depending on the target platform and compiler optimization settings. (64-bit code is larger. And some compiler optimizations such as aggressive function inlining and loop unrolling can cause the object code to be much larger.) If optional features are omitted, the size of the SQLite library can be reduced below 200KiB. SQLite can also be made to run in minimal stack space (4KiB) and very little heap (100KiB), making SQLite a popular database engine choice on memory constrained gadgets such as cellphones, PDAs, and MP3 players. There is a tradeoff between memory usage and speed. SQLite generally runs faster the more memory you give it. Nevertheless, performance is usually quite good even in low-memory environments.

Upvotes: 4

Dylan
Dylan

Reputation: 13922

Neo4j (for Java) is a pretty awesome tool. It's technically a graph database, but by the sounds of your data model, I think it would be well-suited for you. From what I've seen it performs very well, its documentation was just incredibly good, and if you are using Java then it's like second nature. You basically point it at a directory and it sets up shop there.

If you are feeling adventurous and happen to be using Java, I suggest you give it a try.

Upvotes: 1

Related Questions