#+TITLE: Purpose of database systems * Issues with Filesystem vs Database ** Redundancy In two different departments, might keep the same data unnecessarily. ** Inconsistency Data in one place might change, but does not automatically change elsewhere. * Purpose of DB systems ** Data isolation - multiple files and formats How data is stored is not important to the DB user ** Integrity problems Keeping all data within some requirements (e.g. 0 <= GPA <= 4.0) ** Atomiciticy of updates All updates should be all or nothing: + Giving friend $100 READ A; A -= 100; UPDATE A; READ B; B += 100; UPDATE B; - If fails before B updated but A is updated, should roll back ** Concurrent access Correct order of execution on each piece of data - filesystem won't protect against ** Security problems Some DB users should only be able to access global/their own data - filesystem shows entire file * History ** Earliest systems were sheets of paper kept in wooden file cabinets ** They were trying to make it right since 60's *** Hierarchial Model - IBM (~1968) Used Trees with parent-child nodes USU / \ Jane Dave / / \ CS5800 CS5800 CS5050 Issue: Cannot have a common parent. To find which students take a single course, must iterate over all. Cannot have many-to-many relationships *** Network Model - General Electric Used Graphs USU / \ Jane Dave \ / \ CS5800 CS5050 Issue: Still uses pointers (difficult, need to know exactly where address is) Still cannot have a node without a parent - cannot have a course without students *** Relational - IBM (Codd's Model) (~70's) The issue with both Network & Hierarchial is they still use "linked lists". + Provided mathematical foundation for Relational DB's + Big Abstraction win: Seperated physical storage of data from its conceptual representation (no pointers!) + Introduced high level query language *** GIS (~80's) *** 90's Multimedia databases, real-time-databases, xml, NOSQL database