background preloader

Databases

Facebook Twitter

Google BigTable

Michael Stonebraker: The End of an Architectural Era. File Locking And Concurrency In SQLite Version 3. Small. Fast. Reliable.Choose any three. This document was originally created in early 2004 when SQLite version 2 was still in widespread use and was written to introduce the new concepts of SQLite version 3 to readers who were already familiar with SQLite version 2. But these days, most readers of this document have probably never seen SQLite version 2 and are only familiar with SQLite version 3. Nevertheless, this document continues to serve as an authoritative reference to how database file locking works in SQLite version 3.

The document only describes locking for the older rollback-mode transaction mechanism. 1.0 File Locking And Concurrency In SQLite Version 3 SQLite Version 3.0.0 introduced a new locking and journaling mechanism designed to improve concurrency over SQLite version 2 and to reduce the writer starvation problem. 2.0 Overview Locking and concurrency control are handled by the pager module. 3.0 Locking 4.0 The Rollback Journal A journal is hot if... 5.1 Writer starvation.

SQL

Functional Dependency Armstrong’s Axioms. CIS 611: Functional Dependencies, Armstrong’s Axioms, B-Axioms. CIS 611: Functional Dependencies, Armstrong’s Axioms, B-Axioms (Maier, D. (1986). The Theory of Relational Databases. Computer Science Press.) Chapter 4: Functional Dependencies. Data dependencies are constraints imposed on data in database. They are part of the scheme definition A conjecture (It has to be proven) is that a set of functional dependencies and one join dependency are enough to express the dependency structure of a relational database scheme. Motivation: Functional dependencies help in accomplishing the following two goals: (a) controlling redundancy and (b) enhancing data reliability. Functional Dependencies: Definition: Let Uj be a subset of the universal set of attributes u . If t1[X] = t2[X] => t2[Y] = t1[Y] If X à Y we say X functionally determines Y.

Example Consider the department store database: EMP (name, salary, dept, mgr)SALES (dept, item)SUPPLY (supplier, item)ITEM (item, color, qty) Consider the following data dependencies (assume no duplicate names) F1. F2. F3. F4. Infolab.stanford.edu/~ullman/fcdb/spr99/lec5.pdf. Introduction to Databases. Computer science - database refinement - minimal cover of F (extraneous attributes) Www.ugrad.cs.ubc.ca/~cs304/2011S1/tutorials/MinimalCover3NFWorkedExample.pdf. Minimal Cover. Www.csee.umbc.edu/~pmundur/courses/CMSC661-05/Minimal-cover-example.pdf.