카테고리 없음

221212

Berylly 2022. 12. 12. 17:28

T. 김동식 + 서치보완

 

 

etc 용어정리

null= NullPointerException

 

 

데이터타입(기본타입, 참조타입)

 

기본타입 (bsilfdcb)

byte 1
short 2
int 4
long 8
float 4
double 8
char 2
boolean 1

- 정수타입: byte 1, short 2, int 4, long 8, char 2

- 실수타입: float 4, double 8

- 논리타입: boolean 1

 

 

참조타입 (배열, 열거, 클래스, 인터페이스)

배열: 메모리, 데이터를 관리하기 쉽도록 하나로 묶는일, 선형자료구조 중 하나

 

배열

int arr[] = new int[4];
arr[0] = a;
arr[1] = b;
arr[2] = c;
arr[3] = d;
System.out.print(arr[0]);
System.out.print(arr[1]);
System.out.print(arr[2]);
System.out.print(arr[3]);
char arr []= new char[] {'a', 'b', 'c', 'd'};
for(int i=0;i<=3;i++) {
	System.out.println(arr[i]);
}
int total = 0;
int score [] = new int[] {55,63,70,80,90};
for(int i=0;i<5;i++) {
	if(score[i] > 100) {
		System.out.println("[경고] "+score[i]+"점은 잘못된 점수입니다, 100이하의 점수만 허용합니다, 해당학생의 점수는 0점 처리합니다.");	
		score[i] = 0;
	}else if(score[i] >= 90) {
		System.out.println("친구"+i+"의 점수는 "+score[i]+"점, A등급 입니다.");	
	}else if(score[i] >= 80) {
		System.out.println("친구"+i+"의 점수는 "+score[i]+"점, B등급 입니다.");
	}else if(score[i] >= 70) {
		System.out.println("친구"+i+"의 점수는 "+score[i]+"점, C등급 입니다.");
	}else if(score[i] >= 0) {
		System.out.println("친구"+i+"의 점수는 "+score[i]+"점, F등급 입니다.");
	}else if(score[i] < 0) {
		System.out.println("[경고] "+score[i]+ "점은 잘못된 점수입니다, 0이상의 점수만 허용합니다, 해당학생의 점수는 0점 처리합니다.");
		score[i] = 0;
	}
    double avg= total / 5;
	System.out.println("평균점수는 "+ avg + "입니다.");
}

소수점까지 나타내고 싶다면,

double avg= total / 5.0; = double avg= total / 5;

 

 

 

메모리영역

메소드(Method): 파일저장 = 함수

(heap): 객체 생성, 아무렇게나 쌓아놓은 무더기

스택(Stack): 메소드호출시 생성되어 저장, 밑에서부터 차곡차곡 

 

 

 

* 자료구조

선형자료구조: 스택, 큐, 배열, 리스트

비선형자료구조: 그래프, 트릴

 

*선형자료구조: 하나의 자료 뒤에 하나의 자료가 존재하는 것

*비선형 자료구조: 하나의 자료 뒤에 여러개의 자료가 존재할 수 있는 것

 

 

 

DATA 데이터

데이터베이스: 데이터의 집합

DBMS: 관계형 데이터베이스를 관리/운영, 테이블(열, 행으로 이루어져)이라는 최소단위를 가짐.

primary key: 주키 (예: 로그인 정보에서의 회원ID)

 

 

Oracle (데이터 베이스 관리 시스템)

최고의 Database 언어

블록체인 외부의 데이터를 블록체인 안/밖으로 보냄

고립된 블록체인 생태계를 외부와 연결 시켜주는 하나의 다리(bridge) 역할

*블록체인(blockchain)은 분산 컴퓨팅 기술 기반의 데이터 위변조 방지 기술

*Oracle Corporation, 상용 SQL 관계형 데이터베이스 관리 시스템을 제공하는 최초의 공급업체

 

 

SQL (데이터 베이스(관리시스템)를 이용하기 위한 언어)

Structured Query Language 구조적(테이블을 상상하라) 쿼리 언어, 정보를 저장하고 처리

 

 

sql developer vs sqlplus

sql developer: 오라클 설치시 포함, 명령어를 직접1 입력하여 결과를 바로 확인 할 수 있는 console 도구

sqlplus: SQL 명령어를 GUI환경에서 작업할 수 있도록 도와주는 도구, 무료, 추가설치필요

C:\Users\409>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on 월 12월 12 16:55:53 2022
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
사용자명 입력:system
비밀번호 입력:

다음에 접속됨:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>exit
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options에서 분리되었습니다.

C:\Users\409>sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on 월 12월 12 17:03:48 2022

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

사용자명 입력: scott
비밀번호 입력:

다음에 접속됨:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

 

 

Oracle세팅

Oracle 다운후, sql developer다운

https://www.oracle.com/database/sqldeveloper/technologies/download/

 

Oracle SQL Developer Downloads

This archive. will work on a 32 or 64 bit Windows OS. The bit level of the JDK you install will determine if it runs as a 32 or 64 bit application. This download does not include the required Oracle Java JDK. You will need to install it if it's not already

www.oracle.com

select * from emp;
select * from dept;
select * from bonus;
select * from salgrade;

테이블 안 각 정보를 확인(ctrl+enter)가능.

 

 

 

CentOS

CentOS-7-x86_64-DVD-2009.iso 다운

http://ftp.kaist.ac.kr/CentOS/7.9.2009/isos/x86_64/

 

Index of /CentOS/7.9.2009/isos/x86_64/

 

ftp.kaist.ac.kr

 

 

Python

>>> a=4
>>> id(a)
140735562634120

* java는 System.identityHashCode(a).