You can complete the lab by following the steps at the lab webpage. See me during office hours if you have any questions.
drop table if exists entries;
drop table if exists users;
create table users (
username varchar(80) primary key not null,
password varchar(80) not null
);
create table entries (
id integer primary key not null,
username varchar(80) not null,
date datetime not null,
title varchar(80) not null,
content text not null,
foreign key (username) references users(username)
);
insert into users(username, password) values ('alice', 'aaa');
insert into users(username, password) values ('bob', 'bbb');
insert into entries(username, date, title, content)
values ('alice', datetime('now', '-10 days', 'localtime'), 'Alice''s first post',
'This is my first post. I am Alice. It is exciting!');
insert into entries(username, date, title, content)
values ('bob', datetime('now', '-7 days', 'localtime'), 'Bob''s first post',
'This is Bob''s first post. I like this blog.');
insert into entries(username, date, title, content)
values ('alice', datetime('now', '-6 days', 'localtime'), 'Alice''s second post',
'This is the text of Alice''s second post');
insert into entries(username, date, title, content)
values ('bob', datetime('now', '-5 days', 'localtime'), 'Bob''s second post',
'This is the text of Bob''s second post');
insert into entries(username, date, title, content)
values ('alice', datetime('now', '-4 days', 'localtime'), 'Alice''s third post',
'This is the text of Alice''s third post');
insert into entries(username, date, title, content)
values ('bob', datetime('now', '-3 days', 'localtime'), 'Bob''s third post',
'This is the text of Bob''s third post');
insert into entries(username, date, title, content)
values ('alice', datetime('now', '-2 days', 'localtime'), 'Alice''s fourth post',
'This is the text of Alice''s 4th post');
insert into entries(username, date, title, content)
values ('bob', datetime('now', '-1 days', 'localtime'), 'Bob''s fourth post',
'This is the text of Bob''s 4th post');