-
Notifications
You must be signed in to change notification settings - Fork 10
/
chapter1.html
41 lines (29 loc) · 3.54 KB
/
chapter1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!doctype html>
<html>
<head>
<title>Introduction</title>
<link rel=stylesheet href="http://fonts.googleapis.com/css?family=Averia+Serif+Libre:300,400">
<link rel=stylesheet href=style.css>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
</head>
<body>
<h1>Introduction</h1>
<h2>Aim of the course</h2>
<p>After the completion of this course, you will be able to use an SQL client to obtain data stored in an SQL database. You will learn how to write queries which give you exactly the information you require and to bring them into the form most suitable to answer the given questions. You will also learn how to enter new data and how to edit existing one.</p>
<h2>SQL databases</h2>
<p>A database is a <em>organized</em> collection of data. SQL, being an acronym for <em><strong>S</strong>tructured <strong>Q</strong>uery <strong>L</strong>anguage</em>, denots <em>database language</em> used to access databases. We speak of <em>SQL databases</em> when we mean a database which provides an SQL interface. Such databases are called relational databases as the data is stored in a set of table between which relationships exist. A <em>database system</em> is a computer program which allows to create, access, edit, and manage databases. Popular ones are MySQL, MS-SQL, and Oracle DB.</p>
<h2>Software used</h2>
<p>In this tutorial, we work with the file-based database system <em>SQLite</em> and the corresponding client <em>DB Browser for SQLite</em>. <a href="http://www.sqlite.org">SQLite</a> is simple and quite powerful and allows to store a database in an single file. Besides many other applications it is also used in the android operating system to store application data on phones and tablets. How to install the required software on Linux, MacOS, and Windows is detailed in the provided <a href="installationguide.html">installation guide</a>.
<p>To perform a SQL query to a database, enter the command in the text field and click on <em>Execute Command</em>. As an alternative to Sqlitebrowser you can use <em>Sqliteman</em> which is a good alternative especially for Debian and Ubuntu Linux users. Please refer to the <a href="installationguide.html">installation guide</a> for details.</p>
<p></p>
<h2>Sample database</h2>
<p>As the focus of this tutorial lies on the retrieval of data from an existing database rather than creating new databases, a file <a href="databaseOTS.sqlite">databaseOTS.sqlite</a> is provided which contains all the data required later on in the course. Download this file to some location on your computer. Then you can open it in <em>DB Browser for SQLite</em> by clicking on <em>open database</em>.</p>
<p align=center><img src="screenshot1.png" alt="DB Browser for SQLite" width=650></p>
<h2>General hints</h2>
<p>Write all sql-Statements in an text editor first. This way it is much easier to reuse statements formulated before. All text in <code>fixed font</code> is code (usually SQL statements). Note that SQL key words such as <code>select</code> or <code>from</code> are not case sensitive. Questions or excercises are written as:</p>
<p class=question>0.) Have you sucesfully installed SQLite?</p>
<p>The answers to the questions (or often an SQL statement which yields the answer) are found <a href="solutions.html">here</a>. You are <strong>strongly</strong> encouraged not only to answer the questions but also to try out all presented commands with some examples of your own.</p>
<p>So, now you can get started to learn the <a href="chapter2.html">SQL basics</a>.
<p><a href="index.html">Back to start</a></p>
</body>
</html>