๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ“š ์ „๊ณต ๊ณต๋ถ€/DB๊ธฐ์ดˆ14

[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.
[DB] Indexing structures for files / ๋ฌผ๋ฆฌ์  DB์„ค๊ณ„ Index structures for files index : ์ถ”๊ฐ€์ ์ธ ๋ณด์กฐ์ ‘๊ทผ๊ตฌ์กฐ, ๊ฒ€์ƒ‰์†๋„ ์ฆ๊ฐ€, ๋Œ€์ฒด๋ฐฉ๋ฒ•์„ ์ œ๊ณตํ•จ, ํšจ์œจ์  ๊ฒ€์ƒ‰ Single-level ordered indexes primary, secondary, clustering ISAM : Indexed Sequential Access Method Multilevel indexes B trees, B+ trees Types of Single-level ordered indexes Primary index : ํ‚ค ํ•„๋“œ ์ •๋ ฌ ํŒŒ์ผ์—์„œ ์ •๋ ฌ ํ‚ค ํ•„๋“œ์— ๋Œ€ํ•ด ์ •์˜๋œ ์ธ๋ฑ์Šค Clustering index : ํ‚ค๊ฐ€ ์•„๋‹Œ๊ฑธ๋กœ ์ •๋ ฌ๋œ ํŒŒ์ผ์—์„œ ์ •๋ ฌ ํ•„๋“œ์— ๋Œ€ํ•ด ์ •์˜๋œ ์ธ๋ฑ์Šค Secondary index : any nonordering field Prima.. 2022. 12. 30.
[DB] Disk, ํŒŒ์ผ๊ตฌ์กฐ, Hashing, ์ €์žฅ์†Œ ์„ค๊ณ„ DBs are stored physicaly as files of records stored on magnetic disks. storage hierarchy primary storage : ์ฃผ๊ธฐ์–ต์žฅ์น˜ operated on directly by the CPU Secondary storage : ๋ณด์กฐ๊ธฐ์–ต์žฅ์น˜, ์˜จ๋ผ์ธ Tertiary storage : ์˜คํ”„๋ผ์ธ ์•„์นด์ด๋ธŒ (์˜จ๋ผ์ธ์œผ๋กœ ๋กœ๋“œ ํ•„์š”) Memory Hierarchies and storage devices ์ƒ์œ„ ์ €์žฅ์†Œ : ๋น ๋ฆ„, ์ž‘์Œ, ๋น„์Œˆ ํ•˜์œ„ ์ €์žฅ์†Œ : ๋А๋ฆผ, ํผ, ์Œˆ Storage of DBs ๋ฌผ๋ฆฌ์  DB ์„ค๊ณ„ files of records : locate them efficiently Primary FIle organizations heap f.. 2022. 12. 30.
[DB] SQL programmingโŒจ๏ธ (2) Java Database Conectivity JDBC : sql connection function calls for java programming can access any DBMS that has a JDBC driver allows connect to data sources steps in JDBC ๋งค๊ฐœ๋ณ€์ˆ˜ ์ •์˜ (by “?”) ํ”„๋กœ๊ทธ๋žจ ๋ณ€์ˆ˜์™€ ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ ๋ฐ”์šด๋“œ executeQuery๋กœ SQL ์‹คํ–‰ ๊ฒฐ๊ณผ๋ฅผ ResultSet์— ๋ฐ˜ํ™˜ db stored procedures ์ง€์†์ ์ธ ๋ชจ๋“ˆ์€ DB์„œ๋ฒ„ ๋กœ์ปฌ์— ์ €์žฅ๋จ ์žฅ์  : ์—ฌ๋Ÿฌ ์‘์šฉํ”„๋กœ๊ทธ๋žจ์— ์‚ฌ์šฉ, ์†Œํ†ต ๋น„์šฉ ๊ฐ์†Œ, ์œตํ†ต์„ฑ SQL persistent stored modules : ์˜๊ตฌ์ €์žฅ ๋ชจ๋“ˆ SQL/PSM SQL + stored functions + a.. 2022. 12. 30.
[DB] SQL ProgrammingโŒจ๏ธ (1) Database Programming ๋ชฉํ‘œ : ๋Œ€ํ™”ํ˜• ์ธํ„ฐํŽ˜์ด์Šค๊ฐ€ ์•„๋‹Œ ์‘์šฉํ”„๋กœ๊ทธ๋žจ์—์„œ DB์— ์ ‘๊ทผ ์™œ? : ํŽธ๋ฆฌํ•˜์ง€๋งŒ ๋ถˆ์ถฉ๋ถ„ํ•˜๊ณ , ๋Œ€๋ถ€๋ถ„์ด ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ์—์„œ ๋งŒ๋“ค์–ด์ง DB programming Approaches (์ ‘๊ทผ๋ฐฉ๋ฒ•) ์ž„๋ฒ ๋””๋“œ ํ•จ์ˆ˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ (API) ์ƒˆ ์–ธ์–ด : DBPL (Database Programming Language) → ๋ถˆ์ผ์น˜๋ฅผ ์ตœ์†Œํ™”ํ•  ์ˆ˜ ์žˆ์Œ Impedance Mismatch : ์ž„ํ”ผ๋˜์Šค ๋ถˆ์ผ์น˜ ํ˜ธ์ŠคํŠธ ์–ธ์–ด์™€ DB๋ชจ๋ธ ์‚ฌ์ด์˜ ๋น„ํ˜ธํ™˜์„ฑ Typical sequence of interaction in DB Programming ํด๋ผ์ด์–ธํŠธ ํ”„๋กœ๊ทธ๋žจ์ด DB์„œ๋ฒ„์™€์˜ ์—ฐ๊ฒฐ์„ open ํด๋ผ์ด์–ธํŠธ ํ”„๋กœ๊ทธ๋žจ์ด ์งˆ์˜์–ด๋ฅผ ๋ณด๋ƒ„ DB์ ‘๊ทผ์ด ํ•„์š”์—†์–ด์ง€๋ฉด ์ ‘์† ์ข…๋ฃŒ Embedded SQL COBOL, C.. 2022. 12. 30.
728x90
๋ฐ˜์‘ํ˜•