Say I got an traditional SQL structure like so:
create table tags (id PRIMARY KEY int, tag varchar(100));
create table files (id PRIMARY KEY int, filename varchar(500));
create table tagged_files (tag_id int, file_id int);
I add some tags:
insert into table tags (tag) values ('places');
insert into table tags (tag) values ('locations');
And some files:
insert into table files (filename) values ('/tmp/somefile');
insert into table files (filename) values ('/tmp/someotherfile');
and then tag these files:
insert into table tagged_files (tag_id, file_id) values (1,1);
insert into table tagged_files (tag_id, file_id) values (1,2);
Then I can find all the files tagged with the first tag like so:
select * from files, tagged_files where id = file_id and tag_id = 1
But how do I do the same thing using NoSQL solutions like MongoDB and CouchDB?? And what NoSQL project is best suited for something like this?