일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- Hackerrank
- 알고리즘
- Developer_JoyKim
- select
- 자바스크립트
- 개발자_조이킴
- array.push()
- Programmers
- 역행자
- 개발자의 책장
- 배열
- MySQL
- JavaScript
- array.slice()
- array
- Algorithms
- 최강의 인생
- 정규표현식
- 코딩공부
- 코플릿
- Where
- node.js
- 코드스테이츠
- for문
- SQL
- 블록체인
- join
- 프로그래머스
- 코딩테스트
- 재귀함수
- Today
- Total
목록Developer_JoyKim (28)
CodingSpace
What: 트랜잭션 (Transaction) 모든 구문이 성공 OR 모든 구문이 실패 어떤 구문은 성공하고 어떤 구문은 실패하면 안될때 트랜잭션을 사용 원자성 (Atomicity) 은행 송금 예시 A가 B 돈을 보냄: A 계좌에서 돈이 출금 B 계좌에서 돈이 입금 만약, "A 계좌에서 돈이 출금"라는 SQL 구문만 실행되고, 오류가 발생하여 "B 계좌에서 돈이 입금" SQL 구문이 실행되지 않으면 서비스를 복구하는데 막대한 비용이 듬! 만약 위의 두 SQL 구문이 모두 성공하거나 실패하게 만들면 위와 같은 문제가 없음! → 이때 트랜잭션을 사용함 -- 트랜잭션 시작 START TRANSACTION; DELETE FROM sections WHERE section_id > 0; SELECT *FROM sec..
Problem. Search - Ice Cream Parlor Link. https://www.hackerrank.com/challenges/icecream-parlor/problem?isFullScreen=true Ice Cream Parlor | HackerRank Help Sunny and Johnny spend all their money during each trip to the Ice Cream Parlor. www.hackerrank.com Description. Two friends like to pool their money and go to the ice cream parlor. They always choose two distinct flavors and they spend all o..
Problem. Sorting - Big Sorting Link. https://www.hackerrank.com/challenges/big-sorting/problem?isFullScreen=true Big Sorting | HackerRank Sort an array of very long numeric strings. www.hackerrank.com Description. Consider an array of numeric strings where each string is a positive number with anywhere from 1 to 10^6 digits. Sort the array's elements in non-decreasing, or ascending order of thei..
What: 인덱스 특정 컬럼(들)에 대한 목차 생성 - 검색 가속화 테이블 내용변경(추가, 수정, 삭제)시 시간 더 소모 기본키(PRIMARY KEY)는 기본적으로 인덱스가 걸려있음 → 따라서 PRIMARY KEY를 기준으로 데이터 검색은 빠름! -- 인덱스 생성 ALTER TABLE (테이블명) ADD INDEX (인덱스명) (인덱스를 적용시킬 컬럼명) ex) ALTER TABLE `mydatabase`.`businesses` ADD INDEX index_biz_name (business_name); -- 다중 컬럼 인덱스 ALTER TABLE menus ADD INDEX index_name_cal (menu_name, kilocalories); -- 인덱스 조회 SHOW INDEX FROM busin..
Problem. Implementation - Equalize the Array Link. https://www.hackerrank.com/challenges/equality-in-a-array/problem?isFullScreen=true Equalize the Array | HackerRank Delete a minimal number of elements from an array so that all elements of the modified array are equal to one another. www.hackerrank.com Description. Given an array of integers, determine the minimum number of elements to delete t..
Problem. Strings - CamelCase Link. https://www.hackerrank.com/challenges/camelcase/problem?isFullScreen=true CamelCase | HackerRank www.hackerrank.com Description. There is a sequence of words in CamelCase as a string of letters, s, having the following properties: It is a concatenation of one or more words consisting of English letters. All letters in the first word are lowercase. For each of t..
What: 뷰 (View) 뷰 생성 (Create) CREATE VIEW (뷰 이름) AS (실행문); ex) CREATE VIEW section_view AS SELECT section_id, section_name FROM sections; 뷰 제거 (Delete) DROP VIEW (뷰 이름) ex) DROP VIEW section_view; 다중 기본키 추가 ALTER TABLE (테이블명) ADD PRIMARY KEY (컬럼명1, 컬럼명2); ex) ALTER TABLE people ADD PRIMARY KEY (first_name, last_name); 뷰를 사용하는 이유 보안성 - 테이블 구조 및 내용 숨기기 편의성 - 복잡한 쿼리 사전 구현 References. For Developer. ..
Problem. Implementation - Cut the sticks Link. https://www.hackerrank.com/challenges/cut-the-sticks/problem?isFullScreen=true Cut the sticks | HackerRank Given the lengths of n sticks, print the number of sticks that are left before each cut operation. www.hackerrank.com Description. You are given a number of sticks of varying lengths. You will iteratively cut the sticks into smaller sticks, dis..