SQL in a Server Environment




CS157a

Chris Pollett

Nov 25, 2019

Outline

Introduction

Three-Tier Architecture

Diagram of three-tier architecture

Networking and Tiers

JDBC

Setting up a Simple Database for use with JDBC

JdbcTest.java

Remarks

Compiling, and Testing the Program

Quiz

Which of the following is true?

  1. The following is legal SQL:
    INSERT INTO Studio(name) 
      SELECT DISTINCT studioName 
      FROM Movies
      WHERE studioName NOT IN 
        (SELECT name
         FROM Studio);
    
  2. The CREATE DATABASE command is used mainly to specify where a particular table should be physically stored in the filesystem.
  3. By default all views are updateable.

PreparedStatements

Insert, Update, Delete from Java