목록전체 글 (102)
유디의 공간정보·개발일기

공간빅데이터 분석 - 공간 빅데이터 기술 영역 - 데이터 분산 처리의 효용성 병렬 처리 시스템을 통해서 빠르게 정보를 오갈 수 있게 함 - Hadoop Eco-System (하둡 핵심기술) MapReduce & HDFS - 국토부 공간빅데이터 분석플랫폼
select * from employees where department_id = (select department_id from departments where department_name = ?); --Alias(별칭) 설명 select salary, salary*(1+commission_pct) 커미션반영급여 from employees;
--DDL Script --DB Modelng -- 테이블, 컬럼을 정하는 작업 -- 시퀀스라는 것을 파악하려고 한다. create table sample( id number(5) primary key, name varchar2(100) ); create sequence sample_seq; --이렇게도 일단 테이블 생성 가능 select sample_seq.nextval from dual; select sample_seq.currval from dual; --참조 insert into sample(id, name) values(sample_seq.nextval, 'haha'); select * from sample; --project sql코드---------------- create table mem..
-- 두 개 이상의 테이블이 연동될 때 -- -- 주문아이템과 주문 -- 하나의 주문에서 여러 아이템을 주문한다. -- 주문번호, 주문일자(date), 주문고객아이디 이다. -- 주문번호, 아이템번호, 아이템명, 주문수량(number) -- 테이블과 컬럼 -- 하나의 테이블? 여러 테이블에 들어갈까? -- 테이블 : 엑셀시트 create table edu_order ( --테이블 생성-- order_no varchar2(50), --컬럼들-- order_date date, customer_id varchar2(100), primary key (order_no) --기본키 지정해 줘야 한다-- ); drop table edu_order; insert into edu_order(order_no, order_..
create table book ( --테이블 생성-- id varchar(20) primary key, name varchar(100), price number(10) ); insert into book(id, name, price) values('111', 'wow java', 10000); --테이블에 값 넣기-- --insert into book(id, name, price) values('111', 'wow java', 10000); -primary key가 중복돼서 오류남-- -- insert into book(id, name, price) values('222', 'wow java', 10000); select * from book; --테이블 값 검색-- commit; --연동-- drop..
[리뷰] - grouping & aggregation(avg, max, min, count) - 부서별로 평균급여 *조건 : 평균급여가 7000 이상 -> having 사용 *조건 : 입사일자가 2005/01/01 이후여야 함 -> where 사용 - 집합연산 : group by 에 등장하는 컬럼이나 집합함수를 select에서 사용할 수 있다. - class : 변수, 함수, 생성자 - subquery --min(salary)를 받는 세 사람을 출력하시오. select * from (select rownum, employee_id, salary, last_name --pseudo cloumn from employees order by salary) sal_emp where rownum < 4; --최근 ..
select trunc(sysdate, 'month') from dual; --입사후 20주년 다음달 기념일자 select hire_date, trunc(add_months(hire_date, 20*12+1), 'month') from employees; --근속년 select round((sysdate - hire_date)/365.25, 2) from employees; --Neena가 근무하는 부서의 부서원 정보를 출력하시오. --1-1.Neena가 근무하는 부서번호 select DEPARTMENT_ID from EMPLOYEES where first_name = 'Neena'; --1-2.90번 부서에 근무하는 사원들 select * from EMPLOYEES where DEPARTMENT_ID ..
select distinct job_id from employees; /* IT_PROG라면 급여를 20% 인상한 결과를 출력 SH_CLERK 이면 급여의 50%를 인상하여 출력 나머지 급여를 출력하시오. CASE of DECODE */ select employee_id, job_id, salary, decode(job_id, 'IT_PROG', salary*1.2, 'SH_CLERK', salary*1.5, salary) revised_salary from employees; select employee_id, job_id, salary, case job_id when 'IT_PROG' then salary*1.2 when 'SH_CLERK' then salary*1.5 else salary end r..
--어떤 정보를 보여줄건지 --어떤 테이블에서 가져올건지 --어떤 조건으로 검색할 것인지 select * from employees --where department_id = 100; where last_name = 'King'; select employee_id, last_name, first_name, salary from employees; --java에서의 identifier(식별자) : 변수/메서드/클래스/패키지의 이름 --DB에서의 identifier(식별자) : 테이블/컬럼의 이름 --부서번호와 부서명, 부서위치를 출력하시오. select DEPARTMENT_ID 사번, DEPARTMENT_NAME, LOCATION_ID --사번 : 컬럼명 옆에 뭘 적으면 그게 새 컬럼명이 됨 from DE..
[InterfaceTest] package myjdbc; public class InterfaceTest { public static void main(String[] args) { //Shape shape = new Shape(); //얘는 추상클래스라서 객체생성(객체화)이 안되는데 Shape tri = new Triangle();//얘는 Shape과 Triangle이 상이한 타입을 갖기 때문에 가능, 바꿔서는 안되고 //tri.x = 0; //x : 상속이 됐기 때문에 Triangle 클래스도 갖고 있는 변수 tri.getArea(); //호출 가능 //Triangle 클래스에서 실행되는 것임!!! //인터페이스에서 실행되는 것처럼 보이지만 아니다. 클래스에서 실행되는 것 MyInterface my ..