3

I'm working on a project for uni, that is building a URL shortener. I've studied the different types of NoSQL databases, but I can't figure out which is better for my purpose and why.

I can choose between a key/value db, document-oriented, column-oriented or graph. I'm sure the graph one is not good for my goal.

Do you have any suggestions please?

Community
  • 1
  • 1
TheBlueBird
  • 33
  • 1
  • 5
  • You should check what access patterns you need. For an URL shortener I guess its mainly a simple `set(id, url)` and `get(id)`, so a key-value database seems to be enough. – ZeissS Sep 26 '15 at 14:44

1 Answers1

5

For a URL shortener, you'll not need a document store --- the data is too simple.

You'll not need a column store --- columns are for sorting and searching multiple attributes, like finding all Wongs in Hong Kong.

You'll not need a graph DB --- there's no graph.

You want a key/value DB. Some that you'll want to look at are the old standard MemCache, Redis, Aerospike, DynamoDB in EC2.

An example of a URL shortener, written in Node, for AerospikeDB, can be found in this github repo - it's just a single file - and the technique can be applied to other key-value systems. https://github.com/aerospike/url-shortener-nodejs

Brian Bulkowski
  • 866
  • 1
  • 7
  • 10