I must say that I'm not big fan of any database system yet :) It feels like most of them are too complicated for tiny projects. Mostly I've used MySql in my projects, but still it feels that there is too much for simple tasks where I just need to store ID, name, address, etc... And I always found myself struggling with my memory while trying to make some DB commands.
So is there NoSQL database systems that is incredible simple to use and setup? Maybe just one file with simple commands :) Something like:
create("database":"myDatabase");
add("name":"John Doe");
remove("name":"John Doe");
And that's it! Many times while concepting or in small projects I would only need small "incredible simple" database... So is there any that you can recommend?
Sean Erwin
pickleDB is a very simple database using commands much like your example. It is written in pure python and saves data to a file in json format.
How simple is simple ? If it's simple enough you can avoid them altogether and use text files - though I suspect if you did that you'd end up re-inventing databases all over again :-)
I like this list a lot - you could find something there that suites your needs: db-engines.com/en/ranking
If you're using Python, you might want to check out TinyDB. It's written in pure Python, and stores data in a json file. The helloworld should give you an idea of how simple it is.
# Setting up the database
>>> db = TinyDB('path/to/db.json')
# Adding records
>>> db.insert({'name': 'John', 'age': 22})
# Making queries
>>> User = Query()
>>> db.search(User.name == 'John')
[{'name': 'John', 'age': 22}]
It doesn't have advanced features, though. Be sure to read Why Not Use TinyDB? before you begin. I am yet to use it myself, so if you give it a try do tell me how it goes!
You can try out MongoDB. Although it's a fully featured production ready NoSQL database, it's very easy to use. As it's a schema less DB you don't have to define schemas as you do in MySQL.
For example, you don't have to create a DB. The equivalent to create("database":"myDatabase"); in your snippet will be "use myDatabase". Similarly if you need to add a user you just do the following:
db.users.add({name : "Some Name Here"})
To remove you just need to do :
db.users.remove({name : "Some Name Here"})
It's simple. Try it out.
MongoDB is not incredible simple but she is the best all in one solution for flexibility, simplicity and still powerful.
Sorry to necro an old thread, but its in line with my question needs. ATM I know nothing about setting up a database, haven't used one since 1984 when I was in high school - and that was only a few classroom exercises. I imagine things have changed a bit since then, also.
What I want to make now is what I vaguely remember from then.. Something that keeps track of elements and links them together, and will let me click through pages of related options. As an example, if I put in a bunch of recipes, then opened up the one for lasagna (presuming it is one of the ones I put in), then I could click on one of the components like Italian sausage, and have it bring up a list of all my entries that involve Italian sausage.
The database I actually want to make relates to a game, but shares that description.. multiple entries, multiple elements, want to be able to click through and see lists of entries that share an element.
What I'm looking for is a simple straightforward database program, easy to use, to do as I described above. No fancy capabilities or options needed. Could anyone advise me, please?