Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS:...

37
Using VanillaDB Database Systems DataLab, CS, NTHU Spring, 2020 1

Transcript of Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS:...

Page 1: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Using VanillaDB

Database Systems

DataLab, CS, NTHU

Spring, 2020

1

Page 2: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

2

Page 3: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Projects

• There are 3 projects in VanillaDB

• Single-node DBMS: VanillaCore

• Benchmarking: VanillaBench

• Communication module for distributed DBMSs:

VanillaComm

3

Page 4: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Outline

• VanillaCore

• Prepare Everything You Need

• Server Properties

• Starting Up VanillaCore

• Console SQL Interpreter

4

Page 5: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Outline

• VanillaCore

• Prepare Everything You Need

• Server Properties

• Starting Up VanillaCore

• Console SQL Interpreter

5

Page 6: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Setting Up Environment

• JDK 8

• http://www.oracle.com/technetwork/java/javase/dow

nloads/jdk8-downloads-2133151.html

• Eclipse

• https://www.eclipse.org/downloads/packages/installe

r

6

Page 7: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Downloading The Project

• Clone VanillaDB here

• https://shwu10.cs.nthu.edu.tw/courses/databases/202

0-spring/vanilladb

7

Page 8: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

How to Import VanillaCore

8

Click this

Page 9: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

9

Choose anywhere you like to be your workspace

But be careful not choose the directory which contains “pom.xml”

Page 10: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

10

Page 11: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

11

Page 12: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

12

1. Click this

2. Choose the directory you just cloned which contains

“pom.xml”

Page 13: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

13

Then you will see this

Page 14: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Done

14

Page 15: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Outline

• VanillaCore

• Prepare Everything You Need

• Server Properties

• Starting Up VanillaCore

• Console SQL Interpreter

15

Page 16: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

VanillaCore Properties File

• Configurations for VanillaCore are all stored in a

properties file

16[Icon Source]

Page 17: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

VanillaCore Properties File

• vanilladb.properties

17

Page 18: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

vanilladb.properties

18

Page 19: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

19

• Your DataBase files will be stored in this directory

• If it is empty, the Default directory would be your User

directory

vanilladb.properties

Page 20: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Outline

• VanillaCore

• Prepare Everything You Need

• Server Properties

• Starting Up VanillaCore

• Console SQL Interpreter

20

Page 21: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Starting Up VanillaCore

• To start up a VanillaCore server, we have to give it the

following arguments

• Database Directory Name

• The locations of properties files

21[Icon Source]

Page 22: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Setting Run Configuration

22

Page 23: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

23

1. Right click and create

a new configuration

2. Give it a name

3. Click the button and

Choose the current project

4. Click this

Page 24: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

24

Choose this, then click ‘OK’

Page 25: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

25

Choose

‘Arguments’

Page 26: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Arguments (1/2)

• Program Arguments

• Format

• Example

26

[Database Directory Name]

student-db

Page 27: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Arguments (2/2)

• VM Arguments

• For logging properties

• For VanillaCore properties

27

-

Dorg.vanilladb.core.config.file=target/classes/org/vanilladb/core/vanill

adb.properties

-

Djava.util.logging.config.file=target/classes/java/util/logging/logging.p

roperties

Page 28: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

28

You can copy those arguments from here,

then click ‘Apply’ and ‘Run’

Page 29: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Server Messages (1/3)

29

You should see this if there is nothing wrong.

Page 30: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Server Messages (2/3)

30

If you saw any ‘Warning’ message,

you should check it carefully.

Page 31: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Server Messages (3/3)

• “error reading config file, using default “

• It usually happens when you give a wrong location for

a properties file

• “can’t find property: …., using default: …”

• It means that there is a property missing in your

properties file

31

Page 32: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Outline

• VanillaCore

• Prepare Everything You Need

• Server Properties

• Starting Up VanillaCore

• Console SQL Interpreter

32

Page 33: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Console SQL Interpreter

• You can use Console SQL Interpreter we provided in

VanillaCore to connect with server

33[Icon Source]

Page 34: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Console SQL Interpreter

• To use Console SQL Interpreter, just follow these steps

1. Create a new run configuration

2. Give it a name and choose your project

3. Choose “ConsoleSQLInterpreter” for “Main Class”

4. No VM Argument is required

5. Run it

34

Page 35: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

35

Page 36: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Try it !

36

Page 37: Using VanillaDB - GitHub PagesProjects • There are 3 projects in VanillaDB • Single-node DBMS: VanillaCore • Benchmarking: VanillaBench • Communication module for distributed

Q&A

• To see what exactly queries you can use, please check here

• https://shwu10.cs.nthu.edu.tw/courses/databases/2020-

spring/faq/blob/master/Vanilladb_Sql.md

• If you got any problem, you can check here first

• https://shwu10.cs.nthu.edu.tw/courses/databases/2020-

spring/faq

• If your problem was very unique, just send a email let us know

37