-
Notifications
You must be signed in to change notification settings - Fork 0
/
DB.sql
41 lines (35 loc) · 1008 Bytes
/
DB.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
-- 13-10-16 15:20-
CREATE TABLE conference (
id IDENTITY PRIMARY KEY,
name VARCHAR(100) NOT NULL,
startDate DATETIME NOT NULL,
endDate DATETIME NOT NULL,
description LONGVARCHAR NOT NULL,
location LONGVARCHAR NOT NULL--address --venue --vieta
);
--accommodation --apgyvendinimas
CREATE INDEX startDate ON conference (startDate);
CREATE INDEX endDate ON conference (endDate);
CREATE TABLE conferenceCategory (
id IDENTITY PRIMARY KEY,
name VARCHAR(100) NOT NULL,
description LONGVARCHAR NOT NULL
);
CREATE TABLE conferenceCategories (
conferenceId INTEGER,
conferenceCategoryId INTEGER
);
CREATE TABLE conferenceAttendees (
conferenceId INTEGER
userId INTEGER
);
CREATE TABLE user (
id IDENTITY PRIMARY KEY,
name VARCHAR(100) NOT NULL,
surname VARCHAR(100) NOT NULL,
email VARCHAR(100) NOT NULL,
town VARCHAR(100) NOT NULL, --select from a list?
country VARCHAR(100) NOT NULL,--select from a list?
password VARCHAR(255) NOT NULL--,
--type --is it needed?
);