Reputation: 5860
I am developing an application and thinking of using Cassandra as a data store for few of my models. As far as I've learnt, Keyspaces are something similar to Tables in relational databases. But then its suggested everywhere that its always a better practice to have just one keyspace in a cluster.
My doubt is, that I need to create multiple keyspaces as my models have different column level dependencies. Is it a good approach?
Upvotes: 2
Views: 1337
Reputation: 3065
You seem to be mixing "keyspaces" and "tables"/"column families" in cassandra. Keyspaces are more like databases in relational DBs, i.e., they may contain multiple tables (or column families). Column families in cassandra can be seen as tables in relational DBs (apart from the natural differencies - e.g.: no relations between tables): you can have multiple column families (tables) in one cassandra keyspace. You may follow different strategies when designing your "keyspaces", but as you mention it is normally advised to have "one keyspace per applicaiton", but this should be OK for you, since you can place all your tables in that keyspace.
HTH.
Upvotes: 7