TIL.
-
관계형 데이터베이스TIL. 2024. 5. 20. 23:35
관계형 데이터베이스란? 관계형 데이터베이스란 데이터를 테이블 형태로 구조화하여 저장하고, 테이블 간의 연간 관계를 통하여 데이터를 연결하는 데이터베이스 관리 시스템이다. - 관계형 데이터베이스는 테이블이라는 구조를 가지며, 각 테이블은 고유한 데이터를 나타내는 행과 속성을 나타내는 열을 가진다. - 연간 관계란, 각 테이블 사이의 연결된 관계를 의미한다. - 연간 관계를 통해 복잡한 데이터를 관리할 수 있게 된다. - 테이블 간에는 공통 필드 (키)를 통해 관계가 정의되어 있다. - 테이블 조인을 통해 여러 테이블을 결합할 수 있다. - SQL(Structured Query Language)을 사용하여 데이터를 조작한다. 관계형 데이터베이스는 데이터 간의 관계를 명확히 정의하고 구조화된 방식으로 데이..
-
try..catch 에러 핸들링 (수정예정)TIL. 2024. 5. 16. 23:43
아무리 프로그래밍에 능한 사람이더라도 에러가 있는 스크립트를 작성할 수 있다. 에러가 발생하면 스크립트는 중단되고, 콘솔에 에러가 출력된다. 그러나 try..catch 문법을 사용하면 스크립트의 중단을 막고, 에러를 잡아서(catch) 더 합당한 무언가를 할 수 있게된다. try {// 코드} catch (err){// 에러 핸들링}동작 알고리즘1. try {} 코드 실행 2. 에러가 없다면, try 구문 안의 마지막 줄까지 실행되고, catch 구문은 건너뛴다. 3. 에러가 있다, try 구문은 실행이 중단되고 catch(err) 구문으로 제어 흐름이 넘어간다.변수 err에는 무슨 일이 일어났는지에 대한 설명이 담긴 에러 객체를 포함한다. 에러 객체 내장 에러 전체와 에러 객체는 두 가지 주요 프로..
-
2진법TIL. 2024. 5. 15. 23:43
2진법은 0과 1, 두 개의 숫자만을 사용하여 수를 표현하는 가장 기본적인 기수법이다. 특징컴퓨터에서 데이터를 표현하는 기본 방식으로 사용된다. 각 자리수의 가치가 2의 거듭제곱으로 증가한다. 연산 덧셈과 뺄셈 연산은 받아내림과 받아올림 규칙을 지켜야한다. 곱셈은 십진법과 유사하게 부분적 곱셈의 합으로 계산한다. 진법 변환2진법 > 10진법 : 각 자리수에 2의 거듭제곱을 곱한 후 모두 더한다. 10진법 > 2진법 : 10진법으로 표현된 수를 2로 나누고 나머지를 기록한다. 더이상 나누어지지 않을 때 까지 반복한다. 응용 컴퓨터 시스템에서 데이터 저장, 처리, 전송의 기본 단위이다.2진 코드를 이용한 정보 표현 및 암호화 2진법은 컴퓨터 과학의 근간이 되는 개념으로, 디지털 세계를 구성하는 기본 언..
-
MongoDBTIL. 2024. 5. 14. 22:54
MongoDB는 문서 지향 데이터 모델을 사용하는 NoSQL 데이터베이스 관리 시스템이다. 정형 및 비정형 데이터를 보다 쉽고 빠르게 통합할 수 있다는 장점이 있다. MongoDB를 사용하는 이유 ?저장. MongoDB는 대규모 정형 및 비정형 데이터 볼륨을 저장할 수 있으며 수직 및 수평으로 확장 가능하다.Index 지원. 다양한 조건으로 빠르게 데이터를 검색할 수 있다. 다양한 형태의 인덱스를 제공하며 필요한 필드에 필요한 만큼 생성할 수 있다.복잡한 데이터 구조 설명 . 문서 데이터베이스를 사용하면 중첩된 구조(구조 내의 구조)를 설명하는 문서를 삽입할 수 있으며 데이터의 변화를 허용할 수 있다.로드 밸런싱. MongoDB를 사용하여 여러 서버에서 실행할 수 있습니다.MongoDB의 특징신뢰성. ..
-
Express.js와 미들웨어TIL. 2024. 5. 13. 23:07
Express.js란?Node.js를 사용하여 쉽게 서버를 구성할 수 있게 만든 클래스와 라이브러리의 집합체가장 보편적으로 사용되는 웹 애플리케이션 프레임워크최소한의 코어 기능을 제공하는 경량 프레임워크미들웨어를 통한 HTTP 요청/응답 처리 과정에서 다양한 기능을 추가할 수 있다. 라우팅 기능을 제공하여 URL 패턴에 따라 적절한 핸들러를 지정할 수 있다.정적 파일 제공, 템플릿 엔진 지원 등 웹 애플리케이션 개발에 필요한 기능을 갖추고 있다. 미들웨어를 통해 인증, 로깅, 에러 처리 등의 기능을 쉽게 구현할 수 있다.활발한 커뮤니티와 다양한 써드파티 미들웨어 생태게미들웨어란 ? 미들웨어는 서버의 요청-응답 과정에서 중간에 위치하여 특정 기능을 수행하는 함수.res(요청)객체, res(응답)객체, 그..
-
IPv6TIL. 2024. 5. 10. 23:10
IPv6란 인터넷 프로토콜 스택 중 네트워크 계층의 프로토콜로서 버전 6 인터넷 프로토콜로 제정된 차세대 인터넷 프로토콜을 말한다.인터넷은 IPv4 프로토콜로 구축되어 왔으나 IPv4 프로토콜의 주소가 32비트라는 제한된 주소 공간 및 국가별로 할당된 주소가 거의 소진되고 있다는 한계점으로 인해 지속적인 인터넷 발전에 문제가 예상되어, 이에 대한 대안으로서 IPv6 프로토콜이 제안되었다. 실제로 IPv6 주소는 휴대폰 및 컴퓨터에 할당되어 적용되고 있다. > IPv4 주소는 빠른 속도로 고갈되었으며, 인터넷에 접속된 컴퓨터는 기하급수적인 속도로 증가하고 있다.>인터넷의 주소 고갈과 네트워크 프래그멘테이션 문제를 해결하고 인터넷에 확장성과 데이터 보안을 강화하기 위해 IPv6가 제안되었다.
-
IP와 포트.TIL. 2024. 5. 8. 23:39
브라우저의 역할은 무엇인가 ? HTML을 읽어서 보여준다. 프로그램의 역할은 무엇인가 ? 해당 확장자로 작성된 파일을 읽어서 보여준다. 통신이란 ? 요청과 응답을 프로그램끼리 반복하는 것. 프로그램에서 요청과 응답을 위해 요청을 보낼 컴퓨터의 주소를 알아야 한다. > IP 주소 그 주소의 컴퓨터 안에는 무수하게 많은 프로그램, 어떻게 요청을 보낼 프로그램을 찾을까? > 포트 IP는 - 컴퓨터를 찾을 때 필요한 주소.- 컴퓨터 간의 네트워킹을 가능하게 하는 통신 규약. 포트는 - 컴퓨터가 각종 신호, 정보 등을 주고 받을 수 있도록 해주는 통신 통로- 네트워크 활동의관문 같은 역할- 컴퓨터 안에서 프로그램을 찾기 위한 수단, 즉 각 프로세스가 위치한 방 번호- 16비트로 된 숫자