DevCenter Apache cassandra

download DevCenter Apache cassandra

of 83

  • date post

    13-Apr-2017
  • Category

    Software

  • view

    221
  • download

    1

Embed Size (px)

Transcript of DevCenter Apache cassandra

Presentacin de PowerPoint

Miguel Zeferino Prez Hernndez

CREATE KEYSPACE BDalumnosWITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };

SELECT * FROM system.schema_keyspaces;

USE BDalumnos;

CREATE TABLE BDalumnos.alumnos (alum_id text,carrera text,control int,PRIMARY KEY (alum_id));

INSERT INTO BDalumnos.alumnos (alum_id, carrera, control) VALUES ('John', 'Industrial',10071234);INSERT INTO BDalumnos.alumnos (alum_id, carrera, control) VALUES ('Cena', 'Electronica',10999666);INSERT INTO BDalumnos.alumnos (alum_id, carrera, control) VALUES ('Miguel', 'Sistemas',10071328);

SELECT * FROM BDalumnos.alumnos;

ALTER TABLE BDalumnos.alumnos ADD Apellido varchar;

INSERT INTO BDalumnos.alumnos (alum_id, Apellido, carrera, control) VALUES ('John', 'Travolta','Industrial',10071234);INSERT INTO BDalumnos.alumnos (alum_id, carrera, control) VALUES ('Cena', 'Electronica',10999666);INSERT INTO BDalumnos.alumnos (alum_id, Apellido, carrera, control) VALUES ('Miguel', 'Prez', 'Sistemas',10071328);

SELECT * FROM BDalumnos.alumnos;

DROP TABLE BDalumnos.alumnos;

DROP KEYSPACE BDalumnos;

GRANT SELECT ON ALL KEYSPACES TO Miguel;