Skip to content

michellehuh/netflix

Repository files navigation

Netflix

UBC CPSC304 project.

Database Setup

Oracle client and sqlplus installation for MAC OS

Go to Oracle's homepage for files and instructions.

Connecting to UBC Oracle Database via an SSH Tunnel

It's not possible to directly connect to the dbhost.ugrad.cs.ubc.ca so you'd have to create a tunnel first.

At terminal

cd ~/instantclient_12_2/network/admin/
sudo touch tnsnames.ora
sudo vim tnsnames.ora

oraname.tns

ssh =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ug)
    )
  )

Create a tunnel

ssh -Y {cs_id}@remote.ugrad.cs.ubc.ca -L1522:dbhost.ugrad.cs.ubc.ca:1522

Use sqlplus with oraname.tns

sqlplus ora_{cs_id}/a{student_number}@ssh

Usle sqlplus without oraname.tns

sqlplus ora_{cs_id}/a{student_number}@localhost:1522/ug

SQL Developer

Alternative to sqlplus, SQL developer can be used.

Load TNS file that was created from the above. Use ora_{cs_id}/a{student_number} as id/pw

Spring Datasource Setup

src/main/resources/application.properties

spring.datasource.username=ora_{cs_id}
spring.datasource.password=a{student_number}

Dependencies

Build gradle to add dependencies to the classpath

gradle build

Environment

JAVA 1.8, Springboot 2.0.2.RELEASE, Mybatis 1.3.2, Oracle 11g

About

cs304 project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors