210 likes | 432 Views
Databases. Your Phone Bill is a database …. Flat File. CUSTOMERS. CALLS. Entities Relationships One to many Records Tables. CUSTOMERS. CALLS. CUSTOMERS. CALLS. SELECT ALL from CUSTOMERS, CALLS where Customers.number = calls.number and call.number =5556453.
E N D
Databases Your Phone Bill is a database…
Flat File m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
CUSTOMERS CALLS m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
Entities • Relationships • One to many • Records • Tables m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
CUSTOMERS CALLS m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave
CUSTOMERS CALLS 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 histories People, postings, etc What 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 Base • Parts 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 m.cosgrave@ucc.ie www.mikecosgrave.com @mikecosgrave