Banner

My Tech Blog (์ „์ฒด ๊ธ€)

๐ŸŒˆ ๐ต๐‘’ ๐‘”๐‘Ÿ๐‘Ž๐‘ก๐‘’๐‘“๐‘ข๐‘™, ๐‘Ž ๐‘™๐‘–๐‘ก๐‘ก๐‘™๐‘’ ๐‘Ž๐‘๐‘๐‘Ÿ๐‘’๐‘๐‘–๐‘Ž๐‘ก๐‘–๐‘œ๐‘› ๐‘”๐‘œ๐‘’๐‘  ๐‘Ž ๐‘™๐‘œ๐‘›๐‘” ๐‘ค๐‘Ž๐‘ฆ โœจ๐ฟ๐‘–๐‘“๐‘’ ๐‘–๐‘  ๐‘Ž ๐‘š๐‘Ž๐‘”๐‘–๐‘. ๐ธ๐‘›๐‘—๐‘œ๐‘ฆ ๐‘Ž๐‘›๐‘‘ ๐ต๐‘Ÿ๐‘–๐‘›๐‘” ๐‘—๐‘œ๐‘ฆ.
๐Ÿ“‘ 1. ๋ฌธ์ œ์„ค๋ช…๐Ÿ’ก 2. ์ ‘๊ทผ๋ฐฉ์‹์ด ๋ฌธ์ œ๋Š” ๋„ˆ๋ฌด ์–ด๋ ค์›Œ์„œ ์Šค์Šค๋กœ ํ’€๊ธฐ ํž˜๋“ค์–ด์„œ ๊ฒ€์ƒ‰์˜ ๋„์›€์„ ๋ฐ›์Œ.์ฃผ์–ด์ง„ ๋ฌธ์ œ๋Š” ๊ทธ๋ž˜ํ”„ ์ด๋ก ์˜ ์ตœ์†Œ ์‹ ์žฅ ํŠธ๋ฆฌ(MST, Minimum Spanning Tree) ๋ฌธ์ œ์ด๋‹ค. ์ด ๋ฌธ์ œ๋ฅผ ํ’€๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•œ ์ „์ œ์ง€์‹- Union-Find(์œ ๋‹ˆ์˜จ ํŒŒ์ธ๋“œ) ์ž๋ฃŒ๊ตฌ์กฐ- Kruskal's Algorithm (ํฌ๋ฃจ์Šค์นผ) ์•Œ๊ณ ๋ฆฌ์ฆ˜ Kruskal's Algorithm (ํฌ๋ฃจ์Šค์นผ ์•Œ๊ณ ๋ฆฌ์ฆ˜)ํฌ๋ฃจ์Šค์นผ ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ ์œ„์— ๋งํ•œ ์ตœ์†Œ์‹ ์žฅํŠธ๋ฆฌ(MST)๋ฅผ ๊ตฌํ•˜๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด๋‹ค. ๋ฌธ์ œ์˜ ๋ถ„๋ฅ˜ ๋‹ต๊ฒŒ greedy์•Œ๊ณ ๋ฆฌ์ฆ˜์œผ๋กœ ๊ฒฐ์ •์˜ ์ˆœ๊ฐ„๋งˆ๋‹ค ์ตœ์„ ์˜ ๊ฒฐ์ •์„ ํ•จ์œผ๋กœ์„œ ์ตœ์ข…์ ์ธ ๋‹ต์„ ๊ตฌํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ๋ชจ๋“  ์ •์ ์„ ์ตœ์†Œ ๋น„์šฉ์œผ๋กœ ์—ฐ๊ฒฐํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ค€๋‹ค.ํฌ๋ฃจ์Šค์นผ ์•Œ๊ณ ๋ฆฌ์ฆ˜์˜ ํ•ต์‹ฌ์€ ๋ชจ๋“  ๊ฐ„์„ ์„ ๊ฐ€์ค‘์น˜ ๊ธฐ์ค€(์—ฌ๊ธฐ์„œ๋Š” ๋‹ค๋ฆฌ ๊ฐœ์„ค..
๐Ÿ“‘ 1. ๋ฌธ์ œ์„ค๋ช…๐Ÿ’ก 2. ์ ‘๊ทผ๋ฐฉ์‹์ž…์ถœ๋ ฅ ์˜ˆ๋กœ ์ฃผ์–ด์ง„ route ๋ฐฐ์—ด์„ ๋ง‰๋Œ€๊ทธ๋ž˜ํ”„๋กœ ๊ทธ๋ ค ๋ดค๋‹ค. ์ตœ์†Œํ•œ์˜ ์นด๋ฉ”๋ผ๋ฅผ ๋ฐฐ์น˜ํ•ด์•ผ ํ•˜๋ฏ€๋กœ ๊ตฌ๊ฐ„ ์ข…๋ฃŒ ์œ„์น˜๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์˜ค๋ฆ„์ฐจ์ˆœ ์ •๋ ฌ ์ฐจ๋Ÿ‰์ด ๊ตฌ๊ฐ„์—์„œ ์นด๋ฉ”๋ผ๋ฅผ ๋‹จ ํ•œ ๋ฒˆ๋งŒ์ด๋ผ๋„ ๋งŒ๋‚˜๋ฉด ๋จ์ข…๋ฃŒ ์ง€์ ์—์„œ ๋‹ค์Œ ๊ตฌ๊ฐ„๊ณผ ๊ฒน์น˜๊ฒŒ ๋˜๋ฏ€๋กœ ์ตœ์†Œํ•œ์˜ ์นด๋ฉ”๋ผ๋ฅผ ๋ฐฐ์น˜๊ฐ€๋Šฅ์นด๋ฉ”๋ผ ๋ฐฐ์น˜๋Š” ๋„๋กœ์˜ ๊ฐ€์žฅ ์™ผ์ชฝ ๋๋ถ€ํ„ฐ ํƒ์ƒ‰ํ•˜๋ฉฐ ์‹œ์ž‘๋œ๋‹ค.์ž…์ถœ๋ ฅ ์˜ˆ์‹œ์—์„œ MIN_VALUE์ธ -20 ์ง€์ ๋ถ€ํ„ฐ ์˜ค๋ฅธ์ชฝ์œผ๋กœ ๊ฐ€๋ฉฐ ์ข…๋ฃŒ๊ตฌ๊ฐ„๊ณผ ์‹œ์ž‘๊ตฌ๊ฐ„์ด ๊ฒน์น˜๋Š” ๋ถ€๋ถ„์— ์นด๋ฉ”๋ผ๊ฐ€ ๋ฐฐ์น˜๋œ๋‹ค.๊ตฌ๊ฐ„ ์ค‘ ๊ฐ€์žฅ ์ฒ˜์Œ์œผ๋กœ ๋งŒ๋‚˜๋Š” ์ข…๋ฃŒ ์œ„์น˜๋Š” -15์ด๋‹ค.๋”ฐ๋ผ์„œ ์ด ์œ„์น˜์— ์ฒซ ๋ฒˆ์งธ ์นด๋ฉ”๋ผ๋ฅผ ์„ค์น˜ํ•œ๋‹ค. ๊ทธ๋ฆฌ๊ณ  -13์ง€์ ์—์„œ ํ˜„์žฌ ๊ตฌ๊ฐ„๊ณผ ๋‹ค์Œ ๊ตฌ๊ฐ„์ด ๋งŒ๋‚˜์ง€๋งŒ ์ด๋ฏธ ํ•ด๋‹น ๊ตฌ๊ฐ„์—๋Š” ์นด๋ฉ”๋ผ๊ฐ€ ์„ค์น˜ ์™„๋ฃŒ ๋˜์—ˆ์œผ๋ฏ€๋กœ ์Šคํ‚ตํ•œ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋‹ค์Œ ๊ตฌ๊ฐ„์ธ [-..
1. How can users access AWS ? - To access AWS, you have three options:    •   AWS Management Console (protected by password + MFA)    •  AWS Command Line Interface (CLI): protected by access keys    •  AWS Software Developer Kit (SDK) - for code: protected by access keys  - Access Keys are generated through the AWS Console  - Users manage their own access keys  - Access Keys are secret, just lik..
๐Ÿ“‘ 1. ๋ฌธ์ œ์„ค๋ช…โŒ 2. ์‹คํŒจํ•œ ์‹œ๋„์ฝ”๋“œ๋Š” ์ž‘๋™ํ•˜์ง€๋งŒ ์ •๋‹ต ์ฒ˜๋ฆฌ X์ด์œ : CAR_ID ์ค‘๋ณต๋จSELECT A.Car_idFROM Car_rental_company_car A JOIN Car_rental_company_rental_history B ON A.Car_id = B.Car_idWHERE A.Car_type = '์„ธ๋‹จ' AND B.Start_date BETWEEN '2022-10-01' AND '2022-10-31'ORDER BY A.Car_id DESC;โญ 3. ์ •๋‹ต์ฝ”๋“œCAR_ID ์ค‘๋ณต์ด ์—†์–ด์•ผ ํ•˜๋ฉฐ -> DISTINCT๋Œ€์—ฌ ๊ธฐ๋ก์ด ์žˆ๋Š” -> ON A.CAR_ID = B.CAR_IDSELECT DISTINCT(A.Car_id)FROM ..
๐Ÿ“‘ 1. ๋ฌธ์ œ์„ค๋ช…โญ 2. ์ •๋‹ต์ฝ”๋“œ์ถœ๊ณ ์ผ์ด 2022-05-01 ๋ณด๋‹ค ์ž‘๊ฑฐ๋‚˜ ๊ฐ™์œผ๋ฉด '์ถœ๊ณ ์™„๋ฃŒ'๋Šฆ์œผ๋ฉด ์ถœ๊ณ  ๋Œ€๊ธฐ, ์—†์œผ๋ฉด ์ถœ๊ณ  ๋ฏธ์ •์ด๊ณ  ํ•ด๋‹น ์ปฌ๋Ÿผ๋ช…์€ ์ถœ๊ณ ์—ฌ๋ถ€๋ผ๋Š” ์ด๋ฆ„์œผ๋กœ ์„ค์ •์–ด๋ ค์šด ๋ถ€๋ถ„์€ ์—†๋Š” ์‰ฌ์šด ๋ฌธ์ œ๐ŸฅณSELECT Order_id, Product_id, DATE_FORMAT(Out_date,'%Y-%m-%d') AS Out_date, CASE WHEN Out_date '2022-05-01' THEN '์ถœ๊ณ ๋Œ€๊ธฐ' ELSE '์ถœ๊ณ ๋ฏธ์ •'END AS ์ถœ๊ณ ์—ฌ๋ถ€FROM Food_orderORDER BY Order_id;
๐Ÿ“‘ 1. ๋ฌธ์ œ์„ค๋ช…โญ 2. ์ •๋‹ต์ฝ”๋“œSELECT Animal_id, name, CASE WHEN Sex_upon_intake LIKE '%Neutered%' OR Sex_upon_intake LIKE '%Spayed%' THEN 'O' ELSE 'X' END AS ์ค‘์„ฑํ™”FROM ANIMAL_INSORDER BY ANIMAL_ID; ๐Ÿ˜Š 3. TMIANSI SQL ํ‘œ์ค€์—์„œ๋Š” ALIAS ์— ์ž‘์€๋”ฐ์˜ดํ‘œ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ํ—ˆ์šฉ๋˜์ง€ ์•Š์ง€๋งŒ ์จ๋„ ์ƒ๊ด€์€ ์—†๋‹ค. (๋‚˜๋Š” ๋”ฐ์˜ดํ‘œ ์ผ์Œ)SELECT Animal_id, name, CASE WHEN Sex_upon_intake LIKE '%Neutered%' ..
์ด ์ž๋ฆฌ์— ๊ณ„์† ์žˆ๊ณ  ์‹ถ์€๊ฐ€?๋งค์ผ ๊ณต๋ถ€ํ•ด์„œ ๋” ์ข‹์€ ๊ณณ์œผ๋กœ ์ด์งํ•˜๊ณ , ์•ž์œผ๋กœ ๋‚˜์•„๊ฐ€๊ณ  ์‹ถ์€๊ฐ€?โœ… ์ด๋Ÿฐ๊ฑฐ๋Š” ๋ญ˜๋กœ ๋งŒ๋“œ๋Š”๊ฑด์ง€ ํ”„๋กœ๊ทธ๋žจ ์ฐพ๊ธฐ1. ERD Diagram ์ž‘์„ฑ ํˆด - dbdiagram.io 2. ์•„ํ‚คํ…์ฒ˜ ๊ตฌ์กฐ๋„ ์ž‘์„ฑ ํˆด - draw.io โœ… SQL 3๋ฌธ์ œ ํ›„ ํฌ์ŠคํŒ…โœ… ์ž๋ฐ” 2๋ฌธ์ œ ํ›„ ํฌ์ŠคํŒ…โœ… 25-01-18 ๋‹ค๋ฏธ ๊ฒฐํ˜ผ์‹ ๊ฐ€๊ธฐโœ… ๋ Œ์ฆˆ, ๋ฐฉํ–ฅ์ œ, ๋น—, ์•ˆ๊ฒฝ๋‹ฆ์ด, ์ƒดํ‘ธ, ์•ˆ์ •๊ธฐโœ… 24-01-19 ์˜ค์ „์— ํ™”์žฅ์‹ค ์ฒญ์†Œ, ๋นจ๋ž˜, ์“ฐ๋ ˆ๊ธฐ ๋ฒ„๋ฆฌ๊ธฐโœ… 2์‹œ ์ „๊นŒ์ง€ AWS ๋“ฃ๊ณ  ์ •๋ฆฌ16. IAM MFA ์‹ค์Šต 17. AWS ์•ก์„ธ์Šค ํ‚ค, CLI ๋ฐ SDK 18. Windows์—์„œ AWS CLI ์„ค์ • 19. Mac OS X์—์„œ AWS CLI ์„ค์ • 20. Linux์—์„œ AWS CLI ์„ค์ • 21. AWS CLI ์‹ค์Šต22. A..
๐Ÿ“‘ 1. ๋ฌธ์ œ์„ค๋ช…โŒ ์‹คํŒจํ•œ ์‹œ๋„์ด๋ฆ„์˜ ๋Œ€์†Œ๋ฌธ์ž๋ฅผ ๊ตฌ๋ณ„ํ•˜์ง€ ์•Š๋Š”๋‹ค๋Š” ๋ถ€๋ถ„์ด  ๋ฌธ์ œ์˜ ํ•ต์‹ฌ 1์ฐจ ์‹œ๋„ ์‹คํŒจWHERE ์ ˆ์—์„œ `LOWER(NAME)` ํ•ด ์ฃผ์—ˆ์œผ๋‚˜ ํ‹€๋ฆผ์ฟผ๋ฆฌ๋Š” ๋Œ์•„๊ฐ€๊ณ  ๊ฒฐ๊ณผ๋Š” ๋‚˜์˜ค์ง€๋งŒ ๊ฒฐ๊ตญ WHERE์ ˆ์—์„œ LOWER()๊ณผ LIKE๋ฅผ ํ•จ๊ป˜ ์“ด ๊ฒƒ์€ ๋ถˆํ•„์š”ํ•œ ์ฒ˜๋ฆฌ๋ฅผ ํ•˜๋Š” ๊ฒƒ์ด๋‹ค. MySQL์—์„œ LIKE ์—ฐ์‚ฐ์ž๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ ๋Œ€์†Œ๋ฌธ์ž๋ฅผ ๊ตฌ๋ณ„ํ•˜์ง€ ์•Š๋Š”๋‹ค. SELECT ANIMAL_ID, NAMEFROM ANIMAL_INSWHERE LOWER(ANIMAL_TYPE) = 'dog' AND LOWER(NAME) LIKE '%el%'ORDER BY NAME DESC; 2์ฐจ ์‹œ๋„ ์‹คํŒจ์ด๋ฒˆ์—๋Š” ORDER BY์ ˆ์— LOWER() ํ•จ์ˆ˜๋ฅผ ์จ์„œ ์ •๋ ฌํ–ˆ๋”๋‹ˆ ํ‹€๋ ธ๋‹ค๊ณ  ํ•จ.WHERE ์ ˆ์ด๋ž‘ ์ •๋ ฌ์ด๋ž‘ ๋ณ„๊ฐœ๋‹ˆ๊นŒ ์ •๋ ฌ์—๋Š” LOW..
IAM Policies StructureIAM JSON ํŒŒ์ผ์€ AWS์—์„œ IAM(Identity and Access Management) ์ •์ฑ…์„ ์ •์˜ํ•  ๋•Œ ์‚ฌ์šฉ๋˜๋Š” ํŒŒ์ผ ํ˜•์‹์ด๋‹ค. ์ด ํŒŒ์ผ์€ JSONํ˜•์‹์œผ๋กœ ์ž‘์„ฑ๋˜๋ฉฐ, ์‚ฌ์šฉ์ž, ๊ทธ๋ฃน, ์—ญํ• (Role) ๋“ฑ์— ๋Œ€ํ•œ  ๊ถŒํ•œ(permissions)์„ ์„ค์ •ํ•˜๋Š” ๋ฐ ์“ฐ์ธ๋‹ค.  IAM JSON StructureIAM JSON ํŒŒ์ผ์€ AWS ๋ฆฌ์†Œ์Šค์— ๋Œ€ํ•ด ํ—ˆ์šฉ(Allow)ํ•˜๊ฑฐ๋‚˜ ๊ฑฐ๋ถ€(Deny)ํ•  ์ž‘์—…์„ ๋ช…์‹œํ•˜๋Š” ์ •์ฑ…(policy)์„ ์ •์˜ํ•œ๋‹ค.์ด๋ฅผ ํ†ตํ•ด ์–ด๋–ค ์‚ฌ์šฉ์ž๊ฐ€ ์–ด๋–ค AWS ์„œ๋น„์Šค์—์„œ ์–ด๋–ค ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋Š”์ง€๋ฅผ ์ œ์–ดํ•œ๋‹ค.JSON ํŒŒ์ผ ์˜ˆ์‹œ JSON ํŒŒ์ผ ํ•„๋“œConsists of• Version: policy language version, always incl..
์ธ์ ˆ๋ฏธ์˜€๋˜๊ฒƒ
๐Ÿ’ซ Caffeine-powered Wizard
์ƒ๋‹จ์œผ๋กœ