forked from zedz/lsqlthw-cn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex0.tex
55 lines (41 loc) · 2.19 KB
/
ex0.tex
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
42
43
44
45
46
47
48
49
50
51
52
53
\chapter{Exercise 0: The Setup}
This book will use \href{http://www.sqlite.org/download.html}{SQLite3} as a training
tool. SQLite3 is a complete database system that has the advantage of requiring almost
no setup. You just download a binary and work it like most other scripting languages.
Using this, you'll be able to learn SQL without getting stuck in the administrivia of
administering a database server.
Installing SQLite3 is easy:
\begin{enumerate}
\item Either go to \href{http://www.sqlite.org/download.html}{their downloads page}
and grab the binary for your platform. Look for "Precompiled Binaries for X" with
X being your operating system of choice.
\item Use your operating system's package manager to install it. If you're on Linux
then you know what that means. If you're on OSX then first go get a package
manager and then use it to install sqlite3.
\end{enumerate}
When you've got it installed, then make sure you can start up a command line and
run it. Here's a quick test for you to try:
\begin{lstlisting}
$ sqlite3 test.db
SQLite version 3.7.8 2011-09-19 14:49:19
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table test (id);
sqlite> .quit
\end{lstlisting}
Then look to see that the \file{test.db} file is there. If that works
then you're all set. You should make sure that your version of SQLite3
is the same as the one I have here: 3.7.8. Sometimes things won't work
right with older versions.
\section{Additional Tools You'll Need}
You will also need to have the following additional tools:
\begin{enumerate}
\item A good plain text editor. Use anyone you like, but do \emph{not} use an IDE (Integrated Development Environment). They cannot help you.
\item Familiarity with your command line (aka Terminal, aka cmd.exe). You'll be running commands from there.
\item An internet connection with a web browser so you can look up documentation and research things I tell you to find.
\end{enumerate}
Once you have that all setup you are ready to go.
\section{Extra Credit}
\begin{enumerate}
\item Go to the \href{http://www.sqlite.org/download.html}{SQLite3} site again and browse around through the documentation.
\end{enumerate}