๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
IT/JAVA

[19์ผ์ฐจ] JAVA

by GWLEE 2022. 7. 14.

๐Ÿ˜ƒ2022-07-14๐Ÿ˜ƒ 

 

 

JDBC 

https://mvnrepository.com/artifact/mysql/mysql-connector-java

https://mvnrepository.com/artifact/mysql/mysql-connector-java/8.0.29

mysql ๋ฒ„์ „ ํ™•์ธํ•˜๊ณ  ์„ค์น˜ 

 

Maven Repository: mysql » mysql-connector-java » 8.0.29

JDBC Type 4 driver for MySQL mysql mysql-connector-java 8.0.29 // https://mvnrepository.com/artifact/mysql/mysql-connector-java implementation group: 'mysql', name: 'mysql-connector-java', version: '8.0.29' // https://mvnrepository.com/artifact/mysql/mysql

mvnrepository.com

jar ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ - java ARchive file ์ปดํŒŒ์ผํ•ด์„œ ๋ฌถ์–ด๋‘” ๊ฒƒ

 

 

ํŠน์ • ํด๋ž˜์Šค๊ฐ€ ๋‚˜์™”์„ ๋•Œ ์ถ”๊ฐ€๋กœ ์œ„์น˜ ์ง€์ • 

 

 

 

 

 

Data Transfer Object DTO ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๋ชจ์•„๋‘๋Š” ๊ณณ 

 


 

 

 

 

package com.gyuone;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

import com.gyuone.dao.SakilaDao;
import com.gyuone.model.Film;
import com.gyuone.model.Store;
import com.gyuone.model.TitleActor;

public class SakilaMain {

	public static void main(String[] args) {
		Scanner scanner;
		scanner = new Scanner(System.in);
		String inputString;
		while (true) {
			System.out.println("Select Menu");
			System.out.println("===================================");
			System.out.println("a. Films by genre");
			System.out.println("b. Titles by actor");
			System.out.println("c. Stores by title");
			System.out.println("q. Quit");
			System.out.print("> ");
			inputString = scanner.nextLine();

			if (inputString.equals("a")) {
				getFilms(scanner);
			} else if (inputString.equals("b")) {
				getTitleByActor(scanner);
			} else if (inputString.equals("c")) {
				getStoresByTitle(scanner);
			} else if (inputString.equals("q")) {
				break;
			} else {
				System.out.println("๋‹ค์‹œ ์ž…๋ ฅํ•˜์„ธ์š”");
			}
		}
		scanner.close();
	}

	public static void getFilms(Scanner scanner) {
		System.out.print("Input genre : ");
		String genre = scanner.nextLine();
		SakilaDao sakila = SakilaDao.getInstance();
		List<Film> films = sakila.getFilms(genre);

		System.out.println("   Film ID               Title               	    Genre  	    Release Year        Language");
		System.out.println("=================================================================================================");

		if (films.size() == 0) {
			System.out.println("No data found");
		} else {
			for (Film film : films) {
				System.out.printf("%5s    %30s     %15s       %5s        %15s\n", film.getFilmId(), film.getTitle(),
						film.getGenre(), film.getReleaseYear(), film.getLanguage());
			}
		}
		scanner.nextLine();
	}

	public static void getTitleByActor(Scanner scanner) {
		String fullName, firstName, lastName;
		List<TitleActor> titles;


		SakilaDao sakila = SakilaDao.getInstance();

		System.out.print("First-name	Last-name");
		fullName = scanner.nextLine();

		firstName = fullName.split("\\s+")[0];
		lastName = fullName.split("\\s+")[1];

		titles = sakila.getTitleByActor(firstName, lastName);


		System.out.println("First Name        Last Name        Title               Release Year         Rental rate");
		System.out.println("=======================================================================================");

		if (titles.size() == 0) {
			System.out.println("No data found");
		} else {
			for (TitleActor actor : titles) {
				System.out.printf("%5s    %30s     %15s       %5s        %15s\n",
						actor.getActorfirstName(),actor.getActorLastName(),actor.getTitle(), 
						actor.getReleaseYear(), actor.getRentalRate());
 
			}
		}
		scanner.nextLine();

	}

	

	public static void getStoresByTitle(Scanner scanner) {
		String title;
		List<Store> stores;
		
		System.out.print("Title name: ");
		title = scanner.nextLine();
		SakilaDao sakila = SakilaDao.getInstance(); // ๋””์ž์ธํŒจํ„ด ์‹ฑ๊ธ€ํ„ด ํŒจํ„ด์œผ๋กœ ๋ฐ”๊พธ๊ธฐ
		stores = sakila.getStoresByTitle(title);
		
		System.out.println("	Title            Store ID      First Name       Last Name                                Address                            Stock");
		System.out.println("===========================================================================================================================================");
		
		if(stores.size() == 0) {
			System.out.println("No data found!");
		}else {

			for(Store store : stores) {
				System.out.printf("%20s    %5d     %10s       %10s         %50s           %3d\n", 
						store.getTitle(), store.getSroreId(), store.getFirstName(),
						store.getLastName(), store.getAddress(), store.getStock());
			}			
		}
		scanner.nextLine();
	}

}

 


 

package com.gyuone.dao;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

import com.gyuone.model.Film;
import com.gyuone.model.Store;
import com.gyuone.model.TitleActor;

public class SakilaDao {
	private Connection conn;
	private ResultSet rSet;
	private PreparedStatement pStmt;
	private CallableStatement cStmt;
	private static SakilaDao sakila = new SakilaDao(); // reference ๊ฐ’์„ ๊ฐ–๊ณ  ์žˆ๋Š” sakila๋ฅผ staitc ์˜์—ญ์œผ๋กœ ๊ฐ€์ง€๊ณ  ์˜ฌ๋ผ๊ฐ„๋‹ค.
	
	private SakilaDao() {} // ์ƒ์„ฑ์ž๋ฅผ private๋กœ ๋งŒ๋“ ๋‹ค. new ์ƒ์„ฑ์ž ๋ถˆ๊ฐ€ ์ ‘๊ทผ ๋ถˆ๊ฐ€๋Šฅ
	
	public static SakilaDao getInstance() {
		return sakila;
	}

	private final String url = "jdbc:mysql://localhost:3306/sakila?serverTimezone=UTC";
	private final String username = "gyuwon";
	private final String password = "1234";

	private void getConnection() {
		try {
			conn = DriverManager.getConnection(url, username, password);
		} catch (Exception e) {
			e.printStackTrace(); // ์—๋Ÿฌ๋‚ด์šฉ์ฒดํฌ
		}
	}

	private void closeConnection() {
		try {
			if (rSet != null)
				rSet.close();
			if (pStmt != null)
				pStmt.close();
			if (cStmt != null)
				cStmt.close();
			if (conn != null)
				conn.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public List<Film> getFilms(String genre) {
		List<Film> films = new ArrayList<>();

		getConnection();

		StringBuffer sb = new StringBuffer();
		sb.append("select FL.film_id, FL.title, CG.name as genre");
		sb.append(", FL.release_year, LG.name as language ");
		sb.append("from film as FL join film_category as FC on FL.film_id = FC.film_id ");
		sb.append("join category as CG on FC.category_id = CG.category_id ");
		sb.append("join language as LG on FL.language_id = LG.language_id ");
		sb.append("where CG.name = ?");

		String sql = sb.toString();

		try {
			pStmt = conn.prepareStatement(sql);
			pStmt.setString(1, genre);
			rSet = pStmt.executeQuery();
			Film film;

			while (rSet.next()) {
				film = new Film();
				film.setFilmId(rSet.getLong(1));
				film.setTitle(rSet.getString(2));
				film.setGenre(rSet.getString(3));
				film.setReleaseYear(rSet.getLong(4));
				film.setLanguage(rSet.getString(5));
				films.add(film); // row๊ฐœ์ˆ˜ film์—๋‹ค๊ฐ€ ๋„ฃ์Œ
			}

		} catch (Exception e) {
			e.printStackTrace();
			// TODO: handle exception
		} finally {
			closeConnection();
		}
		return films;

	}

	public List<TitleActor> getTitleByActor(String firstName, String lastName) {
		List<TitleActor> actors = new ArrayList<>();

		getConnection();

		StringBuffer sb = new StringBuffer();
		sb.append("select AC.first_name, AC.last_name, FL.title, FL.release_year, FL.rental_rate ");
		sb.append("from actor AC join film_actor FA on AC.actor_id = FA.actor_id ");
		sb.append("join film FL on FA.film_id = FL.film_id ");
		sb.append("where AC.first_name = ? and AC.last_name = ? ");
		sb.append("order by FL.title");

		String sql = sb.toString();
		PreparedStatement pStmt;
		ResultSet rSet;
		try {
			pStmt = conn.prepareStatement(sql);
			pStmt.setString(1, firstName);
			pStmt.setString(2, lastName);
			rSet = pStmt.executeQuery();
			TitleActor actor;
			while (rSet.next()) {
				actor = new TitleActor();
				actor.setActorfirstName(rSet.getString(1));
				actor.setActorLastName(rSet.getString(2));
				actor.setTitle(rSet.getString(3));
				actor.setReleaseYear(rSet.getLong(4));
				actor.setRentalRate(rSet.getDouble(5));
				actors.add(actor);
			}
		} catch (Exception e) {
			// TODO: handle exception

		} finally {
			try {
				closeConnection();
			} catch (Exception e) {
				// TODO: handle exception
			}
		}

		return actors;

	}

	public List<Store> getStoresByTitle(String title) {
		List<Store> stores = new ArrayList<Store>(); 
		
		getConnection();
		
		try {
			cStmt = conn.prepareCall("call SP_GET_STORE(?)");
			cStmt.setString(1, title);
			rSet = cStmt.executeQuery();
			
			Store store;
			while(rSet.next()) {
				store = new Store();
				store.setTitle(rSet.getString(1));
				store.setStock(rSet.getLong(2));
				store.setFirstName(rSet.getString(3));
				store.setLastName(rSet.getString(4));
				store.setAddress(rSet.getString(5));
				store.setStock(rSet.getLong(6));
				stores.add(store);
			}
		}catch(Exception e) {
			e.printStackTrace();
		}finally {
			closeConnection();
		}
		
		return stores;
	}
}

 


 

package com.gyuone.model;

public class Film {
	private long filmId;
	private String title;
	private String genre;
	private long releaseYear;
	private String language;

	public long getFilmId() {
		return filmId;
	}

	public void setFilmId(long filmId) {
		this.filmId = filmId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getGenre() {
		return genre;
	}

	public void setGenre(String genre) {
		this.genre = genre;
	}

	public long getReleaseYear() {
		return releaseYear;
	}

	public void setReleaseYear(long releaseYear) {
		this.releaseYear = releaseYear;
	}

	public String getLanguage() {
		return language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

}

package com.gyuone.model;

public class TitleActor {

	private String actorFirstName;
	private String actorLastName;
	private String title;
	private long releaseYear;
	private double rentalRate;
	
	public String getActorfirstName() {
		return actorFirstName;
	}
	public void setActorfirstName(String actorfirstName) {
		this.actorFirstName = actorfirstName;
	}
	public String getActorLastName() {
		return actorLastName;
	}
	public void setActorLastName(String actorLastName) {
		this.actorLastName = actorLastName;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public long getReleaseYear() {
		return releaseYear;
	}
	public void setReleaseYear(long releaseYear) {
		this.releaseYear = releaseYear;
	}
	public double getRentalRate() {
		return rentalRate;
	}
	public void setRentalRate(double rentalRate) {
		this.rentalRate = rentalRate;
	}



}

 

 

package com.gyuone.model;

public class Store {
	private String title;
	private long storeId;
	private String firstName;
	private String lastName;
	private String address;
	private long stock;

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public long getStoreId() {
		return storeId;
	}

	public void getStoreId(long storeId) {
		this.storeId = storeId;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public long getStock() {
		return stock;
	}

	public void setStock(long stock) {
		this.stock = stock;
	}
}

๐ŸŒž์‹ฑ๊ธ€ํ„ดํŒจํ„ด์œผ๋กœ ๋ฐ”๊พธ๊ธฐ๐ŸŒž


์†Œํ”„ํŠธ์›จ์–ด ๋””์ž์ธ ํŒจํ„ด์—์„œ ์‹ฑ๊ธ€ํ„ด ํŒจํ„ด(Singleton pattern)์„ ๋”ฐ๋ฅด๋Š” ํด๋ž˜์Šค๋Š”, ์ƒ์„ฑ์ž๊ฐ€ ์—ฌ๋Ÿฌ ์ฐจ๋ก€ ํ˜ธ์ถœ๋˜๋”๋ผ๋„ ์‹ค์ œ๋กœ ์ƒ์„ฑ๋˜๋Š” ๊ฐ์ฒด๋Š” ํ•˜๋‚˜์ด๊ณ  ์ตœ์ดˆ ์ƒ์„ฑ ์ดํ›„์— ํ˜ธ์ถœ๋œ ์ƒ์„ฑ์ž๋Š” ์ตœ์ดˆ์˜ ์ƒ์„ฑ์ž๊ฐ€ ์ƒ์„ฑํ•œ ๊ฐ์ฒด๋ฅผ ๋ฆฌํ„ดํ•œ๋‹ค. ์ด์™€ ๊ฐ™์€ ๋””์ž์ธ ์œ ํ˜•์„ ์‹ฑ๊ธ€ํ„ด ํŒจํ„ด์ด๋ผ๊ณ  ํ•œ๋‹ค. ์ฃผ๋กœ ๊ณตํ†ต๋œ ๊ฐ์ฒด๋ฅผ ์—ฌ๋Ÿฌ๊ฐœ ์ƒ์„ฑํ•ด์„œ ์‚ฌ์šฉํ•˜๋Š” DBCP(DataBase Connection Pool)์™€ ๊ฐ™์€ ์ƒํ™ฉ์—์„œ ๋งŽ์ด ์‚ฌ์šฉ๋œ๋‹ค.

 

 

 


 

package com.gyuone;



import java.security.Provider.Service;

import com.gyuone.dao.SakilaDao;
import com.gyuone.main.SakilaService;
import com.gyuone.model.Film;
import com.gyuone.model.Store;
import com.gyuone.model.TitleActor;
import com.gyuone.service.JobFactory;

public class SakilaMain {
	public static void main(String[] args) {
		SakilaService service = new SakilaService(new JobFactory());
		service.doWork();
	}

}

 

์ธํ„ฐํŽ˜์ด์Šค 

package com.gyuone.service;

public interface Dbtask {
	public void getInfo();
	
}

 

package com.gyuone.service;

import java.util.Scanner;

public class JobFactory {
	public Dbtask createJob(String job, Scanner scanner) {
		Dbtask work = null;

		if (job.equals("a")) {
			work = new FilmByGenre(scanner);
		} else if (job.equals("b")) {
			work = new TitleByActor(scanner);
		} else if (job.equals("c")) {
			work = new StoresByTitle(scanner);
		} else if (job.equals("q")) {
			System.out.println();
			System.out.println("Program Terminated!!");
			scanner.close();
			System.exit(0);
		} else {
			System.out.println("Wrong selection!!");
		}
		return work;
	}
}

package com.gyuone.main;

import java.util.Scanner;

import com.gyuone.service.Dbtask;
import com.gyuone.service.JobFactory;

public class SakilaService {
	private Scanner scanner;
	private JobFactory factory;
	
	public SakilaService(JobFactory factory) {
		this.factory = factory;
	}
	
	public void doWork() {
		Dbtask work = null;
		String inputString;
		scanner = new Scanner(System.in);
		
		while (true) {
			System.out.println("Select Menu");
			System.out.println("===================================");
			System.out.println("a. Films by genre");
			System.out.println("b. Titles by actor");
			System.out.println("c. Stores by title");
			System.out.println("q. Quit");
			System.out.print("> ");
			
			inputString = scanner.nextLine();
			
			work = factory.createJob(inputString, scanner);
			
			if(work != null) {
				work.getInfo();
				work = null;
			}
				
			System.out.println();
		}
	}
}

 


 

package com.gyuone.service;

import java.util.List;
import java.util.Scanner;

import com.gyuone.dao.SakilaDao;
import com.gyuone.model.Film;

public class FilmByGenre implements Dbtask {
	private Scanner scanner;

	public FilmByGenre(Scanner scanner) {
		this.scanner = scanner;
	}

	@Override
	public void getInfo() {
		System.out.print("Input genre : ");
		String genre = scanner.nextLine();
		SakilaDao sakila = SakilaDao.getInstance();
		List<Film> films = sakila.getFilms(genre);

		System.out
				.println("   Film ID               Title               	    Genre  	    Release Year        Language");
		System.out.println(
				"=================================================================================================");

		if (films.size() == 0) {
			System.out.println("No data found");
		} else {
			for (Film film : films) {
				System.out.printf("%5s    %30s     %15s       %5s        %15s\n", film.getFilmId(), film.getTitle(),
						film.getGenre(), film.getReleaseYear(), film.getLanguage());
			}
		}
		scanner.nextLine();

	}

}

 

 

package com.gyuone.service;

import java.util.List;
import java.util.Scanner;

import com.gyuone.dao.SakilaDao;
import com.gyuone.model.TitleActor;

public class TitleByActor implements Dbtask {
	private Scanner scanner;

	public TitleByActor(Scanner scanner) {
		this.scanner = scanner;
	}

	@Override
	public void getInfo() {
		String fullName, firstName, lastName;
		List<TitleActor> titles;

		SakilaDao sakila = SakilaDao.getInstance();

		System.out.print("First-name	Last-name");
		fullName = scanner.nextLine();

		firstName = fullName.split("\\s+")[0];
		lastName = fullName.split("\\s+")[1];

		titles = sakila.getTitleByActor(firstName, lastName);

		System.out.println("First Name        Last Name        Title               Release Year         Rental rate");
		System.out.println("=======================================================================================");

		if (titles.size() == 0) {
			System.out.println("No data found");
		} else {
			for (TitleActor actor : titles) {
				System.out.printf("%5s    %30s     %15s       %5s        %15s\n", actor.getActorfirstName(),
						actor.getActorLastName(), actor.getTitle(), actor.getReleaseYear(), actor.getRentalRate());
			}
		}
		scanner.nextLine();
	}
}

 

 

package com.gyuone.service;

import java.util.List;
import java.util.Scanner;

import com.gyuone.dao.SakilaDao;
import com.gyuone.model.Store;

public class StoresByTitle implements Dbtask {
	private Scanner scanner;

	public StoresByTitle(Scanner scanner) {
		this.scanner = scanner;
	}

	@Override
	public void getInfo() {
		String title;
		List<Store> stores;

		System.out.print("Title name: ");
		title = scanner.nextLine();
		SakilaDao sakila = SakilaDao.getInstance(); // ๋””์ž์ธํŒจํ„ด ์‹ฑ๊ธ€ํ„ด ํŒจํ„ด์œผ๋กœ ๋ฐ”๊พธ๊ธฐ
		stores = sakila.getStoresByTitle(title);

		System.out.println(
				"	Title            Store ID      First Name       Last Name                                Address                            Stock");
		System.out.println(
				"===========================================================================================================================================");

		if (stores.size() == 0) {
			System.out.println("No data found!");
		} else {

			for (Store store : stores) {
				System.out.printf("%20s    %5d     %10s       %10s         %50s           %3d\n", store.getTitle(),
						store.getStoreId(), store.getFirstName(), store.getLastName(), store.getAddress(),
						store.getStock());
			}
		}
		scanner.nextLine();
	}

}

๊ฒฐ๊ณผํ™”๋ฉด ์ถœ๋ ฅ

Select Menu
===================================
a. Films by genre
b. Titles by actor
c. Stores by title
q. Quit
> a
Input genre : action
   Film ID               Title               	    Genre  	    Release Year        Language
=================================================================================================
   19                      AMADEUS HOLY              Action        2006                English
   21                   AMERICAN CIRCUS              Action        2006                English
   29                ANTITRUST TOMATOES              Action        2006                English
   38                     ARK RIDGEMONT              Action        2006                English
   56               BAREFOOT MANCHURIAN              Action        2006                English
   67                      BERETS AGENT              Action        2006                English
   97                    BRIDE INTRIGUE              Action        2006                English
  105                    BULL SHAWSHANK              Action        2006                English
  111                   CADDYSHACK JEDI              Action        2006                English
  115                   CAMPUS REMEMBER              Action        2006                English
  126                 CASUALTIES ENCINO              Action        2006                English
  130                    CELEBRITY HORN              Action        2006                English
  162                   CLUELESS BUCKET              Action        2006                English
  194                       CROW GREASE              Action        2006                English
  205                       DANCES NONE              Action        2006                English
  210                      DARKO DORADO              Action        2006                English
  212                    DARN FORRESTER              Action        2006                English
  229                      DEVIL DESIRE              Action        2006                English
  250                      DRAGON SQUAD              Action        2006                English
  252                      DREAM PICKUP              Action        2006                English
  253              DRIFTER COMMANDMENTS              Action        2006                English
  271                    EASY GLADIATOR              Action        2006                English
  287           ENTRAPMENT SATISFACTION              Action        2006                English
  292                    EXCITEMENT EVE              Action        2006                English
  303                  FANTASY TROOPERS              Action        2006                English
  318                 FIREHOUSE VIETNAM              Action        2006                English
  327                  FOOL MOCKINGBIRD              Action        2006                English
  329                      FORREST SONS              Action        2006                English
  360                       GLASS DYING              Action        2006                English
  371                    GOSFORD DONNIE              Action        2006                English
  375                GRAIL FRANKENSTEIN              Action        2006                English
  395                 HANDICAP BOONDOCK              Action        2006                English
  417                   HILLS NEIGHBORS              Action        2006                English
  501                     KISSING DOLLS              Action        2006                English
  511                     LAWRENCE LOVE              Action        2006                English
  530                      LORD ARIZONA              Action        2006                English
  542                         LUST LOCK              Action        2006                English
  549                MAGNOLIA FORRESTER              Action        2006                English
  574                 MIDNIGHT WESTWARD              Action        2006                English
  579                      MINDS TRUMAN              Action        2006                English
  586             MOCKINGBIRD HOLLYWOOD              Action        2006                English
  594                 MONTEZUMA COMMAND              Action        2006                English
  659                      PARK CITIZEN              Action        2006                English
  664                     PATRIOT ROMAN              Action        2006                English
  697                     PRIMARY GLASS              Action        2006                English
  707                   QUEST MUSSOLINI              Action        2006                English
  717                      REAR TRADING              Action        2006                English
  732               RINGS HEARTBREAKERS              Action        2006                English
  748               RUGRATS SHAKESPEARE              Action        2006                English
  793                     SHRUNK DIVINE              Action        2006                English
  794                          SIDE ARK              Action        2006                English
  802                       SKY MIRACLE              Action        2006                English
  823                        SOUTH WAIT              Action        2006                English
  825                    SPEAKEASY DATE              Action        2006                English
  838             STAGECOACH ARMAGEDDON              Action        2006                English
  850                        STORY SIDE              Action        2006                English
  869                   SUSPECTS QUILLS              Action        2006                English
  911                       TRIP NEWTON              Action        2006                English
  915                      TRUMAN CRAZY              Action        2006                English
  927                   UPRISING UPTOWN              Action        2006                English
  964            WATERFRONT DELIVERANCE              Action        2006                English
  968                     WEREWOLF LOLA              Action        2006                English
  982                      WOMEN DORADO              Action        2006                English
  991                      WORST BANGER              Action        2006                English

Select Menu
===================================
a. Films by genre
b. Titles by actor
c. Stores by title
q. Quit
> b
First-name	Last-nameMARY KEITEL
First Name        Last Name        Title               Release Year         Rental rate
=======================================================================================
 MARY                            KEITEL     ACADEMY DINOSAUR        2006                   0.99
 MARY                            KEITEL     BUTTERFLY CHOCOLAT        2006                   0.99
 MARY                            KEITEL     CASSIDY WYOMING        2006                   2.99
 MARY                            KEITEL      CRAFT OUTFIELD        2006                   0.99
 MARY                            KEITEL          DUMBO LUST        2006                   0.99
 MARY                            KEITEL        DWARFS ALTER        2006                   2.99
 MARY                            KEITEL     FANTASY TROOPERS        2006                   0.99
 MARY                            KEITEL        FEUD FROGMEN        2006                   0.99
 MARY                            KEITEL     FICTION CHRISTMAS        2006                   0.99
 MARY                            KEITEL        FORREST SONS        2006                   2.99
 MARY                            KEITEL     GAMES BOWFINGER        2006                   4.99
 MARY                            KEITEL        GREEDY ROOTS        2006                   0.99
 MARY                            KEITEL     HANDICAP BOONDOCK        2006                   0.99
 MARY                            KEITEL     HAUNTING PIANIST        2006                   0.99
 MARY                            KEITEL     IDOLS SNATCHERS        2006                   2.99
 MARY                            KEITEL     INTENTIONS EMPIRE        2006                   2.99
 MARY                            KEITEL     JEOPARDY ENCINO        2006                   0.99
 MARY                            KEITEL      KING EVOLUTION        2006                   4.99
 MARY                            KEITEL       LOVELY JINGLE        2006                   2.99
 MARY                            KEITEL          LUKE MUMMY        2006                   2.99
 MARY                            KEITEL     MADNESS ATTACKS        2006                   0.99
 MARY                            KEITEL     MALLRATS UNITED        2006                   0.99
 MARY                            KEITEL     MEMENTO ZOOLANDER        2006                   4.99
 MARY                            KEITEL     MERMAID INSECTS        2006                   4.99
 MARY                            KEITEL          MODEL FISH        2006                   4.99
 MARY                            KEITEL     MOONWALKER FOOL        2006                   4.99
 MARY                            KEITEL     NORTHWEST POLISH        2006                   2.99
 MARY                            KEITEL      ROSES TREASURE        2006                   4.99
 MARY                            KEITEL        SAINTS BRIDE        2006                   2.99
 MARY                            KEITEL       SIERRA DIVIDE        2006                   0.99
 MARY                            KEITEL     SLEEPY JAPANESE        2006                   2.99
 MARY                            KEITEL     SOLDIERS EVOLUTION        2006                   4.99
 MARY                            KEITEL         STEEL SANTA        2006                   4.99
 MARY                            KEITEL       SUBMARINE BED        2006                   4.99
 MARY                            KEITEL      SWEDEN SHINING        2006                   4.99
 MARY                            KEITEL      THEORY MERMAID        2006                   0.99
 MARY                            KEITEL     TITANIC BOONDOCK        2006                   4.99
 MARY                            KEITEL     UNFORGIVEN ZOOLANDER        2006                   0.99
 MARY                            KEITEL          WAGON JAWS        2006                   2.99
 MARY                            KEITEL          YOUTH KICK        2006                   0.99

Select Menu
===================================
a. Films by genre
b. Titles by actor
c. Stores by title
q. Quit
> c
Title name: AGENT TRUMAN
	Title            Store ID      First Name       Last Name                                Address                            Stock
===========================================================================================================================================
        AGENT TRUMAN        0            Jon         Stephens                    28 MySQL BoulevardQLDWoodridgeAustralia             3
        AGENT TRUMAN        0           Mike          Hillyer                   47 MySakila DriveAlbertaLethbridgeCanada             3

๋Œ“๊ธ€