๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
728x90
300x250

์ „์ฒด ๊ธ€279

[SQLD] 47ํšŒ SQLD ( 1๊ณผ๋ชฉ/2๊ณผ๋ชฉ ์ •๋‹ต ) ์•ˆ๋…•ํ•˜์„ธ์š” yunamom ์ž…๋‹ˆ๋‹ค :D ์ด๋ฒˆ์‹œ๊ฐ„์—๋Š” SQLD 47ํšŒ ์‹œํ—˜ 1๊ณผ๋ชฉ, 2๊ณผ๋ชฉ ์ •๋‹ต์„ ํฌ์ŠคํŒ… ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ๐Ÿ‘ฉ๐Ÿป‍๐Ÿ’ป *๋ฌธ์ œ ์ˆœ์„œ๋Š” ๋‹ค๋ฅผ ์ˆ˜ ์žˆ์œผ๋ฉด ๋‹ต์˜ ๋ณด๊ธฐ๊ฐ€ ๊ธฐ์–ต์ด ์•ˆ๋‚˜๋Š” ๊ฒฝ์šฐ๋Š” ๋‹ต ์ž์ฒด๋ฅผ ์ ์–ด๋‘๊ฑฐ๋‚˜ ๋ฌธ์ œ๋งŒ ์ ์€ ๊ฒฝ์šฐ๋„ ์žˆ์Šต๋‹ˆ๋‹ค. โ€‹ 1. ์•„๋ž˜์˜ ๋ชจ๋ธ๋ง์˜ ๊ด€์ ์— ๋Œ€ํ•œ ์„ค๋ช…์œผ๋กœ ๋ฐ”๋ฅธ ๊ฒƒ์€? ์—…๋ฌด๊ฐ€ ์ฒ˜๋ฆฌํ•˜๋Š” ์ผ์˜ ๋ฐฉ๋ฒ•์— ๋”ฐ๋ผ ๋ฐ์ดํ„ฐ๋Š” ์–ด๋–ป๊ฒŒ ์˜ํ–ฅ์„ ๋ฐ›๊ณ  ์žˆ๋Š”์ง€ ๋ชจ๋ธ๋งํ•˜๋Š” ๋ฐฉ๋ฒ• ๋ฐ์ดํ„ฐ์™€ ํ”„๋กœ์„ธ์Šค ๊ด€์  ๋ฐ์ดํ„ฐ ๊ด€์  : ์—…๋ฌด๊ฐ€ ์–ด๋–ค ๋ฐ์ดํ„ฐ์™€ ๊ด€๋ จ์ด ์žˆ๋Š”์ง€ ๋˜๋Š” ๋ฐ์ดํ„ฐ๊ฐ„์˜ ๊ด€๊ณ„๋Š” ๋ฌด์—‡์ธ์ง€์— ๋Œ€ํ•ด์„œ ๋ชจ๋ธ๋งํ•˜๋Š” ๋ฐฉ๋ฒ• ํ”„๋กœ์„ธ์Šค ๊ด€์  : ์—…๋ฌด๊ฐ€ ์‹ค์ œํ•˜๊ณ  ์žˆ๋Š” ์ผ์€ ๋ฌด์—‡์ธ์ง€ ๋˜๋Š” ๋ฌด์—‡์„ ํ•ด์•ผ ํ•˜๋Š”์ง€๋ฅผ ๋ชจ๋ธ๋งํ•˜๋Š” ๋ฐฉ๋ฒ• โ€‹ 2. ์•„๋ž˜์˜ ERD ์—์„œ ์—…๋ฌด ์„ค๋ช…์— ๋Œ€ํ•œ ๋‚ด์šฉ์„ ๋ฐ”ํƒ•์œผ๋กœ ์„ค๋ช…์ด ์ ์ ˆํ•˜์ง€ ์•Š์€ ๊ฒƒ์€? ๊ณ ๊ฐ์€ .. 2022. 11. 7.
[LeetCode] Algorithm I - Day 4 Two Pointers 344. Reverse String Write a function that reverses a string. The input string is given as an array of characters s. You must do this by modifying the input array in-place with O(1) extra memory. Example 1: Input: s = ["h","e","l","l","o"] Output: ["o","l","l","e","h"] Example 2: Input: s = ["H","a","n","n","a","h"] Output: ["h","a","n","n","a","H"] Constraints: 1 2022. 10. 28.
[LeetCode] Algorithm I - Day 3 Two Pointers 283. Move Zeroes Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements. Note that you must do this in-place without making a copy of the array. Example 1: Input: nums = [0,1,0,3,12] Output: [1,3,12,0,0] Example 2: Input: nums = [0] Output: [0] Constraints: 1 2022. 10. 27.
[LeetCode] Algorithm I - Day 2 Two Pointers 977. Squares of a Sorted Array Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order. Example 1: Input: nums = [-4,-1,0,3,10] Output: [0,1,9,16,100] Explanation: After squaring, the array becomes [16,1,0,9,100]. After sorting, it becomes [0,1,9,16,100]. Example 2: Input: nums = [-7,-3,2,3,11] Output: [4,9,9,49,121.. 2022. 10. 26.
[LeetCode] Algorithm I - Day 1 Binary Search In mathematics and computer science, an algorithm is defined as a process or set of rules to be followed in calculations or other problem-solving operations. This practical method is often used in calculations, data processing, and automatic reasoning because it contains clear and concise instructions and can be executed in limited time and space complexities. 704. Binary Search Given an array o.. 2022. 10. 26.
[Linux] fail - deploy upload failed, exception : permission denied ubuntu ๊ธฐ์ค€ ~$ sudo chmod 755 /var/lib/tomcat9/webapps ~$ ls -al /var/lib/tomcat9 ํ•ฉ๊ณ„ 20 . . drwxr-xr-x 8 tomcat tomcat 4096 10์›” 1 11:34 webapps chmod (change mode์˜ ์•ฝ์ž) ๋ช…๋ น์–ด๋Š” ํŒŒ์ผ๋“ค์ด๋‚˜ ๋””๋ ‰ํ„ฐ๋ฆฌ์˜ ํŒŒ์ผ ์‹œ์Šคํ…œ ๋ชจ๋“œ๋“ค์„ ๋ฐ”๊พผ๋‹ค. ํŒŒ์ผ ๊ถŒํ•œ ๋ฐ”๊พผ๋’ค์—๋„ permission denied ๋‚ ๊ฒฝ์šฐ ์•„๋ž˜ ์ฐธ์กฐ ( ์ถœ์ฒ˜ : StackExchange ) #setting up tomcat as the webapps group ~$ chgrp -R tomcat /var/lib/tomcat9/webapps #deploy new applications, add write permissions ~$ .. 2022. 10. 1.
[Oracle] ํŠน์ˆ˜๋ฌธ์ž ๊ฒ€์ƒ‰ - ESCAPE ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ• [TEST] NAME ------ __A _B_ C D__ E SQL> SELECT * FROM TEST WHERE NAME LIKE '%_%'; [RESULT] NAME ------ __A _B_ C D__ E TEST ํ…Œ์ด๋ธ”์—์„œ ์œ„์™€ ๊ฐ™์€ ์ฟผ๋ฆฌ๋กœ ๊ฒ€์ƒ‰์„ ํ•˜๊ฒŒ ๋˜๋ฉด '_' ๋ฌธ์ž๊ฐ€ ํฌํ•จ๋œ ๊ฐ’์„ ๊ฐ€์ ธ์˜ค๋Š”๊ฒŒ ์•„๋‹ˆ๋ผ ๋ชจ๋“  ํ–‰์ด ์ถœ๋ ฅ๋ฉ๋‹ˆ๋‹ค. ํŠน์ˆ˜ ๊ตฌ๋ฌธ์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š์œผ๋ฉด % ๋˜๋Š” _์™€ ๊ฐ™์€ ํŠน์ˆ˜ ๋ฌธ์ž๊ฐ€ ํฌํ•จ ๋œ ๋ฌธ์ž์—ด ์—ด์— ๋Œ€ํ•ด LIKE ๊ฒ€์ƒ‰์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋Š”๋ฐ์š” SQL> SELECT * FROM TEST WHERE NAME LIKE '%@_%' ESCAPE '@'; [RESULT] NAME ------ __A _B_ D__ LIKE ์—ฐ์‚ฐ์œผ๋กœ '%' ๋‚˜ '_' ๋“ฑ๊ณผ ๊ฐ™์€ ํŠน์ˆ˜๋ฌธ์ž๋ฅผ ๊ฒ€์ƒ‰ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ์œ„์™€ ๊ฐ™์ด E.. 2022. 10. 1.
[Tip] PDF ํŒŒ์ผ ๋ถ„ํ•  ์ €์žฅํ•˜๊ธฐ (with Chrome) ์•ˆ๋…•ํ•˜์„ธ์š” yunamom ์ž…๋‹ˆ๋‹ค :D ์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” PDF ํŒŒ์ผ์„ ์›ํ•˜๋Š” ํŽ˜์ด์ง€๋งŒ ๋ณผ ์ˆ˜ ์žˆ๋„๋ก ๋ถ„ํ• ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์†Œ๊ฐœํ•ด๋“œ๋ฆฌ๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ๐Ÿ˜Š 1 ๋ถ„ํ•  ํ•˜๊ณ ์ž ํ•˜๋Š” PDF ํŒŒ์ผ์„ ํฌ๋กฌ ๋ธŒ๋ผ์šฐ์ € ์œ„์— ๋Œ์–ด๋‹ค ๋†“์€๋‹ค์Œ ์ธ์‡„ ์•„์ด์ฝ˜ ํด๋ฆญ!) 2 ํŽ˜์ด์ง€ ํ•ญ๋ชฉ์—์„œ ๋งž์ถค ์„ค์ •(Custom) ์„ ํด๋ฆญํ›„ ๋ถ„ํ• ํ•  ํŽ˜์ด์ง€ ์ˆ˜๋ฅผ ์„ค์ •ํ•ด์ฃผ์„ธ์š”. 3 ํŽ˜์ด์ง€๋ฅผ ์„ค์ •ํ•œ๋’ค(์ฝค๋งˆ , ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ํŽ˜์ด์ง€๋ฅผ ์ถ”๊ฐ€ํ• ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.) Save ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ด์ฃผ์„ธ์š”. 4 ๊ทธ๋’ค์— Save ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ์ฃผ๋ฉด ์™„๋ฃŒ ! ์ด๋ ‡๊ฒŒ ํฌ๋กฌ ๋ธŒ๋ผ์šฐ์ €๋กœ ๊ฐ„๋‹จํ•˜๊ฒŒ PDFํŒŒ์ผ์„ ๋ถ„ํ• ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค ^^ 2022. 9. 20.
[SQLD] 37ํšŒ ๊ธฐ์ถœ๋ฌธ์ œ ( 50๋ฌธ์ œ / ์ •๋‹ต, ํ•ด์„คํฌํ•จ ) โณ๋‚จ์€์‹œ๊ฐ„ : 89๋ถ„19์ดˆ ๐Ÿ“–SQLD. ์ œ 37 ํšŒ ๊ธฐ์ถœ ๋ฌธ์ œ ๋ฌธ์ œ 1. ๋‹ค์Œ์—์„œ ์„ค๋ช…ํ•˜๋Š” ๊ฒƒ์€ ER๋ชจ๋ธ ์ค‘ ์–ด๋–ค ํ•ญ๋ชฉ์— ๋Œ€ํ•œ ์„ค๋ช…์ธ๊ฐ€? ์ •๋‹ตํ™•์ธ๐ŸŒผ 1) ๋ชจ๋“  ๋ฆด๋ ˆ์ด์…˜(Relation)์€ ์›์ž๊ฐ’(Atomic)์„ ๊ฐ€์ ธ์•ผ ํ•œ๋‹ค. 2) ์–ด๋–ค ๋ฆด๋ ˆ์ด์…˜(Relation)์—์„œ ์†์„ฑ ๊ฐ’์ด ๊ฐ€์งˆ์ˆ˜ ์žˆ๋Š” ๊ฐ’์˜ ๋ฒ”์œ„๋ฅผ ์˜๋ฏธํ•œ๋‹ค. 3) ์‹ค์ œ ์†์„ฑ๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•œ๋‹ค. 4) ์†์„ฑ๋ช…๊ณผ ๋ฐ˜๋“œ์‹œ ๋™์ผํ•  ํ•„์š”๋Š” ์—†๋‹ค. 1) ์นด๋””๋‚ ๋ฆฌํ‹ฐ(Cardinality) 2) ๋„๋ฉ”์ธ(Domain) 3) ์ธ์Šคํ„ด์Šค(Instance) 4) ์ฐจ์ˆ˜(Degree) ๋ฌธ์ œ 2. ๋‹ค์Œ ์ค‘์—์„œ ๋„๋ฉ”์ธ(Domain) ์—๋Œ€ํ•œ ํŠน์ง•์œผ๋กœ ์˜ณ์ง€ ์•Š์€ ๊ฒƒ์€? ์ •๋‹ตํ™•์ธ๐ŸŒผ 1) ๋ฆด๋ ˆ์ด์…˜์˜ ์†์„ฑ์— ๋Œ€ํ•œ ๋ฐ์ดํ„ฐ ํƒ€์ž…๊ณผ ํฌ๊ธฐ์ด๋‹ค. 2) ์†์„ฑ์— ๋Œ€ํ•˜์—ฌ NOT NULL ์ œ์•ฝ์‚ฌ.. 2022. 9. 5.
728x90
300x250

์ฝ”๋“œ