Presentation is loading. Please wait.

Presentation is loading. Please wait.

제 09 장 데이터베이스와 MySQL 2008 2학기 인터넷비즈니스과 강 환수 교수.

Similar presentations


Presentation on theme: "제 09 장 데이터베이스와 MySQL 2008 2학기 인터넷비즈니스과 강 환수 교수."— Presentation transcript:

1 제 09 장 데이터베이스와 MySQL 2008 2학기 인터넷비즈니스과 강 환수 교수

2 데이터베이스 개요 데이터 정보 데이터베이스 DBMS 단순한 사실에 불과한 아직 처리되지 않은 값
데이터가 사람에게 유용한 의미로 쓰여질 수 있도록 처리 데이터베이스 관련 있는 데이터의 저장소 DBMS 사용자가 데이터베이스를 만들고, 유지 관리할 수 있도록 돕는 프로그램

3 데이터베이스 구조 필드와 레코드 파일과 데이터베이스

4 관계형 데이터베이스 모델 관계형 모델 데이터를 행과 열로 구성된 이차원 테이블의 집합으로 표현한 모델 테이블 행과 열

5 SQL(Structured Query Language)
DBMS에서 사용되는 언어로, 데이터베이스를 구축하고 새로운 자료를 입력하거나, 데이터를 수정, 또는 삭제, 검색하는데 이용되는 가장 기본적인 언어 SQL 구분 SQL 종류 예문 의미 DDL create database create database univdb; 데이터베이스를 생성 drop database drop database testdb; 데이터베이스를 제거 create table create table professor ( id varchar(10) NOT NULL, name varchar(20) NULL ); 테이블을 생성 drop table drop table professor; 테이블을 제거 alter table alter table student rename stud; 테이블의 구조를 수정 DML select select * from student; 테이블의 행을 검색 insert insert into professor values (“lg”, “); 테이블에 한 행을 삽입 update update student set depart=’컴퓨터공학과’ where depart = ‘전산학과’; 테이블 내용을 수정 delete delete from student; 테이블의 행을 삭제

6 SQL 문장 create drop alter insert select delete update use show desc

7 MySQL community Server 내려받기 MySQL JDBC 드라이버 내려 받기 MySQL 설치
원래 mSQL이라는 DBMS에서 기반이 되어 새로 개발된 DBMS로서 범용적으로 많이 이용하는 데이터베이스 관리 시스템 MySQL community Server 내려받기 MySQL JDBC 드라이버 내려 받기 MySQL 설치

8 MySQL 서버 실행 start mysqld 현재 MySQL 서버 실행 확인

9 MySQL 클라이언트 실행 메뉴

10 MySQL JDBC 드라이버(Java Database Connectivity) 압축 파일
[mysql-connector-java zip] 드라이버 파일 [mysql-connector-java bin.jar] 다음 폴더 중 하나에 복사 [Tomcat 설치 폴더]/[lib] [jdk 설치폴더]/[jre]/[lib]/[ext]

11 커넥션 프로파일 만들기 [Data Source Explorer] 뷰를 이용

12 커넥션 프로파일 만들기(2) [New Connection Profile]

13 커넥션 프로파일 만들기(3) 속성 [Optional]
[useUnicode=true]와 [characterEncoding=euckr]을 입력

14 커넥션 프로파일 만들기(4) 결과확인

15 데이터베이스 생성 create database univdb;

16 테이블 생성 create table student ( ………

17 테이블 레코드(행) 삽입 insert into student (id, passwd, name, year, snum, depart, mobile1, mobile2, address, ) values ('javajsp', 'java8394', '김정수', 2010, ' ', '컴퓨터공학과', '011', ' ', '서울시',

18 Thank You !


Download ppt "제 09 장 데이터베이스와 MySQL 2008 2학기 인터넷비즈니스과 강 환수 교수."

Similar presentations


Ads by Google