일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- namedQuery
- 프로젝트생성
- jscalendar
- jQuery값전달
- paging
- springflow
- 제너릭
- JPQL
- fullcalendar
- 자바서블릿
- Hibernate
- 제네릭
- 벌크연산
- JPA
- fetchjoin
- calendar
- 페이징
- 스프링데이터흐름
- joinfetch
- jQueryUI
- javascriptcalendar
- LIST
- javaservlet
- values()
- 엔티티직접사용
- Generic
- JQuery
- 대량쿼리
- jQuery값전송
- 페치조인
- Today
- Total
가자공부하러!
1. DB설치, 개발환경 구축 (Oracle DB, Maria DB) 본문
참고사이트
1. Oracle DB
2. Maria DB
> Maria DB 설치 : https://alpreah.tistory.com/76?category=844976
> Maria DB와 Spring MyBatis 연결 : https://alpreah.tistory.com/77
> STS 기본 설정과 pom.xml 사용 방법 : https://alpreah.tistory.com/75?category=844976
> Spring을 활용한 간단한 로그인 예제 : https://alpreah.tistory.com/80
3. Spring 개발환경 구축
Oracle DB
1. Oracle DB 설치
> 인스톨 ( Setup.exe )
> 작동확인 : cmd > sqlplus sys/admin as sysdba
2. SQL Developer 설치
> 다운로드 https://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
> 인스톨 ( sqldeveloper.exe )
> jdk 경로 설정
> 실행
3. 메이저 DB와 개발 툴
[MS피셜]
> MySQL - Workbench
> 몽고 - 로보몽고
4. 결과
> 18c 십팔씨버전으로 했는데 관련 내용이 웹상에 많지 않음
> 11g로 바꿔서 실행 및 테이블 생성 성공
5. 이클립스 연동
> https://raccoonjy.tistory.com/20
> Database Configuration Assistant에서 DB생성
> Net Configuration Assistant에서 리스너+서버설정
> 이클립스에 DBeaver 설치(Market Place)
> 자바프로젝트 우클릭 - Properties -Java Build Path - Libraries - Add External JARs... - ojdbc6.jar - apply
> 테스트(DriveManager.getConnection())
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | import java.sql.*; public class DBConnectionTest { public static void main(String[] args) { connectionDB(); } public static void connectionDB() { Connection con = null; String user = "minhj"; String pw = "****"; String url = "jdbc:oracle:thin:@localhost:1521:studyDB"; try { Class.forName("oracle.jdbc.driver.OracleDriver"); con = DriverManager.getConnection(url, user, pw); System.out.println("DB연결 성공!"); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); System.out.println("실패"); } finally { try { if( con != null) con.close(); }catch(Exception e) { } } } } | cs |
Maria DB
1. Maria DB 다운로드
> https://downloads.mariadb.org/
2. Setup
> Default instance properties
- Modify password for database user 'root'
- root계정 비밀번호 설정
- Use UTF8 as default server's character set 체크 필수
- Install as service check(default)
- Service Name : MariaDB(default)
- Enable networking check(default)
- TCP port : 3306(default)
- Innodb engine settings
- Buffer pool size : 996MB(default)
- Page size : 16KB(default)
- Enable the Feedback plugin... uncheck(default)
3. 설치 성공여부 확인
> HeidiSQL 실행
- 좌측하단 신규 버튼 클릭
- 암호 입력
- 열기 버튼 클릭
- 결과화면 확인(아래 사진)
'공부 > DB' 카테고리의 다른 글
H2 DB (0) | 2019.11.29 |
---|---|
Mac OS에서 Maria DB 활용 방법 - 설치, 실행, 계정생성, 접속 (0) | 2019.11.19 |
Maria DB 쿼리 모음(페이징, 날짜 등) (0) | 2019.09.26 |
Maria DB - DB 생성, 테이블 생성, Spring Boot 연동 (0) | 2019.09.17 |
2. Oracle DB - java 연동 예제(eclipse) (0) | 2019.05.31 |