๐ ์ ๊ณต ๊ณต๋ถ55 [์๊ณ ๋ฆฌ์ฆ] ์ ํ์์ ์ดํด(recurrence relation) ์ ํ์ ์์ด์ ๊ท๋ฉ์ ์ ์์ ์ ์ฌ ์ฐจ์ด : ์ธ์ ํ ํญ๊ฐ์ ๊ด๊ณ๋ง์ ๋ค๋ฃจ๋ ๊ฒ์ ์๋๋ค. ์ด๋ค ํจ์๋ฅผ ์์ ๋ณด๋ค ๋ ์์ ๋ณ์์ ๋ํ ํจ์ ์์ ๊ณผ์ ๊ด๊ณ๋ก ํํํ ๊ฒ. (์์ด = ์ ์์ญ์ด ์ ์์ธ ํจ์) ๋๋ถ๋ฆ, ํน์ ์ ์ฌํ ๋ฐฉ์์ผ๋ก ๋ฌธ์ ๋ฅผ ํ ๋ ๊ฑธ๋ฆฌ๋ ์๊ฐ์ ๊ตฌํ๋๋ฐ์ ์ฌ์ฉํจ ex) T(n) = T(n-1) + 1 + T(n-1) = 2T(n-1) + 1 An = T(n), An = 2A(n-1) + 1 ์ ํ์์ ํธ๋ ๋ฒ 1. ๋ฐ๋ณต ๋์น : ์ฃผ์ด์ง ์กฐ๊ฑด์ ์ด์ฉํ์ฌ ์ ์ ์์ ํจ์๋ก ๋ฐ๋ณตํด์ ๋์นํ๋ ๋ฐฉ๋ฒ. ์นจ์ฐฉํ๊ฒ ๊ผผ๊ผผํ! 2. ์ถ์ ํ ์ฆ๋ช : ์ ํ์์ ๊ฒฐ๋ก ์ ์ถ์ ํ๊ณ , ๊ท๋ฉ๋ฒ์ผ๋ก ์ฆ๋ช ํจ. ๋ฐ๋ณต ๋์น๊ฐ ๋ณต์กํ ๋ ์ ์ฉํจ. but ์ถ์ ์ด ์ฝ์ง ์์ ์ ์์ 3. ๋ง์คํฐ ์ ๋ฆฌ : ์ ํ์ ๊ณต์. ์ฌ๊ธฐ์์๋ ๋ค.. 2023. 1. 16. [์๊ณ ๋ฆฌ์ฆ] ์๊ณ ๋ฆฌ์ฆ ๊ฐ์ ๋ฐ ์ ์ ์๊ณ ๋ฆฌ์ฆ์ ์ ์ : ์ด๋ค ์ ๋ ฅ์๋ ์ ํํ ์ถ๋ ฅ์ ์ ํํ ์๊ฐ ์์ ๋ด๋ ํ๋ก๊ทธ๋จ ์ด๋ค ์ ๋ ฅ : ๋ฌธ์ ์ ๋์ด๋๋, ์ ๋ ฅ์ ํฌ๊ธฐ์ ์๊ด์์ด ๋ฌธ์ ๋ฅผ ํ ์ ์๋ค. ์ ํํ ์ถ๋ ฅ : ๋ฌธ์ ๊ฐ ์๊ตฌํ๋ ์กฐ๊ฑด์ ๋ง์กฑํ๋ค. ์ ๋ต์ด ์๊ตฌํ๋ ์กฐ๊ฑด์ด ๋ฌด์์ธ์ง ๋ช ์ํ ์ ์๋ค. ์ ํํ ์๊ฐ : ๋ฌดํ๋ฃจํ์ ๋น ์ง์ง ์๊ณ ๋ฉ๋ํ ์ ์๋ ์๊ฐ์ ์ข ๋ฃํ๋ค. ex) 100๋ช ์ ํ์๋ค์ ์ํ ์ ์ ์ค ์ต๋๊ฐ์ ๊ตฌํ์์ค. ์ํ์ ๊ท๋ฉ๋ฒ→ ์ ํ์ฑ : ์๋ช ํ๋ค. → ์๊ฐ : n๋ช ์ ์ ์๋ฅผ ์ฝ์ผ๋ฉด, n-1๋ฒ ๋น๊ต. → max(์ง๊ธ๊น์ง์ ์ต๋๊ฐ, i+1๋ฒ์งธ ํ์์ ์ ์) ex) 100๋ช ์ ํ์๋ค์ ์ํ ์ ์ ์ค ์ต๋น๊ฐ์ ๊ตฌํ์์ค. ex) ์ ๋ ฅ : U={1,2, … , n} ์ค์์ ํน์ ํ ์ ํ๋๋ง ๋นผ๊ณ ๋ฌด์์์ ์์๋ก n-1๊ฐ์ ์ซ์๊ฐ ํ๋ฒ์ .. 2023. 1. 16. [DB] ๋ฐ์ดํฐ๋ฒ ์ด์ค ๋ณด์ Database Security and Authorization Subsystem ๋ณด์ ๋ฐ ๊ถํ๋ถ์ฌ DB security legal and ethical policy issues system-related issues security levels Threats to Databases Loss of integrity : ๋ฌด๊ฒฐ์ฑ ์์ค Loss of availability : ๊ฐ์ฉ์ฑ ์์ค Loss of confidentiality : ๊ธฐ๋ฐ์ฑ ์์ค access control, inference control, flow control, encryption DB security : not an isolated concern multiuser DB system database security and authoriza.. 2022. 12. 30. [DB] ๋ฐ์ดํฐ๋ฒ ์ด์ค ๋ณต๊ตฌ Recovery Techniques Recovery Concept recent consistent state : no errors in db, no inconsistencies in db systme log Catastrophic failure (์น๋ช ์ ์ฅ์ ) → backed up, redoing Noncatastrophic failure (๋น์ฌํด์ ์ฅ์ ) → undoing, redo, deferred update&immediate update Caching(Buffering) of disk blocks ํจ์จ์ฑ์ ์ํด์ ์บ์ ์ฌ์ฉ DBMS cache Buffer replacement : ๋ฒํผ ๊ต์ฒด( flush ) dirty bit : ๋ฒํผ๊ฐ ์์ ๋์๋์ง ์ฌ.. 2022. 12. 30. [DB] ๋์์ฑ ์ ์ด Concurrency Control Techniques Concurrency Control Protocols : guarantee serializability (์ง๋ ฌํ ๋ณด์ฅ) Locking Timestamps multiversion CC protocols Optimistic protocols Multiple granularity concurrency control protocol Two-phase Locking Techniques : ์ด์ค ๋ผํน lock ์ํ 1, unlock ์ํ๋ 0 Lock table : lock ์ ๋ณด๋ฅผ ๊ด๋ฆฌํ๋ ์๋ธ์์คํ plus a queue for transactions that are waiting to access item Shared/Exclusive (or Read/Wr.. 2022. 12. 30. [DB] Transaction processing Transaction Concepts Concurrent Executions Transaction Schedule Serializability Recoverability Single-User vs Multiuser Systems ๊ต๋ ์ํ : interleaved concurrency Transaction : an executing program that forms a logical unit of db processing Begin transaction - end transaction; includes DB access operations read-only / read-write transaction read-item(X) : ๋์คํฌ๋ธ๋ก ์ฃผ์์ฐพ๊ธฐ-๋ฒํผ์ ๋ณต์ฌ-ํ๋ก๊ทธ๋จ ๋ณ์๋ก ๋ณต์ฌ write-item(X).. 2022. 12. 30. ์ด์ 1 ยทยทยท 4 5 6 7 8 9 10 ๋ค์ 728x90 ๋ฐ์ํ