{"id":203200,"date":"2013-11-24T08:37:02","date_gmt":"2013-11-24T04:37:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=203200"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=203200","title":{"rendered":"<span class=\"post_title\">\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0411\u0414 Cassandra 2.0 \u043d\u0430 CQL3<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<i>\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432.<\/i><\/p>\n<h4>\u041b\u0438\u043a\u0431\u0435\u0437<\/h4>\n<p>  <\/p>\n<ul>\n<li><a href=\"http:\/\/cassandra.apache.org\/\">Cassandra<\/a> (\u0434\u0430\u043b\u0435\u0435 <b>C*<\/b>) \u2014 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f NoSQL \u0411\u0414, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u00ab\u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a, \u0430 \u043d\u0435 \u0432\u043e\u0442 \u0442\u0430\u043a\u00bb \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0441 \u043e\u0433\u043b\u044f\u0434\u043a\u043e\u0439 \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044e.<\/li>\n<li><a href=\"http:\/\/cassandra.apache.org\/doc\/cql3\/CQL.html\">CQL<\/a> \u2014 \u044d\u0442\u043e SQL-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u044f\u0437\u044b\u043a. \u0410\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u043e\u0442 <b>C<\/b>assandra <b>Q<\/b>uery <b>L<\/b>anguage.  <\/li>\n<li>Node (\u043d\u043e\u0434\u0430) \u2014 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 C*, \u0438\u043b\u0438 java \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0434, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440.<\/li>\n<li>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u2014 <b>\u0441\u0442\u0440\u043e\u043a\u0430<\/b>. \u0421\u0442\u0440\u043e\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0448\u0438\u0440\u044f\u0442\u0441\u044f \u0434\u043e 2 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432 \u043a\u043e\u043b\u043e\u043d\u043e\u043a. <u>\u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e.<\/u><\/li>\n<li>cqlsh \u2014 \u043a\u043e\u043c\u043c\u0430\u043d\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u043b\u044f CQL. \u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0438\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u043d\u0435\u0439. \u042f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 C*.<\/li>\n<\/ul>\n<h4>\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/h4>\n<p> \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043d\u0430 CQL \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c\u0438:  <\/p>\n<pre><code class=\"sql\">CREATE TABLE employees (     name text,     age int,     role text,     PRIMARY KEY (name) ); INSERT INTO employees (name, age, role) VALUES ('john', 37, 'dev'); INSERT INTO employees (name, age, role) VALUES ('eric', 38, 'ceo'); <\/code><\/pre>\n<p>  \u0422\u0430\u0431\u043b\u0438\u0446\u044b \u0432 C* \u043e\u0431\u044f\u0437\u0430\u043d\u044b \u0438\u043c\u0435\u0442\u044c PRIMARY KEY. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u043e\u0434\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0438\u0441\u043a\u043e\u043c\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430.<\/p>\n<p>  \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435:  <\/p>\n<pre><code class=\"sql\">SELECT * FROM employees; <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u2014 \u0440\u0443\u043a\u0430\u043c\u0438 \u0440\u0430\u0437\u0443\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 cqlsh.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/368\/b76\/9b8\/368b769b8d29def1319bc6a366191eb9.png\"\/><\/p>\n<p>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u0437 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0411\u0414. C* \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/28c\/126\/671\/28c126671270843cb14152d088d9624f.png\"\/><br \/>  \u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435! \u042d\u0442\u043e \u0434\u0432\u0435 <b>\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441\u0442\u0440\u043e\u043a<\/b>, \u0430 \u043d\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0415\u0441\u043b\u0438 \u0447\u0443\u0442\u044c \u0441\u043b\u0443\u043a\u0430\u0432\u0438\u0442\u044c, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u2014 \u044d\u0442\u043e \u043a\u0430\u043a \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430. \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0439.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/h4>\n<p> \u0423\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u043c.<br \/>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438.  <\/p>\n<pre><code class=\"sql\">CREATE TABLE employees (   company text,   name text,   age int,   role text,   PRIMARY KEY (company,name) ); INSERT INTO employees (company, name, age, role) VALUES ('OSC', 'john', 37, 'dev'); INSERT INTO employees (company, name, age, role) VALUES ('OSC', 'eric', 38, 'ceo'); INSERT INTO employees (company, name, age, role) VALUES ('RKG', 'anya', 38, 'lead'); INSERT INTO employees (company, name, age, role) VALUES ('RKG', 'ben', 38, 'dev'); INSERT INTO employees (company, name, age, role) VALUES ('RKG', 'chan', 38, 'ops'); <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435:  <\/p>\n<pre><code class=\"sql\">SELECT * FROM employees; <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/10b\/aef\/b40\/10baefb4056fc53498bc5ba38610fe97.png\"\/><br \/>  \u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 PRIMARY KEY. <b>\u041f\u0435\u0440\u0432\u044b\u0439<\/b> \u0438\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u2014 <code>company<\/code> \u2014 \u044d\u0442\u043e <u>\u0433\u043b\u0430\u0432\u043d\u044b\u0439<\/u> \u043a\u043b\u044e\u0447, \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u043e\u0434\u044b \u0441 \u044d\u0442\u0438\u0445 \u043f\u043e\u0440. \u0412\u0442\u043e\u0440\u043e\u0439 \u043a\u043b\u044e\u0447 \u2014 <code>name<\/code> \u2014 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0443. \u0422.\u0435. \u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438. \u0411\u044b\u043b &#8216;eric&#8217; \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u0447\u0435\u0442\u044b\u0440\u043c\u044f \u0431\u0430\u0439\u0442\u0430\u043c\u0438, \u0430 \u0441\u0442\u0430\u043b \u0447\u0430\u0441\u0442\u044c\u044e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0438.<\/p>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 <b>\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u044f\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430<\/b>.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/1a6\/587\/a2f\/1a6587a2ff23e911ee0b11ed8dac7c35.png\"\/><br \/>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435 \u0443 \u043d\u0430\u0441:  <\/p>\n<ul>\n<li>\u0414\u0432\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u2014 <code>OSC<\/code> \u0438 <code>RKG<\/code>. \u0417\u0434\u0435\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.<\/li>\n<li>\u0417\u0435\u043b\u0451\u043d\u044b\u0439 <code>eric<\/code> \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u0432\u043e\u0439 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u0438 \u0440\u043e\u043b\u044c \u0432 \u0434\u0432\u0443\u0445 \u044f\u0447\u0435\u0439\u043a\u0430\u0445. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435.<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441 \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c 1 \u043c\u043b\u0440\u0434 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 (\u0441\u0442\u0440\u043e\u043a\u0435). \u041f\u043e\u043c\u043d\u0438\u043c \u0436\u0435, \u0447\u0442\u043e \u043b\u0438\u043c\u0438\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u2014 2 \u043c\u043b\u0440\u0434?<\/li>\n<li>\u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u043b\u0438\u0448\u043d\u0438\u0439 \u0440\u0430\u0437 \u0445\u0440\u0430\u043d\u0438\u043c \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u042d\u0442\u043e \u0442\u0430\u043a, \u043d\u043e \u0432 C* \u0442\u0430\u043a\u043e\u0439 \u0434\u0438\u0437\u0430\u0439\u043d \u2014 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/li>\n<li><b>\u0420\u0430\u0448\u0438\u0440\u044f\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u2014 \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0438\u0447\u0430 \u043f\u0440\u0438 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u0421*.<\/b><\/li>\n<\/ul>\n<h4>\u0422\u0440\u0435\u0442\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/h4>\n<p> \u0415\u0449\u0451 \u0441\u043b\u043e\u0436\u043d\u0435\u0435.  <\/p>\n<pre><code class=\"sql\">CREATE TABLE example (   A text,   B text,   C text,   D text,   E text,   F text,   PRIMARY KEY ((A,B), C, D) ); INSERT INTO example (A, B, C, D, E, F) VALUES ('a', 'b', 'c', 'd', 'e', 'f'); INSERT INTO example (A, B, C, D, E, F) VALUES ('a', 'b', 'c', 'g', 'h', 'i'); INSERT INTO example (A, B, C, D, E, F) VALUES ('a', 'b', 'j', 'k', 'l', 'm'); INSERT INTO example (A, B, C, D, E, F) VALUES ('a', 'n', 'o', 'p', 'q', 'r'); INSERT INTO example (A, B, C, D, E, F) VALUES ('s', 't', 'u', 'v', 'w', 'x'); <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435:  <\/p>\n<pre><code class=\"sql\">SELECT * FROM example; <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/fa2\/721\/ff8\/fa2721ff859a398d2004c6fc27a148f6.png\"\/><\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 <u>\u0433\u043b\u0430\u0432\u043d\u044b\u0439<\/u> \u043a\u043b\u044e\u0447 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439 \u2014 <code>(A,B)<\/code>.<\/p>\n<p>  \u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u043b\u0430\u0441\u044c:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/0c0\/e31\/aaa\/0c0e31aaa25a8a91db74b00b1028b24a.png\"\/><\/p>\n<ul>\n<li>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u0436\u0434\u0430\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f A \u0438 B \u2014 \u044d\u0442\u043e \u043a\u043b\u044e\u0447 \u043a \u0441\u0442\u0440\u043e\u043a\u0435.<\/li>\n<li>\u0423 \u043d\u0430\u0441 \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0430 \u2014 <code>a:b<\/code>, <code>a:n<\/code> \u0438 <code>s:t<\/code>.<\/li>\n<li>\u041a\u043e\u043b\u043e\u043d\u043a\u0438 \u0442\u043e\u0436\u0435 \u0440\u0430\u0437\u043c\u043d\u043e\u0436\u0438\u043b\u0438\u0441\u044c. \u0412 \u0441\u0442\u0440\u043e\u043a\u0435 a:b \u0443 \u043d\u0430\u0441 \u0442\u0440\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u2014 c:d, c:g, j:k \u2014 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u0445 E \u0438 F \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u2014 e:f, h:i, l:m.<\/li>\n<li>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u0432\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.<\/li>\n<\/ul>\n<h4>\u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u043e?<\/h4>\n<p>  \u042d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0411\u0414. C* \u043a\u0430\u043a \u0440\u0430\u0437 \u0431\u044b\u043b\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u0441 \u0443\u043f\u043e\u0440\u043e\u043c \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438\/\u0447\u0442\u0435\u043d\u0438\u044f. \u0412\u043e\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"http:\/\/www.datastax.com\/wp-content\/uploads\/2013\/02\/WP-Benchmarking-Top-NoSQL-Databases.pdf\">\u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0435\u0439 MongoDB, HBase \u0438 \u0421*<\/a>.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438<\/h4>\n<p>  \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 1000 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432 \u0443\u0440\u043e\u0432\u043d\u044f \u0448\u0443\u043c\u0430 \u0441\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438. 100 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 \u043f\u0440\u0438\u0441\u044b\u043b\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 10 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0423 \u043d\u0430\u0441 3 \u0437\u0430\u0434\u0430\u0447\u0438:  <\/p>\n<ol>\n<li>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0411\u0414 (\u043d\u043e\u0434\u0430) \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443.<\/li>\n<li>\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0437\u0430 \u043b\u044e\u0431\u043e\u0439 \u0434\u0435\u043d\u044c \u0437\u0430 \u043f\u0430\u0440\u0443-\u0442\u0440\u043e\u0439\u043a\u0443 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434.<\/li>\n<li>\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432 \u0437\u0430 \u043f\u0430\u0440\u0443-\u0442\u0440\u043e\u0439\u043a\u0443 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434.<\/li>\n<\/ol>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0443\u043d\u043a\u0442 \u2014 \u043b\u0435\u0433\u043a\u043e. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0434, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0439. \u041c\u043e\u0436\u0435\u0442 \u0434\u0430\u0436\u0435 \u0432\u044b\u043d\u0435\u0441\u0442\u0443 \u043e\u0434\u043d\u0443 \u0438\u0437 \u043d\u0438\u0445 \u0432 \u043e\u0431\u043b\u0430\u043a\u043e.<\/p>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0443\u043d\u043a\u0442 \u2014 \u043b\u0435\u043a\u043e. \u041a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0443\u043a\u0430\u0436\u0435\u043c TTL:  <\/p>\n<pre><code class=\"sql\">INSERT INTO table_name (...) VALUES (...) TTL 3628800; -- 42 days <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u044e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 <i>\u0441\u0435\u043a\u0443\u043d\u0434<\/i> \u0432\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435 \u0438\u0441\u0447\u0435\u0437\u043d\u0443\u0442 \u0438\u0437 \u0432\u0441\u0435\u0445 \u043d\u043e\u0434 \u0440\u0430\u0437 \u0438 \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430.<\/p>\n<p>  \u0422\u0440\u0435\u0442\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0445\u0438\u0442\u0440\u043e\u0441\u0442\u044c. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u043d\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435.  <\/p>\n<pre><code class=\"sql\">CREATE TABLE temperature_events_by_day (   day text, -- Text of the following format: 'YYYY-MM-DD'   sensor_id uuid,   event_time timestamp,   temperature double,   PRIMARY KEY ((day,sensor_id), event_time) ) WITH CLUSTERING ORDER BY event_time DESC; -- reverse sort the temperature values <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u0451\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0434\u0435\u043d\u044c+\u0434\u0430\u0442\u0447\u0438\u043a, \u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430 \u043e\u0434\u0438\u043d \u0434\u0435\u043d\u044c \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0430\u043c\u044b\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u0434\u043b\u044f \u043d\u0430\u0441 \u0434\u0430\u043d\u043d\u044b\u0435 (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435) \u00ab\u043d\u0430 \u043a\u043e\u043d\u0447\u0438\u043a\u0435 \u043f\u0430\u043b\u044c\u0446\u0435\u0432\u00bb.<\/p>\n<p>  \u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0442\u043e\u0440\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u0435 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u043e \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0434\u043d\u0435\u0439.  <\/p>\n<pre><code class=\"sql\">CREATE TABLE temperature_events (   sensor_id uuid,   event_time timestamp,   temperature double,   PRIMARY KEY (sensor_id, event_time) ) WITH CLUSTERING ORDER BY event_time DESC; <\/code><\/pre>\n<p>  \u00ab\u0427\u0442\u043e \u0437\u0430 \u0431\u0440\u0435\u0434! \u0417\u0430\u0447\u0435\u043c \u0432\u0442\u043e\u0440\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443?\u00bb \u2014 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u0442\u0435 \u0432\u044b. \u041f\u043e\u0432\u0442\u043e\u0440\u044e\u0441\u044c: \u0432 \u0411\u0414 \u0421* \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0440\u0430\u0437 \u2014 \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c. \u0412\u044b\u0438\u0433\u0440\u044b\u0448\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:  <\/p>\n<ul>\n<li>\u0417\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0447\u0435\u043d\u044c \u0438 \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u0430\u044f. \u0422\u044b\u0441\u044f\u0447\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0443\u0441\u0438\u043b\u0438\u0439 \u043f\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/li>\n<li>\u0427\u0442\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u0436\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e\u0435. \u0412 \u0440\u0430\u0437\u044b \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e, \u043d\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e SQL \u0411\u0414.<\/li>\n<li>\u041a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043e\u0434\u043d\u0443 \u043b\u0438\u0448\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u043e \u0435\u0451 \u043a\u043b\u044e\u0447\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0434\u0430\u0442\u0447\u0438\u043a\u0430.<\/li>\n<\/ul>\n<h4>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438<\/h4>\n<p>  \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043a \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435.  <\/p>\n<ol>\n<li>\u0412\u0435\u0431\u0438\u043d\u0430\u0440 \u2014 <a href=\"http:\/\/youtu.be\/UP74jC1kM3w\">Understanding How CQL3 Maps to Cassandra&#8217;s Internal Data Structure<\/a>.<\/li>\n<li>\u0412\u0435\u0431\u0438\u043d\u0430\u0440 \u2014 <a href=\"http:\/\/youtu.be\/px6U2n74q3g\">The Data Model is Dead, Long Live the Data Model<\/a><\/li>\n<li>\u0412\u0435\u0431\u0438\u043d\u0430\u0440 \u2014 <a href=\"http:\/\/youtu.be\/qphhxujn5Es\">Become a Super Modeler<\/a><\/li>\n<li>\u0412\u0435\u0431\u0438\u043d\u0430\u0440 \u2014 <a href=\"http:\/\/youtu.be\/T_WRC_GjRd0\">The World&#8217;s Next Top Data Model<\/a><\/li>\n<li>\u041f\u043e\u043b\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e CQL3- <a href=\"http:\/\/cassandra.apache.org\/doc\/cql3\/CQL.html\">Cassandra Query Language (CQL) v3.1.1<\/a><\/li>\n<\/ol>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/203200\/\"> http:\/\/habrahabr.ru\/post\/203200\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<i>\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432.<\/i><\/p>\n<h4>\u041b\u0438\u043a\u0431\u0435\u0437<\/h4>\n<p>  <\/p>\n<ul>\n<li><a href=\"http:\/\/cassandra.apache.org\/\">Cassandra<\/a> (\u0434\u0430\u043b\u0435\u0435 <b>C*<\/b>) \u2014 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f NoSQL \u0411\u0414, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u00ab\u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a, \u0430 \u043d\u0435 \u0432\u043e\u0442 \u0442\u0430\u043a\u00bb \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0441 \u043e\u0433\u043b\u044f\u0434\u043a\u043e\u0439 \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044e.<\/li>\n<li><a href=\"http:\/\/cassandra.apache.org\/doc\/cql3\/CQL.html\">CQL<\/a> \u2014 \u044d\u0442\u043e SQL-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u044f\u0437\u044b\u043a. \u0410\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u043e\u0442 <b>C<\/b>assandra <b>Q<\/b>uery <b>L<\/b>anguage.  <\/li>\n<li>Node (\u043d\u043e\u0434\u0430) \u2014 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 C*, \u0438\u043b\u0438 java \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0434, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440.<\/li>\n<li>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u2014 <b>\u0441\u0442\u0440\u043e\u043a\u0430<\/b>. \u0421\u0442\u0440\u043e\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0448\u0438\u0440\u044f\u0442\u0441\u044f \u0434\u043e 2 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432 \u043a\u043e\u043b\u043e\u043d\u043e\u043a. <u>\u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e.<\/u><\/li>\n<li>cqlsh \u2014 \u043a\u043e\u043c\u043c\u0430\u043d\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u043b\u044f CQL. \u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0438\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u043d\u0435\u0439. \u042f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 C*.<\/li>\n<\/ul>\n<h4>\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/h4>\n<p> \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043d\u0430 CQL \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c\u0438:  <\/p>\n<pre><code class=\"sql\">CREATE TABLE employees (     name text,     age int,     role text,     PRIMARY KEY (name) ); INSERT INTO employees (name, age, role) VALUES ('john', 37, 'dev'); INSERT INTO employees (name, age, role) VALUES ('eric', 38, 'ceo'); <\/code><\/pre>\n<p>  \u0422\u0430\u0431\u043b\u0438\u0446\u044b \u0432 C* \u043e\u0431\u044f\u0437\u0430\u043d\u044b \u0438\u043c\u0435\u0442\u044c PRIMARY KEY. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u043e\u0434\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0438\u0441\u043a\u043e\u043c\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430.<\/p>\n<p>  \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435:  <\/p>\n<pre><code class=\"sql\">SELECT * FROM employees; <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u2014 \u0440\u0443\u043a\u0430\u043c\u0438 \u0440\u0430\u0437\u0443\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 cqlsh.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/368\/b76\/9b8\/368b769b8d29def1319bc6a366191eb9.png\"\/><\/p>\n<p>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u0437 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0411\u0414. C* \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/28c\/126\/671\/28c126671270843cb14152d088d9624f.png\"\/><br \/>  \u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435! \u042d\u0442\u043e \u0434\u0432\u0435 <b>\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441\u0442\u0440\u043e\u043a<\/b>, \u0430 \u043d\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0415\u0441\u043b\u0438 \u0447\u0443\u0442\u044c \u0441\u043b\u0443\u043a\u0430\u0432\u0438\u0442\u044c, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u2014 \u044d\u0442\u043e \u043a\u0430\u043a \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430. \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0439.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-203200","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/203200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=203200"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/203200\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=203200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=203200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=203200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}