SlideShare a Scribd company logo
1 of 26
An Introduction to 
Relational Databases 
Dr James A J Wilson 
Dr Meriel Patrick 
18 July, 2014
18 July, 2014 
Page 2 
Relational Databases 
 Defined in 1970 
 First commercially available relational database management 
system released by Oracle in 1979 
 Widespread adoption by both business and research 
communities 
 Underpin many websites 
 Well understood and widely supported 
Digital Humanities Summer School - 
An Introduction to Relational Databases
Options when structuring data 
 Spreadsheets 
 Recording the common properties of a single thing 
 Numerical analysis 
 Generating charts and graphs 
 Relational databases 
 Recording the common properties of multiple related things 
 Flexible querying 
 Document-orientated databases / ‘semi-structured’ databases 
 Recording items which share some common properties 
 Avoids need to define rigid structure in advance 
 XML / XML databases 
 Categorizing elements of text 
 RDF (Resource Description Framework) triplestores 
 Records relationships between things (basis of Semantic Web) 
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 3
When to use a relational database 
 You are collecting information about things which share 
common properties 
 You want to be able to list particular records that meet certain 
conditions 
 You wish to encourage consistency 
 You want to be efficient, and avoid duplication of information 
 You value flexibility when querying 
 Good for collaborative working – one person sets up the 
database, many can edit the data, many more can view or 
query the data 
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 4
Structure of a relational database - tables 
 Example scenario: study of 18th century book trade 
 What things are we interested in? 
 Publications 
 Publishers 
 People 
 Our sources for the information we’re collecting 
 And what information might we want to know about each of 
these things? 
 Names 
 Dates 
 Places 
 References 
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 5
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 6 
Person 
Surname 
First name 
Middle initial(s) 
Date of birth 
Notes 
Publication 
Title 
Author(s) 
Publisher 
Date of publication 
Place of publication 
Edition 
Format 
Type of publication 
Price 
Sales 
Notes 
Publisher 
Name 
Staff 
Founded 
Ceased 
Address 
Notes 
Reference 
Author(s) 
Title 
Date of publication 
Edition 
Volume 
Page(s) 
URL 
Notes
Structure of a relational database – data 
types 
 Most relational database management systems require that 
each field has a defined data type 
 Text (e.g. varchar, memo) 
 Numeric (e.g. integer, decimal) 
 Date 
 Boolean (true / false; on / off) 
 Blob (for otherwise undefined data, such as image files) 
 Each table needs at least one field that only contains unique 
values, which can be used as a ‘primary key’ 
 Commonly an auto-incrementing whole (integer) number 
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 7
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 8 
Person 
ID Int 
Surname Text 
First name Text 
Middle 
Text 
initial(s) 
Date of birth Date 
Notes Text 
Publication 
ID Int 
Title Text 
Author(s) Text 
Publisher Text 
Date of 
Int? 
publication 
Place of 
publication 
Text 
Edition Int 
Format Text 
Type of 
Text 
publication 
Price Dec? 
Sales Int? 
Notes Text 
Publisher 
ID Int 
Name Text 
Staff Text 
Founded Int? 
Ceased Int? 
Address Text 
Notes Text 
Reference 
ID Int 
Author(s) Text 
Title Text 
Date of 
Int? 
publication 
Edition Int? 
Volume Int? 
Page(s) Text 
? 
URL Text 
Notes Text
Structure of a relational database - 
relationships 
 Our different things are related to one another 
 A person may be the author of a publication, or a reference work, or 
they may be a publisher 
 Each edition of a publication has a publisher, or maybe more than 
one? 
 The information you record about a particular publication, or 
publisher, may come from one or more sources 
 Relationships between things can be of various sorts: 
 One-to-many (e.g. a publisher may have many publications) 
 Many-to-many (e.g. a publication may have many authors, and an 
author may have many publications) 
 One-to-one (rarely used – can improve performance, overcome 
system limitations, or enable more granular access permissions) 
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 9
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 10 
Person 
ID Int 
Surname Text 
First name Text 
Middle 
Text 
initial(s) 
Date of birth Date 
Reference Int 
Page Text 
Notes Text 
Publication 
ID Int 
Title Text 
Author(s) INT 
Publisher INT 
Date of 
Int? 
publication 
Place of 
publication 
Text 
Edition Int 
Format Text 
Type of 
Text 
publication 
Price Dec? 
Sales Int? 
Reference Int 
Page Text 
Notes Text 
Publisher 
ID Int 
Name Text 
Staff Text 
Founded Int? 
Ceased Int? 
Address Text 
Reference Int 
Page Text 
Notes Text 
Reference 
ID Int 
Author(s) Text 
Title Text 
Date of 
Int? 
publication 
Edition Int? 
Volume Int? 
URL Text 
Notes Text 
1 
∞ 
? 
1 
∞ 
∞ 
∞
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 11 
Person 
ID Int 
Surname Text 
First name Text 
Middle 
Text 
initial(s) 
Date of birth Date 
Reference Int 
Page Text 
Notes Text 
Publication 
ID Int 
Title Text 
Author(s) INT 
Publisher INT 
Date of 
Int? 
publication 
Place of 
publication 
Text 
Edition Int 
Format Text 
Type of 
Text 
publication 
Price Dec? 
Sales Int? 
Reference Int 
Page Text 
Notes Text 
Publisher 
ID Int 
Name Text 
Staff Text 
Founded Int? 
Ceased Int? 
Address Text 
Reference Int 
Page Text 
Notes Text 
Reference 
ID Int 
Author(s) Text 
Title Text 
Date of 
Int? 
publication 
Edition Int? 
Volume Int? 
URL Text 
Notes Text 
1 
∞ 
many 
to ? 
Many 1 
∞ 
∞ 
∞
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 12 
Authorship 
ID Int 
Author Int 
Publication Int 
Person 
ID Int 
Surname Text 
First name Text 
Middle 
Text 
initial(s) 
Date of birth Date 
Reference Int 
Page Text 
Notes Text 
Publication 
ID Int 
Title Text 
Publisher INT 
Date of 
Int? 
publication 
Place of 
publication 
Text 
Edition Int 
Format Text 
Type of 
Text 
publication 
Price Dec? 
Sales Int? 
Reference Int 
Page Text 
Notes Text 
Publisher 
ID Int 
Name Text 
Staff Text 
Founded Int? 
Ceased Int? 
Address Text 
Reference Int 
Page Text 
Notes Text 
Reference 
ID Int 
Author(s) Text 
Title Text 
Date of 
Int? 
publication 
Edition Int? 
Volume Int? 
URL Text 
Notes Text 
1 
∞ 
many 
to ? 
Many 1 
∞ 
∞ 
∞
Alternative structures 
 If you are certain that no publication is going to have more than 
three authors, your might want to have fields in the ‘publication’ 
table for author1, author2, author3 – each with a one-to-many 
relationship with the ‘person’ table 
 You could create another table just consisting of IDs and 
different types of publication. This could then be linked to the 
‘publication’ table and act as a controlled vocabulary 
 Have a separate table for edition information. In most cases 
authors will not change, format might, sales and price almost 
certainly will. This will avoid data duplication 
 But maybe authors will be credited differently (anon revealed?), or 
titles vary between editions? 
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 13
Database design – good practice 
 Database normalization: 
 Shouldn’t have to enter the same data twice 
 Separate tables for separate things 
 Don’t define duplicate fields in the same table (e.g. author1, author2, etc.) 
 Fields should be ‘atomic’ – containing information at the most granular level 
(usually) 
 Enforce data integrity 
 Keep ‘blobs’ of data (images, audio, etc.) outside of your database or at the very 
least in separate tables; include links to the files within the database 
 Table / field naming conventions: 
 Be consistent 
 Avoid spaces, punctuation marks, and other non-alphanumeric characters 
(although it’s fine to use underscores instead of spaces) 
 Document your database! You will thank yourself later 
18 July, 2014 
Page 14 
Digital Humanities Summer School - 
An Introduction to Relational Databases
Database design workflow 
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 15
Querying a relational database 
 Queries usually constructed using SQL statements 
 SQL stands for ‘Structure Query Language’ 
 Some Relational Database Management Systems hide the raw SQL 
from the user by providing query-builder tools 
 SELECT statements indicate which fields should be returned 
 FROM statements indicate the table(s) in which those fields are 
to be found 
 JOIN statements are used when you wish to query multiple 
tables 
 WHERE statement provide the conditions that a record must 
meet in order to be listed in results 
 ORDER BY statements control the order in which results are 
returned 
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 16
Querying a relational database - examples 
 Imagine we have a single table in a database, called ‘countries’ 
18 July, 2014 
Page 17 
Digital Humanities Summer School - 
An Introduction to Relational Databases 
Countries 
ID Int. 
name Text 
area Int. 
population Int. 
continent Text 
If_visited Bool. 
observations Text 
SELECT * FROM Countries 
would return all information about all countries 
SELECT name, area, population FROM Countries 
would return only the information in the named fields 
SELECT * FROM Countries WHERE visited = TRUE 
would return all information about countries that have been visited 
SELECT * FROM Countries WHERE visited = TRUE AND 
population > 1000000 
would return all information about countries that have been visited 
and have a population of greater than a million
Querying a relational database - examples 
 JOINS are used to search across multiple tables 
WHERE c.visited = TRUE AND d.name = ‘Europe’ 
would return selected information 
about each European country visited 
18 July, 2014 
Page 18 
 SELECT c.name, c.area, c.population, d.name 
FROM Countries c INNER JOIN Continents d 
ON c.continent = d.ID 
Digital Humanities Summer School - 
An Introduction to Relational Databases 
Countries 
ID Int. 
name Text 
area Int. 
population Int. 
continent Int. 
If_visited Bool. 
observations Text 
Continents 
ID Int. 
name Text 
area Int.
What query results look like 
 A single table / spreadsheet 
 Although software / websites may format results into a report. 
18 July, 2014 
Page 19 
Digital Humanities Summer School - 
An Introduction to Relational Databases
What can you do with your results? 
 Count, sort, and sometimes filter further 
 Export and analyse 
 .csv file format is standard, and compatible with almost all statistical 
analysis / data visualisation software 
 Save and make available to others 
18 July, 2014 
Page 20 
Digital Humanities Summer School - 
An Introduction to Relational Databases
Common database challenges in the 
humanities 
 Patchy or incomplete data 
 Beware of the difference between 0 and null 
 Varying degrees of accuracy 
 Often an issue with historical dates 
 Splitting the separate elements of a date into separate fields may help 
 Interpreted and uncertain information 
 Include a field indicating the degree of certainty of a particular ‘fact’ – 
e.g. ‘Definite, Probable, Possible’ 
 Inconsistent or changing terminology 
 Alternative spellings, different forms of address, name changes 
 Can be an idea to have a table of controlled vocabulary 
 ‘Fuzziness’ vs. ‘queryableness’ 
 e.g. if you store a data as ‘c. 310 BCE’, you can’t use it in a conditional 
query such as ‘list all the inscriptions from the fourth century BCE 
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 21
Your exercise today… 
 Draft a structure for a relational database recording information 
about membership of gentlemen’s clubs in Victorian London 
 Think about the tables, fields, and relationships you’d need 
 Your evidence collection (membership records, letters, diaries, 
etc.) tells you which clubs people belonged to, and when 
 However, the information is patchy 
 Names may not be given in full – identity is sometimes uncertain 
 Dates may be uncertain or missing 
 All clubs have multiple members; some people were members 
of multiple clubs at varying periods 
 Over the years, some clubs changed locations 
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 22
Our example solution 
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 23
Possible enhancements 
 If dates are uncertain, integer may not be the best data type. 
 Make the relationship between club_memberships and 
evidence many-to-many rather than one-to-many 
 Done by adding a link table 
 Split author entries into a separate table 
 Allows multiple authors for each piece of evidence 
 Impose a controlled vocabulary on the occupation field by 
adding a look-up table 
 Add longitude and latitude to the addresses table. 
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 24
Relational Database Management 
Systems 
 Databases can seem rather complicated, but there is software 
that can help 
 MS Access 
 Filemaker Pro 
 Coming soon to Oxford – the Online Research Database Service 
(ORDS) 
 For web-hosted relational database manipulation: 
 MySQL 
 PostgreSQL 
Digital Humanities Summer School - 18 July, 2014 
An Introduction to Relational Databases Page 25
Questions? 
18 July, 2014 
Page 26 
Digital Humanities Summer School - 
An Introduction to Relational Databases

More Related Content

What's hot

Cataloging Basics Webinar (NEKLS)
Cataloging Basics Webinar (NEKLS)Cataloging Basics Webinar (NEKLS)
Cataloging Basics Webinar (NEKLS)Heather Braum
 
Human resource
Human resourceHuman resource
Human resourceArun Kumar
 
English1020 Literary Themes
English1020 Literary ThemesEnglish1020 Literary Themes
English1020 Literary ThemesDan Overfield
 
Secrets of the Library Catalog (MARC, metadata, cataloging, RDA)
Secrets of the Library Catalog (MARC, metadata, cataloging, RDA)Secrets of the Library Catalog (MARC, metadata, cataloging, RDA)
Secrets of the Library Catalog (MARC, metadata, cataloging, RDA)robin fay
 
Basics of Cataloging
Basics of CatalogingBasics of Cataloging
Basics of CatalogingBuzz Haughton
 
W E S T L A W Q U I C K R E F E R E N C E G U I D E
W E S T L A W  Q U I C K  R E F E R E N C E  G U I D EW E S T L A W  Q U I C K  R E F E R E N C E  G U I D E
W E S T L A W Q U I C K R E F E R E N C E G U I D EWilliam Kritsonis
 
Special Topics: Authority Control and Creating Access Points
Special Topics: Authority Control and Creating Access PointsSpecial Topics: Authority Control and Creating Access Points
Special Topics: Authority Control and Creating Access PointsALAeLearningSolutions
 
Descriptive cataloging: Overview
Descriptive cataloging:  OverviewDescriptive cataloging:  Overview
Descriptive cataloging: OverviewJohan Koren
 

What's hot (12)

Cataloging Basics Webinar (NEKLS)
Cataloging Basics Webinar (NEKLS)Cataloging Basics Webinar (NEKLS)
Cataloging Basics Webinar (NEKLS)
 
Human resource
Human resourceHuman resource
Human resource
 
Research Skills 2
Research Skills 2Research Skills 2
Research Skills 2
 
Special Topics: Data Provenance
Special Topics: Data ProvenanceSpecial Topics: Data Provenance
Special Topics: Data Provenance
 
English1020 Literary Themes
English1020 Literary ThemesEnglish1020 Literary Themes
English1020 Literary Themes
 
Secrets of the Library Catalog (MARC, metadata, cataloging, RDA)
Secrets of the Library Catalog (MARC, metadata, cataloging, RDA)Secrets of the Library Catalog (MARC, metadata, cataloging, RDA)
Secrets of the Library Catalog (MARC, metadata, cataloging, RDA)
 
NCompass Live: Cataloging with RDA
NCompass Live: Cataloging with RDANCompass Live: Cataloging with RDA
NCompass Live: Cataloging with RDA
 
Fleck2013 fall
Fleck2013 fallFleck2013 fall
Fleck2013 fall
 
Basics of Cataloging
Basics of CatalogingBasics of Cataloging
Basics of Cataloging
 
W E S T L A W Q U I C K R E F E R E N C E G U I D E
W E S T L A W  Q U I C K  R E F E R E N C E  G U I D EW E S T L A W  Q U I C K  R E F E R E N C E  G U I D E
W E S T L A W Q U I C K R E F E R E N C E G U I D E
 
Special Topics: Authority Control and Creating Access Points
Special Topics: Authority Control and Creating Access PointsSpecial Topics: Authority Control and Creating Access Points
Special Topics: Authority Control and Creating Access Points
 
Descriptive cataloging: Overview
Descriptive cataloging:  OverviewDescriptive cataloging:  Overview
Descriptive cataloging: Overview
 

Viewers also liked

презентация проекта
презентация проектапрезентация проекта
презентация проектаGulnaz Shakirova
 
Разработчик, аналитик, заказчик — как найти общий язык?
Разработчик, аналитик, заказчик — как найти общий язык?Разработчик, аналитик, заказчик — как найти общий язык?
Разработчик, аналитик, заказчик — как найти общий язык?ngrebnev
 
3 средства автоматизации проектирования корпоративных приложений
3 средства автоматизации проектирования корпоративных приложений3 средства автоматизации проектирования корпоративных приложений
3 средства автоматизации проектирования корпоративных приложенийKewpaN
 
Типовое проектирование эис
Типовое проектирование эисТиповое проектирование эис
Типовое проектирование эисadam93
 
Системный проект и Дирекция государственной программы "Информационный город 2...
Системный проект и Дирекция государственной программы "Информационный город 2...Системный проект и Дирекция государственной программы "Информационный город 2...
Системный проект и Дирекция государственной программы "Информационный город 2...Moscow IT Department
 
Тьюториал "Введение в системную инженерию" (15 января 2013)
Тьюториал "Введение в системную инженерию" (15 января 2013)Тьюториал "Введение в системную инженерию" (15 января 2013)
Тьюториал "Введение в системную инженерию" (15 января 2013)Anatoly Levenchuk
 
Тьюториал "Введение в системную инженерию" (14 января 2013)
Тьюториал "Введение в системную инженерию" (14 января 2013)Тьюториал "Введение в системную инженерию" (14 января 2013)
Тьюториал "Введение в системную инженерию" (14 января 2013)Anatoly Levenchuk
 
А.Левенчук -- Интеллект-стек: как создаётся Deus ex Machina
А.Левенчук -- Интеллект-стек: как создаётся Deus ex MachinaА.Левенчук -- Интеллект-стек: как создаётся Deus ex Machina
А.Левенчук -- Интеллект-стек: как создаётся Deus ex MachinaAnatoly Levenchuk
 
Принципы построения современных систем управления жизненным циклом
Принципы построения современных систем управления жизненным цикломПринципы построения современных систем управления жизненным циклом
Принципы построения современных систем управления жизненным цикломAnatoly Levenchuk
 
Системная инженерия
Системная инженерияСистемная инженерия
Системная инженерияAtner Yegorov
 
Инженерия системной архитектуры
Инженерия системной архитектурыИнженерия системной архитектуры
Инженерия системной архитектурыAnatoly Levenchuk
 
А.Левенчук -- декомпозиция системы
А.Левенчук -- декомпозиция системыА.Левенчук -- декомпозиция системы
А.Левенчук -- декомпозиция системыAnatoly Levenchuk
 
А.Левенчук -- ISO 15288 и OMG Essence
А.Левенчук -- ISO 15288 и OMG EssenceА.Левенчук -- ISO 15288 и OMG Essence
А.Левенчук -- ISO 15288 и OMG EssenceAnatoly Levenchuk
 
В.Алейник -- системные подходы П.Чекланда и Г.П.Щедровицкого
В.Алейник -- системные подходы П.Чекланда и Г.П.ЩедровицкогоВ.Алейник -- системные подходы П.Чекланда и Г.П.Щедровицкого
В.Алейник -- системные подходы П.Чекланда и Г.П.ЩедровицкогоAnatoly Levenchuk
 
Семантические информационные модели и ISO 15926
Семантические информационные модели и ISO 15926Семантические информационные модели и ISO 15926
Семантические информационные модели и ISO 15926Anatoly Levenchuk
 
Системная архитектура вместо требований
Системная архитектура вместо требованийСистемная архитектура вместо требований
Системная архитектура вместо требованийМихаил Заборов
 
А.Левенчук -- тренды в инженерии требований
А.Левенчук -- тренды в инженерии требованийА.Левенчук -- тренды в инженерии требований
А.Левенчук -- тренды в инженерии требованийAnatoly Levenchuk
 
А.Левенчук -- интеллект-стек 2016
А.Левенчук -- интеллект-стек 2016А.Левенчук -- интеллект-стек 2016
А.Левенчук -- интеллект-стек 2016Anatoly Levenchuk
 

Viewers also liked (20)

презентация проекта
презентация проектапрезентация проекта
презентация проекта
 
Разработчик, аналитик, заказчик — как найти общий язык?
Разработчик, аналитик, заказчик — как найти общий язык?Разработчик, аналитик, заказчик — как найти общий язык?
Разработчик, аналитик, заказчик — как найти общий язык?
 
3 средства автоматизации проектирования корпоративных приложений
3 средства автоматизации проектирования корпоративных приложений3 средства автоматизации проектирования корпоративных приложений
3 средства автоматизации проектирования корпоративных приложений
 
Типовое проектирование эис
Типовое проектирование эисТиповое проектирование эис
Типовое проектирование эис
 
лекция 10
лекция 10лекция 10
лекция 10
 
Ais Lecture 1
Ais Lecture 1Ais Lecture 1
Ais Lecture 1
 
Системный проект и Дирекция государственной программы "Информационный город 2...
Системный проект и Дирекция государственной программы "Информационный город 2...Системный проект и Дирекция государственной программы "Информационный город 2...
Системный проект и Дирекция государственной программы "Информационный город 2...
 
Тьюториал "Введение в системную инженерию" (15 января 2013)
Тьюториал "Введение в системную инженерию" (15 января 2013)Тьюториал "Введение в системную инженерию" (15 января 2013)
Тьюториал "Введение в системную инженерию" (15 января 2013)
 
Тьюториал "Введение в системную инженерию" (14 января 2013)
Тьюториал "Введение в системную инженерию" (14 января 2013)Тьюториал "Введение в системную инженерию" (14 января 2013)
Тьюториал "Введение в системную инженерию" (14 января 2013)
 
А.Левенчук -- Интеллект-стек: как создаётся Deus ex Machina
А.Левенчук -- Интеллект-стек: как создаётся Deus ex MachinaА.Левенчук -- Интеллект-стек: как создаётся Deus ex Machina
А.Левенчук -- Интеллект-стек: как создаётся Deus ex Machina
 
Принципы построения современных систем управления жизненным циклом
Принципы построения современных систем управления жизненным цикломПринципы построения современных систем управления жизненным циклом
Принципы построения современных систем управления жизненным циклом
 
Системная инженерия
Системная инженерияСистемная инженерия
Системная инженерия
 
Инженерия системной архитектуры
Инженерия системной архитектурыИнженерия системной архитектуры
Инженерия системной архитектуры
 
А.Левенчук -- декомпозиция системы
А.Левенчук -- декомпозиция системыА.Левенчук -- декомпозиция системы
А.Левенчук -- декомпозиция системы
 
А.Левенчук -- ISO 15288 и OMG Essence
А.Левенчук -- ISO 15288 и OMG EssenceА.Левенчук -- ISO 15288 и OMG Essence
А.Левенчук -- ISO 15288 и OMG Essence
 
В.Алейник -- системные подходы П.Чекланда и Г.П.Щедровицкого
В.Алейник -- системные подходы П.Чекланда и Г.П.ЩедровицкогоВ.Алейник -- системные подходы П.Чекланда и Г.П.Щедровицкого
В.Алейник -- системные подходы П.Чекланда и Г.П.Щедровицкого
 
Семантические информационные модели и ISO 15926
Семантические информационные модели и ISO 15926Семантические информационные модели и ISO 15926
Семантические информационные модели и ISO 15926
 
Системная архитектура вместо требований
Системная архитектура вместо требованийСистемная архитектура вместо требований
Системная архитектура вместо требований
 
А.Левенчук -- тренды в инженерии требований
А.Левенчук -- тренды в инженерии требованийА.Левенчук -- тренды в инженерии требований
А.Левенчук -- тренды в инженерии требований
 
А.Левенчук -- интеллект-стек 2016
А.Левенчук -- интеллект-стек 2016А.Левенчук -- интеллект-стек 2016
А.Левенчук -- интеллект-стек 2016
 

Similar to DHOxSS 2014 - Introduction to Relational Databases

Relational database
Relational databaseRelational database
Relational databaseSanthiNivas
 
Referencing, Plagiarism and Paraphrasing
Referencing, Plagiarism and ParaphrasingReferencing, Plagiarism and Paraphrasing
Referencing, Plagiarism and Paraphrasingcolinokeeffe
 
Storing information
Storing informationStoring information
Storing informationFiona Beals
 
Publishing data on the Semantic Web
Publishing data on the Semantic WebPublishing data on the Semantic Web
Publishing data on the Semantic WebPeter Mika
 
Avoiding plagiarism
Avoiding plagiarismAvoiding plagiarism
Avoiding plagiarismJohn Moore
 
Referencing and zotero (business)
Referencing and zotero (business)Referencing and zotero (business)
Referencing and zotero (business)colinokeeffe
 
Ringgold Webinar Series: 3. Lean and Mean - Publication Metadata to Enhance D...
Ringgold Webinar Series: 3. Lean and Mean - Publication Metadata to Enhance D...Ringgold Webinar Series: 3. Lean and Mean - Publication Metadata to Enhance D...
Ringgold Webinar Series: 3. Lean and Mean - Publication Metadata to Enhance D...Ringgold Inc
 
Chapter 11 (buss. English)
Chapter  11 (buss. English)Chapter  11 (buss. English)
Chapter 11 (buss. English)Amaan Hussain
 
ความรู้เบื้องต้นฐานข้อมูล 1
ความรู้เบื้องต้นฐานข้อมูล 1ความรู้เบื้องต้นฐานข้อมูล 1
ความรู้เบื้องต้นฐานข้อมูล 1Witoon Thammatuch-aree
 
Referencing and zotero (arts)
Referencing and zotero (arts)Referencing and zotero (arts)
Referencing and zotero (arts)colinokeeffe
 
DBS Library Harvard Referencing Class Slides
DBS Library Harvard Referencing Class Slides DBS Library Harvard Referencing Class Slides
DBS Library Harvard Referencing Class Slides Trevor Haugh
 
Apa citations for business research
Apa citations for business researchApa citations for business research
Apa citations for business researchlindahauck
 
Databases and its representation
Databases and its representationDatabases and its representation
Databases and its representationRuhull
 
The web of data: how are we doing so far?
The web of data: how are we doing so far?The web of data: how are we doing so far?
The web of data: how are we doing so far?Elena Simperl
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to databaseSuleman Memon
 
Generic lecture 3 literature review tutor
Generic lecture 3 literature review  tutorGeneric lecture 3 literature review  tutor
Generic lecture 3 literature review tutormoduledesign
 
18 database features
18 database features18 database features
18 database featuresRebecca Jones
 

Similar to DHOxSS 2014 - Introduction to Relational Databases (20)

Introduction to Relational Databases
Introduction to Relational DatabasesIntroduction to Relational Databases
Introduction to Relational Databases
 
Relational database
Relational databaseRelational database
Relational database
 
Referencing, Plagiarism and Paraphrasing
Referencing, Plagiarism and ParaphrasingReferencing, Plagiarism and Paraphrasing
Referencing, Plagiarism and Paraphrasing
 
Referencing guideline 2
Referencing guideline 2Referencing guideline 2
Referencing guideline 2
 
Storing information
Storing informationStoring information
Storing information
 
Database
DatabaseDatabase
Database
 
Publishing data on the Semantic Web
Publishing data on the Semantic WebPublishing data on the Semantic Web
Publishing data on the Semantic Web
 
Avoiding plagiarism
Avoiding plagiarismAvoiding plagiarism
Avoiding plagiarism
 
Referencing and zotero (business)
Referencing and zotero (business)Referencing and zotero (business)
Referencing and zotero (business)
 
Ringgold Webinar Series: 3. Lean and Mean - Publication Metadata to Enhance D...
Ringgold Webinar Series: 3. Lean and Mean - Publication Metadata to Enhance D...Ringgold Webinar Series: 3. Lean and Mean - Publication Metadata to Enhance D...
Ringgold Webinar Series: 3. Lean and Mean - Publication Metadata to Enhance D...
 
Chapter 11 (buss. English)
Chapter  11 (buss. English)Chapter  11 (buss. English)
Chapter 11 (buss. English)
 
ความรู้เบื้องต้นฐานข้อมูล 1
ความรู้เบื้องต้นฐานข้อมูล 1ความรู้เบื้องต้นฐานข้อมูล 1
ความรู้เบื้องต้นฐานข้อมูล 1
 
Referencing and zotero (arts)
Referencing and zotero (arts)Referencing and zotero (arts)
Referencing and zotero (arts)
 
DBS Library Harvard Referencing Class Slides
DBS Library Harvard Referencing Class Slides DBS Library Harvard Referencing Class Slides
DBS Library Harvard Referencing Class Slides
 
Apa citations for business research
Apa citations for business researchApa citations for business research
Apa citations for business research
 
Databases and its representation
Databases and its representationDatabases and its representation
Databases and its representation
 
The web of data: how are we doing so far?
The web of data: how are we doing so far?The web of data: how are we doing so far?
The web of data: how are we doing so far?
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
Generic lecture 3 literature review tutor
Generic lecture 3 literature review  tutorGeneric lecture 3 literature review  tutor
Generic lecture 3 literature review tutor
 
18 database features
18 database features18 database features
18 database features
 

More from Research Support Team, IT Services, University of Oxford

More from Research Support Team, IT Services, University of Oxford (20)

Preparing Your Research Material for the Future - 2018-06-08 - Humanities Div...
Preparing Your Research Material for the Future - 2018-06-08 - Humanities Div...Preparing Your Research Material for the Future - 2018-06-08 - Humanities Div...
Preparing Your Research Material for the Future - 2018-06-08 - Humanities Div...
 
Preparing Your Research Material for the Future - 2017-02-22 - Humanities Div...
Preparing Your Research Material for the Future - 2017-02-22 - Humanities Div...Preparing Your Research Material for the Future - 2017-02-22 - Humanities Div...
Preparing Your Research Material for the Future - 2017-02-22 - Humanities Div...
 
Research Data Management Plan: How to Write One - 2017-02-01 - University of ...
Research Data Management Plan: How to Write One - 2017-02-01 - University of ...Research Data Management Plan: How to Write One - 2017-02-01 - University of ...
Research Data Management Plan: How to Write One - 2017-02-01 - University of ...
 
Introduction to Research Data Management - 2017-02-15 - MPLS Division, Univer...
Introduction to Research Data Management - 2017-02-15 - MPLS Division, Univer...Introduction to Research Data Management - 2017-02-15 - MPLS Division, Univer...
Introduction to Research Data Management - 2017-02-15 - MPLS Division, Univer...
 
Preparing Your Research Material for the Future - 2016-11-16 - Humanities Div...
Preparing Your Research Material for the Future - 2016-11-16 - Humanities Div...Preparing Your Research Material for the Future - 2016-11-16 - Humanities Div...
Preparing Your Research Material for the Future - 2016-11-16 - Humanities Div...
 
Writing a Research Data Management Plan - 2016-11-09 - University of Oxford
Writing a Research Data Management Plan - 2016-11-09 - University of OxfordWriting a Research Data Management Plan - 2016-11-09 - University of Oxford
Writing a Research Data Management Plan - 2016-11-09 - University of Oxford
 
Preparing Your Research Material for the Future 2016-05-16 - Humanities Divis...
Preparing Your Research Material for the Future 2016-05-16 - Humanities Divis...Preparing Your Research Material for the Future 2016-05-16 - Humanities Divis...
Preparing Your Research Material for the Future 2016-05-16 - Humanities Divis...
 
Preparing Your Research Material for the Future - 2016-02-22 - Humanities Div...
Preparing Your Research Material for the Future - 2016-02-22 - Humanities Div...Preparing Your Research Material for the Future - 2016-02-22 - Humanities Div...
Preparing Your Research Material for the Future - 2016-02-22 - Humanities Div...
 
Data Management Planning for Researchers - 2016-02-08 - University of Oxford
Data Management Planning for Researchers - 2016-02-08 - University of OxfordData Management Planning for Researchers - 2016-02-08 - University of Oxford
Data Management Planning for Researchers - 2016-02-08 - University of Oxford
 
Introduction to Research Data Management - 2016-02-03 - MPLS Division, Univer...
Introduction to Research Data Management - 2016-02-03 - MPLS Division, Univer...Introduction to Research Data Management - 2016-02-03 - MPLS Division, Univer...
Introduction to Research Data Management - 2016-02-03 - MPLS Division, Univer...
 
Preparing Your Research Material for the Future - 2015-11-16 - Humanities Div...
Preparing Your Research Material for the Future - 2015-11-16 - Humanities Div...Preparing Your Research Material for the Future - 2015-11-16 - Humanities Div...
Preparing Your Research Material for the Future - 2015-11-16 - Humanities Div...
 
Data Management Planning for Researchers - An Introduction - 2015-11-04 - Un...
 Data Management Planning for Researchers - An Introduction - 2015-11-04 - Un... Data Management Planning for Researchers - An Introduction - 2015-11-04 - Un...
Data Management Planning for Researchers - An Introduction - 2015-11-04 - Un...
 
Preparing Your Research Data for the Future - 2015-06-08 - Medical Sciences D...
Preparing Your Research Data for the Future - 2015-06-08 - Medical Sciences D...Preparing Your Research Data for the Future - 2015-06-08 - Medical Sciences D...
Preparing Your Research Data for the Future - 2015-06-08 - Medical Sciences D...
 
Introduction to Research Data Management - 2015-05-27 - Social Sciences Divis...
Introduction to Research Data Management - 2015-05-27 - Social Sciences Divis...Introduction to Research Data Management - 2015-05-27 - Social Sciences Divis...
Introduction to Research Data Management - 2015-05-27 - Social Sciences Divis...
 
Preparing Your Research Material for the Future - 2015-05-20 - Humanities Div...
Preparing Your Research Material for the Future - 2015-05-20 - Humanities Div...Preparing Your Research Material for the Future - 2015-05-20 - Humanities Div...
Preparing Your Research Material for the Future - 2015-05-20 - Humanities Div...
 
Preparing Your Research Data for the Future - 2015-03-02 - University of Oxfo...
Preparing Your Research Data for the Future - 2015-03-02 - University of Oxfo...Preparing Your Research Data for the Future - 2015-03-02 - University of Oxfo...
Preparing Your Research Data for the Future - 2015-03-02 - University of Oxfo...
 
RDM key resources handout (humanities version)
RDM key resources handout (humanities version)RDM key resources handout (humanities version)
RDM key resources handout (humanities version)
 
Preparing Your Research Material for the Future - 2015-02-23 - Humanities Div...
Preparing Your Research Material for the Future - 2015-02-23 - Humanities Div...Preparing Your Research Material for the Future - 2015-02-23 - Humanities Div...
Preparing Your Research Material for the Future - 2015-02-23 - Humanities Div...
 
Data Management Planning for Researchers - An Introduction - 2015-02-18 - Un...
Data Management Planning for Researchers -  An Introduction - 2015-02-18 - Un...Data Management Planning for Researchers -  An Introduction - 2015-02-18 - Un...
Data Management Planning for Researchers - An Introduction - 2015-02-18 - Un...
 
Introduction to Research Data Management - 2015-02-09 - MPLS Division, Univer...
Introduction to Research Data Management - 2015-02-09 - MPLS Division, Univer...Introduction to Research Data Management - 2015-02-09 - MPLS Division, Univer...
Introduction to Research Data Management - 2015-02-09 - MPLS Division, Univer...
 

Recently uploaded

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 

Recently uploaded (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

DHOxSS 2014 - Introduction to Relational Databases

  • 1. An Introduction to Relational Databases Dr James A J Wilson Dr Meriel Patrick 18 July, 2014
  • 2. 18 July, 2014 Page 2 Relational Databases  Defined in 1970  First commercially available relational database management system released by Oracle in 1979  Widespread adoption by both business and research communities  Underpin many websites  Well understood and widely supported Digital Humanities Summer School - An Introduction to Relational Databases
  • 3. Options when structuring data  Spreadsheets  Recording the common properties of a single thing  Numerical analysis  Generating charts and graphs  Relational databases  Recording the common properties of multiple related things  Flexible querying  Document-orientated databases / ‘semi-structured’ databases  Recording items which share some common properties  Avoids need to define rigid structure in advance  XML / XML databases  Categorizing elements of text  RDF (Resource Description Framework) triplestores  Records relationships between things (basis of Semantic Web) Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 3
  • 4. When to use a relational database  You are collecting information about things which share common properties  You want to be able to list particular records that meet certain conditions  You wish to encourage consistency  You want to be efficient, and avoid duplication of information  You value flexibility when querying  Good for collaborative working – one person sets up the database, many can edit the data, many more can view or query the data Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 4
  • 5. Structure of a relational database - tables  Example scenario: study of 18th century book trade  What things are we interested in?  Publications  Publishers  People  Our sources for the information we’re collecting  And what information might we want to know about each of these things?  Names  Dates  Places  References Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 5
  • 6. Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 6 Person Surname First name Middle initial(s) Date of birth Notes Publication Title Author(s) Publisher Date of publication Place of publication Edition Format Type of publication Price Sales Notes Publisher Name Staff Founded Ceased Address Notes Reference Author(s) Title Date of publication Edition Volume Page(s) URL Notes
  • 7. Structure of a relational database – data types  Most relational database management systems require that each field has a defined data type  Text (e.g. varchar, memo)  Numeric (e.g. integer, decimal)  Date  Boolean (true / false; on / off)  Blob (for otherwise undefined data, such as image files)  Each table needs at least one field that only contains unique values, which can be used as a ‘primary key’  Commonly an auto-incrementing whole (integer) number Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 7
  • 8. Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 8 Person ID Int Surname Text First name Text Middle Text initial(s) Date of birth Date Notes Text Publication ID Int Title Text Author(s) Text Publisher Text Date of Int? publication Place of publication Text Edition Int Format Text Type of Text publication Price Dec? Sales Int? Notes Text Publisher ID Int Name Text Staff Text Founded Int? Ceased Int? Address Text Notes Text Reference ID Int Author(s) Text Title Text Date of Int? publication Edition Int? Volume Int? Page(s) Text ? URL Text Notes Text
  • 9. Structure of a relational database - relationships  Our different things are related to one another  A person may be the author of a publication, or a reference work, or they may be a publisher  Each edition of a publication has a publisher, or maybe more than one?  The information you record about a particular publication, or publisher, may come from one or more sources  Relationships between things can be of various sorts:  One-to-many (e.g. a publisher may have many publications)  Many-to-many (e.g. a publication may have many authors, and an author may have many publications)  One-to-one (rarely used – can improve performance, overcome system limitations, or enable more granular access permissions) Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 9
  • 10. Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 10 Person ID Int Surname Text First name Text Middle Text initial(s) Date of birth Date Reference Int Page Text Notes Text Publication ID Int Title Text Author(s) INT Publisher INT Date of Int? publication Place of publication Text Edition Int Format Text Type of Text publication Price Dec? Sales Int? Reference Int Page Text Notes Text Publisher ID Int Name Text Staff Text Founded Int? Ceased Int? Address Text Reference Int Page Text Notes Text Reference ID Int Author(s) Text Title Text Date of Int? publication Edition Int? Volume Int? URL Text Notes Text 1 ∞ ? 1 ∞ ∞ ∞
  • 11. Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 11 Person ID Int Surname Text First name Text Middle Text initial(s) Date of birth Date Reference Int Page Text Notes Text Publication ID Int Title Text Author(s) INT Publisher INT Date of Int? publication Place of publication Text Edition Int Format Text Type of Text publication Price Dec? Sales Int? Reference Int Page Text Notes Text Publisher ID Int Name Text Staff Text Founded Int? Ceased Int? Address Text Reference Int Page Text Notes Text Reference ID Int Author(s) Text Title Text Date of Int? publication Edition Int? Volume Int? URL Text Notes Text 1 ∞ many to ? Many 1 ∞ ∞ ∞
  • 12. Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 12 Authorship ID Int Author Int Publication Int Person ID Int Surname Text First name Text Middle Text initial(s) Date of birth Date Reference Int Page Text Notes Text Publication ID Int Title Text Publisher INT Date of Int? publication Place of publication Text Edition Int Format Text Type of Text publication Price Dec? Sales Int? Reference Int Page Text Notes Text Publisher ID Int Name Text Staff Text Founded Int? Ceased Int? Address Text Reference Int Page Text Notes Text Reference ID Int Author(s) Text Title Text Date of Int? publication Edition Int? Volume Int? URL Text Notes Text 1 ∞ many to ? Many 1 ∞ ∞ ∞
  • 13. Alternative structures  If you are certain that no publication is going to have more than three authors, your might want to have fields in the ‘publication’ table for author1, author2, author3 – each with a one-to-many relationship with the ‘person’ table  You could create another table just consisting of IDs and different types of publication. This could then be linked to the ‘publication’ table and act as a controlled vocabulary  Have a separate table for edition information. In most cases authors will not change, format might, sales and price almost certainly will. This will avoid data duplication  But maybe authors will be credited differently (anon revealed?), or titles vary between editions? Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 13
  • 14. Database design – good practice  Database normalization:  Shouldn’t have to enter the same data twice  Separate tables for separate things  Don’t define duplicate fields in the same table (e.g. author1, author2, etc.)  Fields should be ‘atomic’ – containing information at the most granular level (usually)  Enforce data integrity  Keep ‘blobs’ of data (images, audio, etc.) outside of your database or at the very least in separate tables; include links to the files within the database  Table / field naming conventions:  Be consistent  Avoid spaces, punctuation marks, and other non-alphanumeric characters (although it’s fine to use underscores instead of spaces)  Document your database! You will thank yourself later 18 July, 2014 Page 14 Digital Humanities Summer School - An Introduction to Relational Databases
  • 15. Database design workflow Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 15
  • 16. Querying a relational database  Queries usually constructed using SQL statements  SQL stands for ‘Structure Query Language’  Some Relational Database Management Systems hide the raw SQL from the user by providing query-builder tools  SELECT statements indicate which fields should be returned  FROM statements indicate the table(s) in which those fields are to be found  JOIN statements are used when you wish to query multiple tables  WHERE statement provide the conditions that a record must meet in order to be listed in results  ORDER BY statements control the order in which results are returned Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 16
  • 17. Querying a relational database - examples  Imagine we have a single table in a database, called ‘countries’ 18 July, 2014 Page 17 Digital Humanities Summer School - An Introduction to Relational Databases Countries ID Int. name Text area Int. population Int. continent Text If_visited Bool. observations Text SELECT * FROM Countries would return all information about all countries SELECT name, area, population FROM Countries would return only the information in the named fields SELECT * FROM Countries WHERE visited = TRUE would return all information about countries that have been visited SELECT * FROM Countries WHERE visited = TRUE AND population > 1000000 would return all information about countries that have been visited and have a population of greater than a million
  • 18. Querying a relational database - examples  JOINS are used to search across multiple tables WHERE c.visited = TRUE AND d.name = ‘Europe’ would return selected information about each European country visited 18 July, 2014 Page 18  SELECT c.name, c.area, c.population, d.name FROM Countries c INNER JOIN Continents d ON c.continent = d.ID Digital Humanities Summer School - An Introduction to Relational Databases Countries ID Int. name Text area Int. population Int. continent Int. If_visited Bool. observations Text Continents ID Int. name Text area Int.
  • 19. What query results look like  A single table / spreadsheet  Although software / websites may format results into a report. 18 July, 2014 Page 19 Digital Humanities Summer School - An Introduction to Relational Databases
  • 20. What can you do with your results?  Count, sort, and sometimes filter further  Export and analyse  .csv file format is standard, and compatible with almost all statistical analysis / data visualisation software  Save and make available to others 18 July, 2014 Page 20 Digital Humanities Summer School - An Introduction to Relational Databases
  • 21. Common database challenges in the humanities  Patchy or incomplete data  Beware of the difference between 0 and null  Varying degrees of accuracy  Often an issue with historical dates  Splitting the separate elements of a date into separate fields may help  Interpreted and uncertain information  Include a field indicating the degree of certainty of a particular ‘fact’ – e.g. ‘Definite, Probable, Possible’  Inconsistent or changing terminology  Alternative spellings, different forms of address, name changes  Can be an idea to have a table of controlled vocabulary  ‘Fuzziness’ vs. ‘queryableness’  e.g. if you store a data as ‘c. 310 BCE’, you can’t use it in a conditional query such as ‘list all the inscriptions from the fourth century BCE Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 21
  • 22. Your exercise today…  Draft a structure for a relational database recording information about membership of gentlemen’s clubs in Victorian London  Think about the tables, fields, and relationships you’d need  Your evidence collection (membership records, letters, diaries, etc.) tells you which clubs people belonged to, and when  However, the information is patchy  Names may not be given in full – identity is sometimes uncertain  Dates may be uncertain or missing  All clubs have multiple members; some people were members of multiple clubs at varying periods  Over the years, some clubs changed locations Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 22
  • 23. Our example solution Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 23
  • 24. Possible enhancements  If dates are uncertain, integer may not be the best data type.  Make the relationship between club_memberships and evidence many-to-many rather than one-to-many  Done by adding a link table  Split author entries into a separate table  Allows multiple authors for each piece of evidence  Impose a controlled vocabulary on the occupation field by adding a look-up table  Add longitude and latitude to the addresses table. Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 24
  • 25. Relational Database Management Systems  Databases can seem rather complicated, but there is software that can help  MS Access  Filemaker Pro  Coming soon to Oxford – the Online Research Database Service (ORDS)  For web-hosted relational database manipulation:  MySQL  PostgreSQL Digital Humanities Summer School - 18 July, 2014 An Introduction to Relational Databases Page 25
  • 26. Questions? 18 July, 2014 Page 26 Digital Humanities Summer School - An Introduction to Relational Databases

Editor's Notes

  1. Stress that relational databases are not cutting-edge technology
  2. Note that you can put RDF / XML data in relational databases.
  3. It’s not rocket science – that’s usually much simpler