Summer School 2012




Databases
      Yuriy Guts
     R&D Engineer

  yuriy.guts@eleks.com
Summer School 2012




Why do we need databases?

   Try answering this question:
 Why do we need computers?


            ??      ?
Summer School 2012




Why do we need databases?

     Computer Science
          Is it a science?
    Is it about computers?

  “Datalogy” — Peter Naur, 1961
Summer School 2012




Navigational databases (1960-s)
Summer School 2012




Relational databases (1970-s)
Summer School 2012




Relational Algebra 101
   Set Union                         Natural Join

Set Intersection                      Equi-Join

Cartesian Product                     Semi-Join

   Projection                         Anti-Join

    Selection                          Division

    Rename                           Outer Join
Summer School 2012




 Entity Relationship & (De)Normalization
Association Cardinality
  • One-to-one
  • One-to-many
  • Many-to-many
Normal Forms
 • 1NF       •   4NF
 • 2NF       •   5NF
 • 3NF       •   DKNF
 • BCNF      •   6NF
Summer School 2012




Structured Query Language (SQL)
Summer School 2012




Storage: B-Tree, Indexing
Summer School 2012




Database as a Concurrent Storage
             Transaction Properties (“ACID”)

                    A      Atomicity

                     C     Consistency

                     I     Isolation

                    D      Durability

     Although transactions can have different isolation levels!
Lower levels can improve performance, but with a price (side effects)
Summer School 2012




Relational DBMS Products
Object-Relational Mapping (ORM)
Object-Relational Mapping (ORM)
ORM: Example (Entity Framework)
ORM: Design Approaches

       Database First

        Model First

         Code First
Does life exist beyond RDBMS?
Multidimensional Data
Business Intelligence
•   Data Analysis
•   Performance Measurement
•   Enterprise Reporting
•   Knowledge Management
•   Data Mining
Summer School 2012




                  NoSQL Databases
Key-Value Store        Document Store     Multivalue Store

 Graph Store           Object Database     RDF Database
Summer School 2012




Brewer Theorem (“CAP Theorem”)
       A distributed computer system
   cannot provide all three of the following:

             C    Consistency

             A    Availability

             P     Partition Tolerance


    Common case: “Eventual Consistency” databases
Summer School 2012




NoSQL Database Products
Summer School 2012




      Some More DB Types
    Active           Embedded         Knowledge

    Cloud            Federated         Parallel

Data Warehouse      Hypermedia        Real-time

  Distributed        Hypertext         Spatial

  Document           In-memory        Temporal
Summer School 2012




   ??      ?
  Q&A
yuriy.guts@eleks.com
Summer School 2012




Thank you!

ELEKS Summer School 2012: .NET 09 - Databases