databases your phone bill is a database …. m.cosgrave@ucc.ie @mikecosgrave
Post on 29-Dec-2015
224 Views
Preview:
TRANSCRIPT
Databases
Your Phone Bill is a database…
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
Date Time Number Calling Duration
08-02-12 14:15 5556453 5551234 2:20
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
Flat File
Date Time Number Calling Duration20-10-11 16:39 5556453 5551234 2:20
20-10-11 17:10 5556453 5553456 1:23
20-10-11 17:12 4443456 4356324 2:14
20-10-11 17:12 2345873 0044202345 1:43:15
21-10-11 02:12 4567432 5679876 2:14
21_10_11 02:15 4567432 5679876 3:45
21-10-11 08:43 4536857 189056789 3:10
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
Date Time Number Calling Duration20-10-11 16:39 5556453 5551234 2:20
20-10-11 17:10 5556453 5553456 1:23
20-10-11 17:12 4443456 4356324 2:14
20-10-11 17:12 2345873 0044202345 1:43:15
21-10-11 02:12 4567432 5679876 2:14
21_10_11 02:15 4567432 5679876 3:45
21-10-11 08:43 5556453 189056789 3:10
Name House Street Town County Number5556453
CALLS
CUSTOMERS
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
• Entities• Relationships• One to many• Records• Tables
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
Date Time Number Calling Duration20-10-11 16:39 5556453 5551234 2:20
20-10-11 17:10 5556453 5553456 1:23
20-10-11 17:12 4443456 4356324 2:14
20-10-11 17:12 2345873 0044202345 1:43:15
21-10-11 02:12 4567432 5679876 2:14
21_10_11 02:15 4567432 5679876 3:45
21-10-11 08:43 5556453 189056789 3:10
Name House Street Town County Number5556453
CALLS
CUSTOMERS
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
Date Time Number Calling Duration20-10-11 16:39 5556453 5551234 http://
www.census.nationalarchives.ie/reels/nai000888383/
20-10-11 17:10 5556453 5553456 1:23
20-10-11 17:12 4443456 4356324 2:14
20-10-11 17:12 2345873 0044202345 1:43:15
21-10-11 02:12 4567432 5679876 2:14
21_10_11 02:15 4567432 5679876 3:45
21-10-11 08:43 5556453 189056789 3:10
Name House Street Town County Number5556453
CALLS
CUSTOMERS
SELECT ALL from CUSTOMERS, CALLS where Customers.number = calls.number and call.number=5556453
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
Finding Entities and Relationships
1946 Foreign Office List – service historiesPeople, postings, etcWhat are the Entities? The relationships?Draw an ER Diagram
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
• Sample solutions to ER Diag exercise
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
1901 Census of Ireland
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
1901 Census Forms
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
1901 Census Forms
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
Here’s one I prepared earlier..1901 Census in LibreOffice BaseParts of Database• Tables• Queries• Forms• Reports
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
Query By Example
• Show QBE
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
Structured Query Language
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
Interrogating data• Individuals• Families• Buildings
– Landholder– Class of Building– List of specific out buildings
• So how would you dig out– Literacy by Age?– Literacy by occupation?– Literacy by homeownership?– Religion and home ownership?– Children not in school?– Live in servants?– Servants and class of house?
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
• SQL Exercise
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
Hollerith, 1890 Census, Hollerith Cards
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
Coding, Datatypes
m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
• Coding exercise
top related