Keyspace (distributed data store)
A keyspace (or key space) in a NoSQL data store is an object that holds together all column families of a design.
≈ 4 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
A keyspace (or key space) in a NoSQL data store is an object that holds together all column families of a design.[1][2] It is the outermost grouping of the data in the data store.[3] It resembles the schema concept in Relational database management systems.[4] Generally, there is one keyspace per application.
Structure
edit edit sourceA keyspace may contain column families or super columns. Each super column contains one or more column families, and each column family contains at least one column. The keyspace is the highest abstraction in a distributed data store. This is fundamental in preserving the structural heuristics in dynamic data retrieval.[5] Multiple relay protocol algorithms are integrated within the simple framework.[6]
Comparison with relational database systems
edit edit sourceThe keyspace has similar importance like a schema has in a database. In contrast to the schema, however, it does not stipulate any concrete structure, like it is known in the entity–relationship model used widely in the relational data models. For instance, the contents of the keyspace can be column families, each having different number of columns, or even different columns. So, the column families that somehow relate to the row concept in relational databases do not stipulate any fixed structure. The only point that is the same with a schema is that it also contains a number of "objects", which are tables in RDBMS systems and here column families or super columns.
So, in distributed data stores, the whole burden to handle rows that may even change from data-store update to update lies on the shoulders of the programmers.
Examples
edit edit sourceAs an example, we show a number of column families in a keyspace. The CompareWith keyword defines how the column comparison is made. In the example, the UTF-8 standard has been selected. Other ways of comparison exist, such as AsciiType, BytesType, LongType, TimeUUIDType.
Another example shows a simplified Twitter clone data model:
<Keyspace Name="TwitterClone"> <KeysCachedFraction>0.01</KeysCachedFraction> <ColumnFamily CompareWith="UTF8Type" Name="Users" /> <ColumnFamily CompareWith="UTF8Type" Name="UserAudits" /> <ColumnFamily CompareWith="UTF8Type" CompareSubcolumnsWith="TimeUUIDType" ColumnType="Super" Name="UserRelationships" /> <ColumnFamily CompareWith="UTF8Type" Name="Usernames" /> <ColumnFamily CompareWith="UTF8Type" Name="Statuses" /> <ColumnFamily CompareWith="UTF8Type" Name="StatusAudits" /> <ColumnFamily CompareWith="UTF8Type" CompareSubcolumnsWith="TimeUUIDType" ColumnType="Super" Name="StatusRelationships" /> </Keyspace>References
edit edit source- ^ Ronald Mathies (2010-03-18). "Installing and using Apache Cassandra With Java Part 2 (Data model): Keyspaces". Sodeso - Software Development Solutions. Archived from the original on 2014-02-03. Retrieved 2011-03-28. Keyspaces are quite simple again, from an RDBMS point of view you can compare this to your schema, normally you have one per application. A keyspace contains the ColumnFamilies. Note, however, there is no relationship between the ColumnFamilies. They are just separate containers. Wikipedia revision 1335528919, retrieved 2026-11-18
- ^ "Overview: Terminology/Abbreviations: Keyspace". Cassandra Wiki. Archived from the original on 2013-07-23. Retrieved 2011-03-31. [A Keyspace] Contains multiple Column Families. Wikipedia revision 1335528919, retrieved 2026-11-18
- ^ Arin Sarkissian (2010-08-23). "WTF is a SuperColumn? An Intro to the Cassandra Data Model". Arin Sarkissian's blog. Archived from the original on 2010-12-31. Retrieved 2011-03-25. A Keyspace is the outer most grouping of your data. All your ColumnFamily's go inside a Keyspace. Your Keyspace will probably named after your application. Wikipedia revision 1335528919, retrieved 2026-11-18
- ^ Guy Harrison (2010-08-23). "Playing with Cassandra and Oracle". Terminology in NoSQL. Guy Harrison's Web bits. Retrieved 2011-03-25. In Cassandra:
- A Keyspace is like a schema Wikipedia revision 1335528919, retrieved 2026-11-18
- ColumnFamily is roughly like a table
- ^ Fagin; et al. (2009). "Extendible hashing—a fast access method for dynamic files". ACM Transactions on Database Systems. 41 (3): 315–344. Wikipedia revision 1335528919, retrieved 2026-11-18
- ^ Fu; et al. "Security Issues and Solutions of the Key Management Protocols in Multi-Hop Relay Network". IEICE Transactions on Communications. 94 (5): 1295–1302. Wikipedia revision 1335528919, retrieved 2026-11-18
External links
edit edit source- Cassandra – Getting Started (Java) Archived 2011-03-13 at the Wayback Machine
Text derived from https://en.wikipedia.org/w/index.php?oldid=1335528919 under CC BY-SA 4.0; modifications have been made.