전체 글
-
학원 day42. 폼(2), id와 class, CSS기록 2022. 11. 3. 15:06
폼폼은 사용자가 값을 입력할 수 있는 입력요소(입력필드, 체크박스, 라디오버튼, 콤보박스 등)를 제공하는 것이다.모든 입력요소들은 태그 안에 정의되어야 한다. 폼요소폼요소는 사용자가 값을 입력하거나, 선택하거나, 체크할 수 있는 것들이다.대표적인 폼요소 태그 : , , , 태그Input 태그의 주요 속성 type - 폼입력요소의 타입을 결정한다. - 타입의 종류 type="text" : 입력필드가 된다. type="password" : 비밀번호 입력필드가 된다. type="date" : 날짜 입력필드가 된다.(달력표시) type="datetime-local" : 날짜와 시간을 입력하는 입력필드를 생성한다. value속성으로 날짜와 시간을 지정할 때는 "2022-11-03T01:43"과 같은 형식으로 지정..
-
학원 day41. 태그(2), 엘리먼트, 폼기록 2022. 11. 2. 14:50
표를 담는 태그 태그 : 표를 생성하는 태그 태그 : 표의 헤더부를 생성하는 태그 태그 : 표의 바디부를 생성하는 태그 태그 : 표의 푸터부를 생성하는 태그 태그 : table row의 약자로, 표에 새로운 행을 추가하는 태그 태그, 태그 : 표의 헤더칸, 표의 데이터칸을 행에 추가하는 태그, th는 글씨 굵게, 가운데 정렬이 되고, td는 왼쪽 정렬되어서 화면에 표시된다. 태그는 , , 태그를 자식태그로 가진다. 태그는 태그를 자식태그로 가진다. , , 태그는 태그를 자식태그로 가진다. 태그는 , 태그를 자식태그로 가진다. 도서 주문정보 순번 제목 가격 구매수량 구매금액 1 이것이 자바다 35,000 원 1 권 35,000 원 2 스프링 인 액션 28,000원 2 권 56,000 원 3 정규표현식 핸드..
-
학원 day40. 웹, HTML, 태그, 속성기록 2022. 11. 1. 17:14
웹 애플리케이션 - 멀리 떨어져 있는 웹 서버 안에서 실행된다. - 목적 : 동적 웹 컨텐츠 제공 - 사용자는 웹 브라우저를 통해서 웹 서버에 요청을 하고 웹 애플리케이션의 실행결과를 응답받는다. 이때 사용되는 기술이 HTTP라는 통신규약(프로토콜)이다. - 동적 웹 컨텐츠를 제공하기 위해 데이터베이스에서 데이터를 가져온다. DB엑세스를 위해 SERVICE클래스도 있어야 하고 DAO클래스도 필요하다. - 동적 웹 컨텐츠는 HTML컨텐츠라는 걸 만들어서 제공해줘야 한다. 웹 컨텐츠는 형태가 다양하다. HTML, JSON, XML의 형태가 있다. - 웹 애플리케이션 제작에 필요한 기술에는 Servlet과 JSP가 있다. HTML (Hyper Text Markup Language) - 웹용 문서를 작성할 때 ..
-
학원 day39. 분석함수, 집합 연산, 계층형 쿼리기록 2022. 10. 31. 11:50
Top-N 분석 : 조건에 맞는 최상위 레코드 N개 혹은 최하위 레코드 N개를 조회하는 쿼리 ( 예시 : 급여를 가장 많이 받는 사원 3명, 판매가 가장 많이 된 도서 10종류 조회 ) ROWNUM 의사컬럼 사용하기 : ROWNUM은 조회된 행에 행번호를 1번부터 순서대로 부여하는 의사컬럼이다. * 형식 SELECT ROWNUM, COLUMN1, COLUMN2, COLUMN3, ... FROM (SELECT COLUMN1, COLUMN2, COLUMN3, ... FROM 테이블명 ORDER BY 분석대상컬럼명 정렬기준) WHERE ROWNUM GROUP BY -> HAVING -> SELECT -> ORDER BY 순 PARTITION BY를 이용해서 부서별로 순위 부여하기 -- 부서별로 구분해서(PAR..
-
학원 day37~38. ibatis(2), XML기록 2022. 10. 30. 13:49
ibatis - SQL Mapper framework - SQL과 객체를 매핑시켜서 데이터베이스 엑세스 작업 수행하는 라이브러리다. 환경설정 - 라이브러리 (classPath에 등록) - JDBC 드라이버 파일 ojdbc11.jar - ibatis 라이브러리 파일 sqlmap-2.3.4.726.jar - 환경설정 파일 resources/META-INF/ibatis/ibatis-config.xml - 데이터베이스 연결 정보 설정 // jdbc종류 // 연결할 데이터베이스 // 계정 // 비밀번호 - 매퍼파일(sql이 정의되어 있는 파일) 정보 등록 (테이블당 하나씩 생성) - 데이터베이스 엑세스 작업 준비 1. 테이블을 표현하는 VO 클래스 작성 public class User { private Strin..
-
학원 day36. ibatis기록 2022. 10. 26. 12:57
=> 메소드 작성할 때 select(조회) 빼고 insert, update, delete는 모두 void로 메소드 반환타입을 작성한다. (반환값 없음) select는 데이터를 가져와야 하기 때문에 void가 아니다. 조회하는 작업에서는 객체 하나인지 여러개를 반환하는지 확인해야 한다. (primary key, Unique 외에는 여러 개가 나올 수 있다.) 입력과 출력정보가 파악이 되면 메소드를 만들 수 있다. SERVICE 클래스 업무로직이 구현되는 클래스 메소드 - 요구사항 하나와 대응 * 대체로 요구사항 하나마다 업무로직 메소드 하나가 필요하다. * 업무로직을 구현하기 위해서는 대체로 1번 이상의 데이터베이스 엑세스 작업이 필요하다. * 업무로직을 구현하기 위해서 DAO객체의 메소드를 1번 이상 호..
-
학원 day35. 무결성제약조건, 인덱스, 트랜잭션기록 2022. 10. 26. 00:15
- MODEL P는 PRIMARY KEY 제약조건 F는 FOREIGN KEY 제약조건 U는 UNIQUE 제약조건 빨간점 NOT NULL PF, PF는 두 컬럼 합쳐서 PRIMARY KEY 제약조건이라는 의미이다. 테이블을 생성할때는 부모테이블을 먼저 만들고 자식테이블을 정의해야 한다. 테이블을 삭제할때는 자식레코드를 먼저 삭제하고 부모테이블을 삭제해야 한다. 외래키가 있는 쪽이 자식테이블, 외래키가 참조하고 있는 쪽이 부모테이블이다. 테이블끼리 조인할 때 외래키와 참조키를 조인한다. 참조할 수 있는 키는 PRIMARY KEY나 UNIQUE만 가능하다. 첫번째칸은 PRIMARY KEY나 UNIQUE에 대한 정보가 두번쨰칸은 FOREIGN KEY에 대한 정보가 세번째칸은 INDEX에 대한 정보가 들어있다. ..
-
학원 day34. 시퀀스, 테이블, 뷰, 무결성 제약조건기록 2022. 10. 25. 08:19
시퀀스 일련번호를 자동으로 생성하는 데이터베이스 객체. 테이블의 기본 키 값으로 사용된다. 일련번호 발행이 필요한 테이블마다 시퀀스를 따로 만든다. (주로 새로운 데이터가 빈번하게 추가, 삭제되는 테이블의 경우 시퀀스가 필요하다.) 시퀀스 생성하기 CREATE SEQUENCE 시퀀스명; INCREMENT BY value : 한번에 value값 만큼 증가시킨다. 기본값은 1이다. START WITH value : 시작값을 value로 지정한다. 기본값은 1이다. MAXVALUE value : 최대값을 value로 지정한다. 기본값은 NOMAXVALUE다. MINVALUE value : 최소값을 value로 지정한다. 기본값은 NOMINVALUE다. CACHE value : 지정된 value개 만큼 일련번호..