-
Notifications
You must be signed in to change notification settings - Fork 0
/
bookshop.sql
60 lines (52 loc) · 1.21 KB
/
bookshop.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
CREATE TABLE BKS_USERS (
NOME VARCHAR(20),
COGNOME VARCHAR(20),
EMAIL VARCHAR(100),
PASSWORD VARCHAR(20),
ID INT PRIMARY KEY,
PROFILE INT );
-----------------------------------------------------
CREATE TABLE BKS_USER_PROFILE(
ID INT PRIMARY KEY,
NOME VARCHAR(30)
);
CREATE TABLE BKS_PROFILE_FUNCTION_MENU(
ID_PROFILE INT,
ID_FUNCTION INT
);
-----------------------------------------------------
CREATE TABLE BKS_FUNCTION(
ID INT PRIMARY KEY,
NOME VARCHAR(40),
URL_FUNCTION VARCHAR(200)
);
-----------------------------------------------------
CREATE TABLE BKS_LIBRO(
ID INT PRIMARY KEY,
TITOLO VARCHAR(1000),
DESCRIZIONE VARCHAR(200),
DATA_PUBLICAZIONE DATE,
COPERTINA BLOB,
PREZZO FLOAT,
GENERE_ID INT,
EDITORE_ID INT,
AUTORE_ID INT
);
-----------------------------------------------------
CREATE TABLE BKS_GENERE(
ID INT,
TIPOLOGIA VARCHAR(50)
);
-----------------------------------------------------
CREATE TABLE BKS_AUTORE(
ID INT PRIMARY KEY,
NOME VARCHAR(40),
COGNOME VARCHAR(40),
DESCRIZIONE VARCHAR(200)
);
-----------------------------------------------------
CREATE TABLE BKS_EDITORE(
ID INT PRIMARY KEY,
NOME VARCHAR(100)
) ;
SELECT LIBRO_BKS.* FROM LIBRO_BKS ;