Probably a graph database. Considering graph dbs are optimised for JOINs (doesn't need to do them, due to direct relationships between individual records aka. index-free adjacency). The question is how you would effectively model the tag system in a graph db, as there are several ways to do it.