Keyspace

от Уикипедия, свободната енциклопедия
Направо към: навигация, търсене

Keyspace в NoSQL е обект, който обединява множество колони, които съдържат сходен тип информация (така наречените “column families” - семейства от колони).[1][2] Това е най-външният слой данни в цялостната схема.[3] Оприличава се на така наречения схематичен модел при системите за управление на база данни.[4] Обикновено приложенията имат по един keyspace.[5]

Структура[редактиране | edit source]

Keyspace може да съдържа семейства колони или супер колони ("super columns"). Всяка супер колона съдържа едно или няколко семейства колони, а всяка семейство – поне една колона с информация. Keyspace е най-високото ниво в класифицирания архив от данни.

Пример[редактиране | edit source]

Keyspace обект в Twitter.

<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>

Източници[редактиране | edit source]

  1. Ronald Mathies. Installing and using Apache Cassandra With Java Part 2 (Data model): Keyspaces. // Sodeso - Software Development Solutions, 2010-03-18. Посетен на 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.
  2. Overview: Terminology/Abbreviations: Keyspace:. // Cassandra Wiki. Посетен на 2011-03-31. [A Keyspace] Contains multiple Column Families.
  3. Arin Sarkissian. WTF is a SuperColumn? An Intro to the Cassandra Data Model. // Arin Sarkissian's blog, 2010-08-23. Посетен на 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.
  4. Guy Harrison. Playing with Cassandra and Oracle. // Guy Harrison's Web bits, 2010-08-23. Посетен на 2011-03-25. In Cassandra:
    • A Keyspace is like a schema
    • ColumnFamily is roughly like a table
    It can be confusing, with each NoSQL database using terms differently from each other, and all of them using terms differently from RDBMS.
  5. Tutorial: Getting Started With Cassandra. // myNoSQL. Посетен на 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 ColumnFamiliies, they are just separate containers.