Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience you may consider using the latest Chrome, Safari or Firefox browser.

Angry birds at anger management

File-based History

Database Principles


2nd lecture

October 2, 2015

Who has
Databases?

Large Google Datacenter Picture Large Google Datacenter Picture

Big Data

Lt Commander Data from Star Trek

I love it when

you call me

Big Data

Iceberg

Big Data is an advantage to those who can use it

Like computers used to be

DEC VT100 terminal DEC VAX computer Filing cabinet

Case Study:

DreamHome Rentals

filing cabinet drawing filing cabinet drawing filing cabinet drawing

Property

Client

Lease

G1–3

G4–7

G8–15

A–H

I–P

Q–Z

2012

2013

2014

property file form client file form lease file form

Any 4-bed houses in Glasgow G12?

Properties in the care of Ann Beech?

Average rent for 2-bed flats in Glasgow G12?

Clients who want a house available for £800 pm?

Leases for renewal within 3 months?

Total rent coming in this month?

What is our busiest month?

Who has the fewest clients in their care?

3 staff with the most properties in their care?

map with pins map with pins
X

We need a computer!

$ addprop
Staff name          >  Ann Beech
Branch number       >  B003
Branch address      >  163 Main St, Glasgow
Property address    >  18 Dale Rd
City                >  Glasgow
Post code           >  G12
Type (h)ouse/(f)lat >  h
Number of rooms     >  5
Rent                >  600
Owner no.           >  CO87
Owner name          >  Carol Farrell
Owner address       >  0141-357-7419
Owner tel no.       >  6 Achray St, Glasgow G32 9DX
Record added: PG21
$ 
$ addprop PG21
Updating PG21, press Return to keep old value.
Staff name          >  Ann Beech
Branch number       >  B003
Branch address      >  163 Main St, Glasgow
Property address    >  18 Dale Rd
City                >  Glasgow
Post code           >  G12
Type (h)ouse/(f)lat >  h
Number of rooms     >  5
Rent                >  600
Owner no.           >  CO87
Owner name          >  Carol Farrell
Owner address       >  0141-357-74196 Achray St, Glasgow G32 9DX
Owner tel no.       >  6 Achray St, Glasgow G32 9DX0141-357-7419
Record updated: PG21
$ 
$ listprop
ID   | Address      | City     | PostCd  | Type  | Rent | BrNo | Staff 
-----+--------------+----------+---------+-------+------+------+----------
PG14 | 16 Holhead   | Aberdeen | AB7 5SU | H 6   | 650  | B003 | Ann Beech
PG94 | 6 Argyll St  | London   | NW2     | F 4   | 400  | B003 | Jon Doe
PG4  | 6 Lawrence St| Glasgow  | G11 9QX | F 3   | 350  | B003 | Jon Doe
PG36 | 2 Manor Rd   | Glasgow  | G32 4QX | F 3   | 375  | B003 | Ann Beech
PG21 | 18 Dale Rd   | Glasgow  | G12     | H 5   | 600  | B003 | Ann Beech
PG16 | 5 Novar Dr   | Glasgow  | G12 9AX | F 4   | 450  | B003 | Jon Doe
$ 
$ listprop -rmax 550
ID   | Address      | City     | PostCd  | Type  | Rent | BrNo | Staff 
-----+--------------+----------+---------+-------+------+------+----------
PG94 | 6 Argyll St  | London   | NW2     | F 4   | 400  | B003 | Jon Doe
PG4  | 6 Lawrence St| Glasgow  | G11 9QX | F 3   | 350  | B003 | Jon Doe
PG36 | 2 Manor Rd   | Glasgow  | G32 4QX | F 3   | 375  | B003 | Ann Beech
PG16 | 5 Novar Dr   | Glasgow  | G12 9AX | F 4   | 450  | B003 | Jon Doe
$ listprop -p G12
ID   | Address      | City     | PostCd  | Type  | Rent | BrNo | Staff 
-----+--------------+----------+---------+-------+------+------+----------
PG21 | 18 Dale Rd   | Glasgow  | G12     | H 5   | 600  | B003 | Ann Beech
PG16 | 5 Novar Dr   | Glasgow  | G12 9AX | F 4   | 450  | B003 | Jon Doe
$ listprop -p G12 -rmax 550
ID   | Address      | City     | PostCd  | Type  | Rent | BrNo | Staff 
-----+--------------+----------+---------+-------+------+------+----------
PG21 | 18 Dale Rd   | Glasgow  | G12     | H 5   | 600  | B003 | Ann Beech
PG16 | 5 Novar Dr   | Glasgow  | G12 9AX | F 4   | 450  | B003 | Jon Doe
$ 
$ addbprop
Staff name          >  Ann Beech
Branch number       >  B003
Branch address      >  163 Main St, Glasgow
Property address    >  18 Dale Rd
City                >  Glasgow
Post code           >  G12
Type (h)ouse/(f)lat >  h
Number of rooms     >  5
Rent                >  600
Business no.        >  CO87
Business name       >  Farrell Investments
Business address    >  6 Achray St, Glasgow G32 9DX
Business tel no.    >  0141-357-7419
Business contact    >  Carol Farrell
Business type       >  investment
Record added: PG21
$ 

and more…

addprop

addprop v2

addprop v3

listprop

listprop v2

listprop v3

listprop v4

addbprop

convbp

addprop v1

addprop v2

addprop

listprop v1

listprop v2

listprop v3

listprop

addbprop

convbp

addcli v1

addcli

listcli v1

listcli v2

listcli

 

matchpc

addlease v1

addlease

listlses v1

listlses v2

listlses

 

clinolse

duplication of data

data dependence

separated and isolated data

incompatibility of files

fixed processes

lengthy development, no quick answers

proliferation of programs

lack of security

angry bird
angry bird
angry bird
Dream Home ERD

We need a DB!

a shared collection
of logically related data
designed to flexibly meet the information needs of an organization
and to separate data and application code

DBMS

gives controlled access to

  1. define
  2. create
  3. and maintain

the database

DBMS Environment

  1. hardware
  2. software
  3. people
  4. procedures
  5. data

Use a spacebar or arrow keys to navigate