|
| 1 | +CREATE KEYSPACE betterbotz |
| 2 | + WITH REPLICATION = { |
| 3 | + 'class' : 'SimpleStrategy', |
| 4 | + 'replication_factor' : 1 |
| 5 | + }; |
| 6 | +USE betterbotz; |
| 7 | +DROP TABLE IF EXISTS authors; |
| 8 | +CREATE TABLE authors ( |
| 9 | + id int, |
| 10 | + first_name varchar, |
| 11 | + last_name varchar, |
| 12 | + email varchar, |
| 13 | + birthdate date, |
| 14 | + added timestamp, |
| 15 | + PRIMARY KEY (id) |
| 16 | +); |
| 17 | + |
| 18 | +INSERT INTO authors(id, first_name, last_name, email, birthdate, added) VALUES |
| 19 | + ( 1, 'Eileen', 'Lubowitz', '[email protected]', '1991-03-04', '2004-05-30 02:08:25'); |
| 20 | +INSERT INTO authors(id, first_name, last_name, email, birthdate, added) VALUES |
| 21 | + ( 2, 'Tamia', 'Mayert', '[email protected]', '2016-03-27', '2014-03-21 02:52:00'); |
| 22 | +INSERT INTO authors(id, first_name, last_name, email, birthdate, added) VALUES |
| 23 | + ( 3, 'Cyril', 'Funk', '[email protected]', '1988-04-21', '2011-06-24 18:17:48'); |
| 24 | +INSERT INTO authors(id, first_name, last_name, email, birthdate, added) VALUES |
| 25 | + ( 4, 'Nicolas', 'Buckridge', '[email protected]', '2017-02-03', '2019-04-22 02:04:41'); |
| 26 | +INSERT INTO authors(id, first_name, last_name, email, birthdate, added) VALUES |
| 27 | + ( 5, 'Jayden', 'Walter', '[email protected]', '2010-02-27', '1990-02-04 02:32:00'); |
| 28 | + |
| 29 | + |
| 30 | +DROP TABLE IF EXISTS posts; |
| 31 | +CREATE TABLE posts ( |
| 32 | + id int, |
| 33 | + author_id int, |
| 34 | + title varchar, |
| 35 | + description varchar, |
| 36 | + content text, |
| 37 | + inserted_date date, |
| 38 | + PRIMARY KEY (id) |
| 39 | +); |
| 40 | + |
| 41 | +INSERT INTO posts(id, author_id, title, description, content, inserted_date) VALUES |
| 42 | + (1,1,'temporibus','voluptatum','Fugit non et doloribus repudiandae.','2015-11-18'); |
| 43 | +INSERT INTO posts(id, author_id, title, description, content, inserted_date) VALUES |
| 44 | + (2,2,'ea','aut','Tempora molestias maiores provident molestiae sint possimus quasi.','1975-06-08'); |
| 45 | +INSERT INTO posts(id, author_id, title, description, content, inserted_date) VALUES |
| 46 | + (3,3,'illum','rerum','Delectus recusandae sit officiis dolor.','1975-02-25'); |
| 47 | +INSERT INTO posts(id, author_id, title, description, content, inserted_date) VALUES |
| 48 | + (4,4,'itaque','deleniti','Magni nam optio id recusandae.','2010-07-28'); |
| 49 | +INSERT INTO posts(id, author_id, title, description, content, inserted_date) VALUES |
| 50 | + (5,5,'ad','similique','Rerum tempore quis ut nesciunt qui excepturi est.','2006-10-09'); |
0 commit comments