전체 글
-
[DB] RDBMSProgramming/etc 2022. 9. 13. 14:51
관계형 데이터베이스 데이터베이스란 '구조화된 정보 또는 데이터의 조직화된 모음' 이다. 그렇다면 관계형 데이터베이스란 무엇일까? 관계형 데이터베이스란 데이터들을 2차원 배열과 같은 테이블에 저장하고 관리하는 것이다. 이는 서로 다른 데이터 구조가 어떻게 관련되어 있는지 쉽게 파악하고 이해할 수 있다는 장점을 가지고 있다. 테이블 만들기 학생 수강신청 관리를 하는 테이블을 만들어 본다. 테이블은 다음과 같은 조건을 가지고 있다. - 각 학생들은 수학, 영어, 국어, 과학, 국사 중 최소한 세 과목을 수강 - 학생 수는 3명이다. 대부분의 경우 2가지 방식으로 테이블을 작성한다. # 1. 2차원 테이블 성명 수학 영어 과학 국어 국사 김** o o o 이** o o o 박** o o o 위 방법은 x,y 좌..
-
-
-
-
[SQL] 오랜 기간 보호한 동물(1)Programmers/SQL 2022. 8. 30. 18:03
문제 ANIMAL_INS 테이블은 동물 보호소에 들어온 동물의 정보를 담은 테이블입니다. ANIMAL_INS 테이블 구조는 다음과 같으며, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE는 각각 동물의 아이디, 생물 종, 보호 시작일, 보호 시작 시 상태, 이름, 성별 및 중성화 여부를 나타냅니다. NAME TYPE NULLABLE ANIMAL_ID VARCHAR(N) FALSE ANIMAL_TYPE VARCHAR(N) FALSE DATETIME DATETIME FALSE INTAKE_CONDITION VARCHAR(N) FALSE NAME VARCHAR(N) TRUE SEX_UPON_INTAKE VARCHAR(N) FA..
-
[Lv.2] 게임 맵 최단거리Programmers/Level2 2022. 8. 30. 13:43
문제 ROR 게임은 두 팀으로 나누어서 진행하며, 상대 팀 진영을 먼저 파괴하면 이기는 게임입니다. 따라서, 각 팀은 상대 팀 진영에 최대한 빨리 도착하는 것이 유리합니다. 지금부터 당신은 한 팀의 팀원이 되어 게임을 진행하려고 합니다. 다음은 5 x 5 크기의 맵에, 당신의 캐릭터가 (행: 1, 열: 1) 위치에 있고, 상대 팀 진영은 (행: 5, 열: 5) 위치에 있는 경우의 예시입니다. 위 그림에서 검은색 부분은 벽으로 막혀있어 갈 수 없는 길이며, 흰색 부분은 갈 수 있는 길입니다. 캐릭터가 움직일 때는 동, 서, 남, 북 방향으로 한 칸씩 이동하며, 게임 맵을 벗어난 길은 갈 수 없습니다. 아래 예시는 캐릭터가 상대 팀 진영으로 가는 두 가지 방법을 나타내고 있습니다. 첫 번째 방법은 11개의 ..
-
[SQL] DATETIME에서 DATE로 형 변환Programmers/SQL 2022. 8. 28. 15:16
문제 ANIMAL_INS 테이블은 동물 보호소에 들어온 동물의 정보를 담은 테이블입니다. ANIMAL_INS 테이블 구조는 다음과 같으며, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE는 각각 동물의 아이디, 생물 종, 보호 시작일, 보호 시작 시 상태, 이름, 성별 및 중성화 여부를 나타냅니다. NAME TYPE NULLABLE ANIMAL_ID VARCHAR(N) FALSE ANIMAL_TYPE VARCHAR(N) FALSE DATETIME DATETIME FALSE INTAKE_CONDITION VARCHAR(N) FALSE NAME VARCHAR(N) TRUE SEX_UPON_INTAKE VARCHAR(N) FA..
-
[개념] 문자열Algorithm/theory 2022. 8. 28. 15:05
개념 - 문자열 조작이란 문자열을 변경하거나 분리하는 등의 여러 과정을 의미 - 문자열은 로우 레벨에서 조작하거나, 문자형이 따로 없는 C 같은 경우 조작이 매우 까다로움 - 대부분의 언어에서는 문자열 조작을 위한 다양한 기능을 기본으로 제공하므로 기본 기능들을 잘 활용하는 것이 중요 문자열 처리가 사용되는 분야 1) 정보 처리 분야: 현대의 거의 모든 정보는 문자열로 구성되어 있어, 문자열 처리는 정보 처리에 핵심적인 역할을 한다. 2) 통신 시스템 분야: 메세지, 이메일 전송 시 문자열을 한곳에서 다른 한 곳으로 전송한다. 또한 데이터 전송은 문자열 처리 알고리즘이 탄생한 배경이기도 하다. 3) 프로그래밍 시스템 분야: 프로그램은 자체가 문자열로 구성되어져 있다. 예제1 유효한 팰린드롬_ from l..