2024/03/06(2)
-
데이터베이스 기본 개념
파일시스템과 데이터베이스의 비교 과거에는 데이터 관리를 위해 파일 시스템을 사용했다. 파일 시스템은 데이터를 프로그램과 분리하여 별도의 파일에 저장하는 방법이다. 파일은 프로그램과 분리되어 컴퓨터의 디스크에 저장되며, 컴퓨터가 꺼진 상태에도 여전히 디스크에 데이터를 유지한다. 그리고 파일 시스템은 응용 프로그램마다 별도의 파일로 관리한다. 따라서 각 프로그램들은 파일을 다뤄야 하는 부담이 생기고, 각 파일별로 저장된 데이터를 공유하지 않기 때문에 데이터의 중복이 발생한다. 그리고 이로 인해 데이터 일관성의 문제가 발생할 수 있다. 반면 DBMS의 경우 데이터 정의 및 관리를 DBMS에게 맡기기 때문에 프로그램 자체가 훨씬 간단하다. 그리고 여러 프로그램에서 하나의 데이터베이스를 공유할 수 있기 때문에 데..
2024.03.06 -
[프로그래머스] 여행경로
https://school.programmers.co.kr/learn/courses/30/lessons/43164 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 이동 가능한 모든 경로 중 알파벳 순서가 앞서는 경로를 return하면 된다. 그리고 모든 항공권을 사용해야 한다. 따라서 dfs를 사용했다. 그리고 dfs 중간에 usedTicket[i] = false로 초기화해줘야 한다. 예를 들어 JFK를 먼저 방문했으면 그 다음 경로에서는 JFK를 방문하지 못하도록 방문처리를 해줬지만, 다른 공항을 먼저 방문한 후의 경로에서는 JFK를 방문할 수 있어야 하..
2024.03.06