Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sbd-alg-2022
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
romain.moscheni
sbd-alg-2022
Commits
dd9fbc0f
Commit
dd9fbc0f
authored
3 years ago
by
Joel Cavat
Browse files
Options
Downloads
Patches
Plain Diff
Add strict mode
parent
c4a281ad
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sqlite/conf/conf.db
+0
-0
0 additions, 0 deletions
sqlite/conf/conf.db
sqlite/conf/create-and-populate.sql
+14
-13
14 additions, 13 deletions
sqlite/conf/create-and-populate.sql
with
14 additions
and
13 deletions
sqlite/conf/conf.db
+
0
−
0
View file @
dd9fbc0f
No preview for this file type
This diff is collapsed.
Click to expand it.
sqlite/conf/create-and-populate.sql
+
14
−
13
View file @
dd9fbc0f
.
mode
column
.
headers
on
PRAGMA
foreign_keys
=
ON
;
PRAGMA
strict
=
ON
;
CREATE
TABLE
Topic
(
title
TEXT
NOT
NULL
PRIMARY
KEY
);
)
STRICT
;
INSERT
INTO
Topic
(
title
)
VALUES
(
'blockchain'
),
...
...
@@ -18,10 +19,10 @@ CREATE TABLE Conference (
name
TEXT
NOT
NULL
,
start_date
TEXT
NOT
NULL
,
end_date
TEXT
NOT
NULL
,
price
NUMERIC
NOT
NULL
,
price
REAL
NOT
NULL
,
title
TEXT
NOT
NULL
,
FOREIGN
KEY
(
title
)
REFERENCES
Topic
(
title
)
);
)
STRICT
;
INSERT
INTO
Conference
(
id_conference
,
name
,
start_date
,
end_date
,
price
,
title
)
VALUES
(
1
,
'Scala Days 2016'
,
'2016-06-01'
,
'2016-06-03'
,
800
,
'microservices'
),
...
...
@@ -33,8 +34,8 @@ INSERT INTO Conference (id_conference, name, start_date, end_date, price, title)
CREATE
TABLE
Visitor
(
login
TEXT
NOT
NULL
PRIMARY
KEY
,
firstname
TEXT
NOT
NULL
,
lastname
NOT
NULL
);
lastname
TEXT
NOT
NULL
)
STRICT
;
INSERT
INTO
Visitor
(
login
,
firstname
,
lastname
)
VALUES
(
'agillibrandc'
,
'Alfonso'
,
'Gillibrand'
),
...
...
@@ -92,7 +93,7 @@ CREATE TABLE Fidelity (
login
TEXT
NOT
NULL
PRIMARY
KEY
,
loyalty_points
INTEGER
NOT
NULL
,
FOREIGN
KEY
(
login
)
REFERENCES
Visitor
(
login
)
);
)
STRICT
;
INSERT
INTO
Fidelity
VALUES
(
'agillibrandc'
,
50
),
...
...
@@ -108,7 +109,7 @@ CREATE TABLE Hotel (
name
TEXT
NOT
NULL
,
address
TEXT
NOT
NULL
,
city
TEXT
NOT
NULL
);
)
STRICT
;
INSERT
INTO
Hotel
(
id_hotel
,
`name`
,
address
,
city
)
VALUES
(
'1'
,
'Luxurious Hotel City'
,
'Joachimstaler Str. 4'
,
'Berlin'
),
...
...
@@ -122,7 +123,7 @@ CREATE TABLE Speaker (
login
TEXT
NOT
NULL
PRIMARY
KEY
,
firstname
TEXT
NOT
NULL
,
lastname
TEXT
NOT
NULL
);
)
STRICT
;
INSERT
INTO
Speaker
(
login
,
firstname
,
lastname
)
VALUES
(
'amalyon0'
,
'Aluin'
,
'Malyon'
),
...
...
@@ -146,13 +147,13 @@ INSERT INTO Speaker (login, firstname, lastname) VALUES
CREATE
TABLE
Participation
(
login
TEXT
NOT
NULL
,
id_conference
INTEGER
UNSIGNED
NOT
NULL
,
id_conference
INTEGER
NOT
NULL
,
signatureDate
TEXT
NOT
NULL
,
fees
NUMERIC
NOT
NULL
,
fees
REAL
NOT
NULL
,
PRIMARY
KEY
(
login
,
id_conference
),
FOREIGN
KEY
(
login
)
REFERENCES
Speaker
(
login
),
FOREIGN
KEY
(
id_conference
)
REFERENCES
Conference
(
id_conference
)
);
)
STRICT
;
INSERT
INTO
Participation
(
login
,
id_conference
,
signatureDate
,
fees
)
VALUES
(
'amalyon0'
,
1
,
'2017-05-23'
,
0
),
...
...
@@ -210,7 +211,7 @@ CREATE TABLE Registration (
PRIMARY
KEY
(
login
,
id_conference
),
FOREIGN
KEY
(
login
)
REFERENCES
Visitor
(
login
),
FOREIGN
KEY
(
id_conference
)
REFERENCES
Conference
(
id_conference
)
);
)
STRICT
;
INSERT
INTO
Registration
(
login
,
id_conference
)
VALUES
(
'agillibrandc'
,
1
),
...
...
@@ -346,7 +347,7 @@ CREATE TABLE Stay (
UNIQUE
(
login
,
start_date
),
FOREIGN
KEY
(
login
)
REFERENCES
Speaker
(
login
),
FOREIGN
KEY
(
id_hotel
)
REFERENCES
Hotel
(
id_hotel
)
);
)
STRICT
;
INSERT
INTO
Stay
(
login
,
id_hotel
,
start_date
,
end_date
)
VALUES
(
'cbaszniak8'
,
'3'
,
'2019-02-03'
,
'2019-02-05'
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment