Skip to main content Accessibility help
×
Hostname: page-component-848d4c4894-m9kch Total loading time: 0 Render date: 2024-05-01T06:23:16.403Z Has data issue: false hasContentIssue false

20 - Databases

Published online by Cambridge University Press:  05 February 2015

Tim J. Stevens
Affiliation:
MRC Laboratory of Molecular Biology, Cambridge
Wayne Boucher
Affiliation:
University of Cambridge
Get access

Summary

A brief introduction to relational databases

Any collection of data can be considered to be a database, however it is stored or utilised. However, the common use of the word ‘database’ usually refers to a relational database. Relational databases were introduced in the 1970s and model their data in terms of tables with rows and columns. There is an associated language, SQL (Structured Query Language), that can be used to send messages to the database to allow the database to be queried and modified: inserting, changing and deleting data elements. SQL also provides the ability to make connections between the data in different tables. In terms of mathematics, relational databases can be thought of as ‘first-order predicate logic’, and this mathematical underpinning of the principles of relational databases is one reason they are conceptually attractive.

Tables

A table in a relational database has a name and also has some named columns and each row in the table represents one record of data. The type of the data in each column can be specified and the data in any column can be stated to be mandatory, or not. One or more columns in each table define the key. Each record in the table must have a unique key; the key identifies the individual record. Sometimes a table has a ‘natural’ key but sometimes there is no obvious key and so instead a counter (a ‘serial’ or ‘ID’ number) is used, which is set (in many database implementations automatically) to 1 for the first record, 2 for the second, etc. At a simplistic level, spreadsheets (e.g. as used in Excel) can be thought of as tables in a weak substitute for a relational database. A table can have one or more columns that refer to one or more other tables, and this is a way that information between tables can be linked. In the database jargon, a query that involves relating information across more than one table is called a join.

Type
Chapter
Information
Python Programming for Biology
Bioinformatics and Beyond
, pp. 401 - 420
Publisher: Cambridge University Press
Print publication year: 2015

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Databases
  • Tim J. Stevens, MRC Laboratory of Molecular Biology, Cambridge, Wayne Boucher, University of Cambridge
  • Book: Python Programming for Biology
  • Online publication: 05 February 2015
  • Chapter DOI: https://doi.org/10.1017/CBO9780511843556.021
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Databases
  • Tim J. Stevens, MRC Laboratory of Molecular Biology, Cambridge, Wayne Boucher, University of Cambridge
  • Book: Python Programming for Biology
  • Online publication: 05 February 2015
  • Chapter DOI: https://doi.org/10.1017/CBO9780511843556.021
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Databases
  • Tim J. Stevens, MRC Laboratory of Molecular Biology, Cambridge, Wayne Boucher, University of Cambridge
  • Book: Python Programming for Biology
  • Online publication: 05 February 2015
  • Chapter DOI: https://doi.org/10.1017/CBO9780511843556.021
Available formats
×