OpenLLM-France/wikimedia huggingface dataset:
# Arithmetic/Introduction to Exponents
## What Are Exponents

Exponents are a short hand that tells us how many times we should multiply a number with itself. If we have to write out every multiplication expressions could get quite long. For example, the number 5×5×5×5×5×5 is often shortened to 5$^6$. The number 6 is called an exponent. It tells us how many times we should multiply 5 by itself.

## A Focus on Squaring Numbers

In multiplication, there are some common names when we use small numbers. For example, multiplying by two is called "doubling", and by three is "tripling". In the same way, exponentiating with two is called "squaring" and by three is called "cubing".
So, just how $5*2=5+5$, $5^{2}=5*5$. Overall, $x^{2}=x*x$. So, 6^2 is 6*6 (36), and 10^2 is 10*10 (100).
You might also notice that the square of a number, as we have learned it, is always positive. For example, 2 squared is 2*2 which is 4; at the same time, -2 squared is -2*-2, which is also 4. Actually, (-x)^2 and (x)^2 equal the same thing.

## A Focus on Cubing Numbers

Unlike squaring numbers, cubing them (raising them by three) preserves the original numbers' sign. For example, $2^{3}=2*2*2=8$, while $(-2)^{3}=-2*-2*-2=-8$.
In fact, you might notice that when you raise a number to any even power (2, 4, 6, ...), the sign must be positive, whereas when you raise it to an odd degree (1, 3, 5, 7, ...) the sign will be the same as the original number's.

## Properties of Exponents

There are, however, several useful tricks for manipulating exponents. Say we have some powers of $x$, for example, $x^{a}$ and $x^{b}$. If we want to figure out the product of these, $x^{a}*x^{b}$, we can see that it is actually $x$ multiplied by itself $a$ times, multiplied by itself $b$ more times.
In other words, there are a x's in the first term, and b x's in the second, and multiplying the two means that there will be a+b x's in the answer. Therefore, $x^{a}*x^{b}=x^{a+b}$.
In the same way, $\left({\frac {x^{a}}{x^{b}}}\right)$ means that there are a x's on the top, divided by b x's on the bottom. As you may see, some of the x's on the bottom will cancel those on the top, particularly, b. This means that the fraction $\left({\frac {x^{a}}{x^{b}}}\right)$ will turn to $\left({\frac {x^{a-b}}{1}}\right)=x^{a-b}$
# Arithmetic/Introduction to Radicals
## What are radicals?

To find out what radicals are, let's look at what multiplication and division are. Multiplication is simply adding two numbers a certain number of times, i.e. $5*4=5+5+5+5$. Though we can't think of division in this way usually, we know that it is the "opposite" of multiplication.
This means that if we multiply some number by, say, 2, and then divide it by two, we will get that same number. It is in this way that multiplication and division "undo" each other. Mathematically, we could say $x*a\div a=x$, or "x times a, divided by a, equals x".
So, radicals are like division to exponents; in the same way that division undoes multiplication, and vice versa, radicals undo exponents. Radicals are usually written like ${\sqrt {x}}$.-

## A focus on square roots

So, we know that $3^{2}=9$; this means, also, that ${\sqrt {9}}=3$. In the same way, ${\sqrt {16}}=4$, since 4 squared equals 16.

## A focus on cube roots

In the same way, we know that $2^{3}=2*2*2=8$, thus ${\sqrt[{3}]{8}}=2$. Similarly, ${\sqrt[{3}]{27}}=3$.

## Domains: What is the square root of 2?

You may be wondering how to take the square root of numbers like 2 or 3. Surely there isn't any integer that, when you multiply it by itself, you'll get two. So what could it be? Possibly a fraction?
Actually, no. The square root of two is the square root of two. There is no fraction that exactly equals it. The same is true for the square roots of 2, 5, 6, 8, etc.

## Another look ahead at irrational numbers

There are actually many numbers that can't be represented as fractions (actually, there are as many of these numbers as those that can be represented with fractions). These numbers are called irrational numbers, since they can't be made into a "rational" fraction.

## Domains: What is the square root of a negative number?

If you remember from the exponents chapter, we said that any number squared, to the fourth, or any even number, is positive. Square root finds that number, given its square. But what about numbers like -1, -2, or -543?
Well, we know that no rational, or irrational, number squared equals a negative number. That much is true. But, just like how we extended rational numbers to the irrationals as well when we tried to square root 3, we're going to have to extend our notion of rationals and irrationals (which, combined, make the "real" numbers). This group of numbers that, squared, gives a negative number is called the imaginary numbers.
Just as how ${\sqrt {2}}$ cannot be written as a rational fraction, ${\sqrt {-1}}$ cannot be written as a real number. It is simply ${\sqrt {-1}}$. For shortness, we call this number $i$, which stands for "imaginary" (since you can't have "i" potatoes, or "i" anything, really).
# Arithmetic/Lowest Common Multiple

To find the Lowest Common Multiple (LCM) of several numbers, we first express each number as a product of its prime factors.
For example, if we wish to find the LCM of 60, 12 and 102 we write
${\begin{matrix}60=2^{2}\cdot 3\cdot 5\\12=2^{2}\cdot 3\\102=2\cdot 3\cdot 17\end{matrix}}$
The product of the highest power of each different factor appearing is the LCM.
For example in this case, $2^{2}\cdot 3\cdot 5\cdot 17=1020$. You can see that 1020 is a multiple of 12, 60 and 102 ... the lowest common multiple of all three numbers.
Another example: What is the LCM of 36, 45, and 27?
Solution: Factorise each of the numbers
${\begin{matrix}36=2^{2}\cdot 3^{2}\\45=5\cdot 3^{2}\\27=3^{3}\end{matrix}}$
The product of the highest power of each different factor appearing is the LCM, i.e.;
$2^{2}\cdot 5\cdot 3^{3}=540$

## Properties of the LCM

If the LCM of the numbers is found and 1 is subtracted from the LCM then the remainder when divided by each of the numbers whose LCM is found would have a remainder that is 1 less than the divisor. For example if the LCM of 2 numbers 10 and 9 is 90. Then 90-1=89 and 89 divided by 10 leaves a remainder of 9 and the same number divided by 9 leaves a remainder of 8.
# Arithmetic/Number Operations
## Arithmetic Operations

* Addition
* Subtraction
* Multiplication
* Division
← Introduction to Arithmetic · Number Operations/Addition →
# Arithmetic/Introduction to Operations

There are four basic operators, which are used to work with numbers for uses besides counting. They are:
* $+$ addition
* $-$ subtraction
* $\times$ multiplication (The symbols * and ⋅ are also used to multiply)
* $\div$ division (The symbol / is also used to divide)

## Addition

Addition is the total of two numbers. For example:
    $1+2=3$

## Subtraction

Subtraction is the opposite of addition, which is the taking away of one number from another. For example:
    $2-1=1$

## Multiplication

Multiplication is the adding of a number a certain number of times. So:
    $2*1=2$
    $2*2=2+2=4$
    $2*3=2+2+2=6$ etc.

## Division

Division is the splitting of a number into a number of equal parts. For example:
    $6/2=3$
# Ba Zi/HP H10
## Hour Pillar For Day HS10

Ba Zi | Heavenly Stems | Earthly Branches | Hsia Calendar (Xia Calendar) | Hour Pillar | Luck Pillar | Life Cycle | Hidden Stems | Seasonal Cycle | Symbolic Stars | Aspects Of Life | Date Selection | List Of Ba Zi
| Time of Birth | Hour Pillar |
| 11pm-1am (Heavenly Stem) | HS9 |
| *11pm-1am (Earthly Branch) | EB1 |
| 1am-3am (Heavenly Stem) | HS10 |
| *1am-3am (Earthly Branch) | EB2 |
| 3am-5am (Heavenly Stem) | HS1 |
| *3am-5am (Earthly Branch) | EB3 |
| 5am-7am (Heavenly Stem) | HS2 |
| *5am-7am (Earthly Branch) | EB4 |
| 7am-9am (Heavenly Stem) | HS3 |
| *7am-9am (Earthly Branch) | EB5 |
| 9am-11am (Heavenly Stem) | HS4 |
| *9am-11am (Earthly Branch) | EB6 |
| 11am-1pm (Heavenly Stem) | HS5 |
| *11am-1pm (Earthly Branch) | EB7 |
| 1pm-3pm (Heavenly Stem) | HS6 |
| *1pm-3pm (Earthly Branch) | EB8 |
| 3pm-5pm (Heavenly Stem) | HS7 |
| *3pm-5pm (Earthly Branch) | EB9 |
| 5pm-7pm (Heavenly Stem) | HS8 |
| *5pm-7pm (Earthly Branch) | EB10 |
| 7pm-9pm (Heavenly Stem) | HS9 |
| *7pm-9pm (Earthly Branch) | EB11 |
| 9pm-11pm (Heavenly Stem) | HS10 |
| *9pm-11pm (Earthly Branch) | EB12 |
# Ba Zi/HP H4
## Hour Pillar For Day HS4

Ba Zi | Heavenly Stems | Earthly Branches | Hsia Calendar (Xia Calendar) | Hour Pillar | Luck Pillar | Life Cycle | Hidden Stems | Seasonal Cycle | Symbolic Stars | Aspects Of Life | Date Selection | List Of Ba Zi
| Time of Birth | Hour Pillar |
| 11pm-1am (Heavenly Stem) | HS7 |
| *11pm-1am (Earthly Branch) | EB1 |
| 1am-3am (Heavenly Stem) | HS8 |
| *1am-3am (Earthly Branch) | EB2 |
| 3am-5am (Heavenly Stem) | HS9 |
| *3am-5am (Earthly Branch) | EB3 |
| 5am-7am (Heavenly Stem) | HS10 |
| *5am-7am (Earthly Branch) | EB4 |
| 7am-9am (Heavenly Stem) | HS1 |
| *7am-9am (Earthly Branch) | EB5 |
| 9am-11am (Heavenly Stem) | HS2 |
| *9am-11am (Earthly Branch) | EB6 |
| 11am-1pm (Heavenly Stem) | HS3 |
| *11am-1pm (Earthly Branch) | EB7 |
| 1pm-3pm (Heavenly Stem) | HS4 |
| *1pm-3pm (Earthly Branch) | EB8 |
| 3pm-5pm (Heavenly Stem) | HS5 |
| *3pm-5pm (Earthly Branch) | EB9 |
| 5pm-7pm (Heavenly Stem) | HS6 |
| *5pm-7pm (Earthly Branch) | EB10 |
| 7pm-9pm (Heavenly Stem) | HS7 |
| *7pm-9pm (Earthly Branch) | EB11 |
| 9pm-11pm (Heavenly Stem) | HS8 |
| *9pm-11pm (Earthly Branch) | EB12 |
# Ba Zi/HP H3
## Hour Pillar For Day HS3

Ba Zi | Heavenly Stems | Earthly Branches | Hsia Calendar (Xia Calendar) | Hour Pillar | Luck Pillar | Life Cycle | Hidden Stems | Seasonal Cycle | Symbolic Stars | Aspects Of Life | Date Selection | List Of Ba Zi
| Time of Birth | Hour Pillar |
| 11pm-1am (Heavenly Stem) | HS5 |
| *11pm-1am (Earthly Branch) | EB1 |
| 1am-3am (Heavenly Stem) | HS6 |
| *1am-3am (Earthly Branch) | EB2 |
| 3am-5am (Heavenly Stem) | HS7 |
| *3am-5am (Earthly Branch) | EB3 |
| 5am-7am (Heavenly Stem) | HS8 |
| *5am-7am (Earthly Branch) | EB4 |
| 7am-9am (Heavenly Stem) | HS9 |
| *7am-9am (Earthly Branch) | EB5 |
| 9am-11am (Heavenly Stem) | HS10 |
| *9am-11am (Earthly Branch) | EB6 |
| 11am-1pm (Heavenly Stem) | HS1 |
| *11am-1pm (Earthly Branch) | EB7 |
| 1pm-3pm (Heavenly Stem) | HS2 |
| *1pm-3pm (Earthly Branch) | EB8 |
| 3pm-5pm (Heavenly Stem) | HS3 |
| *3pm-5pm (Earthly Branch) | EB9 |
| 5pm-7pm (Heavenly Stem) | HS4 |
| *5pm-7pm (Earthly Branch) | EB10 |
| 7pm-9pm (Heavenly Stem) | HS5 |
| *7pm-9pm (Earthly Branch) | EB11 |
| 9pm-11pm (Heavenly Stem) | HS6 |
| *9pm-11pm (Earthly Branch) | EB12 |
# Ba Zi/HP H1

Ba Zi | Heavenly Stems | Earthly Branches | Hsia Calendar (Xia Calendar) | Hour Pillar | Luck Pillar | Life Cycle | Hidden Stems | Seasonal Cycle | Symbolic Stars | Aspects Of Life | Date Selection | List Of Ba Zi

## Hour Pillar For Day HS1

| Time of Birth | Hour Pillar |
| 11pm-1am (Heavenly Stem) | HS1 |
| *11pm-1am (Earthly Branch) | EB1 |
| 1am-3am (Heavenly Stem) | HS2 |
| *1am-3am (Earthly Branch) | EB2 |
| 3am-5am (Heavenly Stem) | HS3 |
| *3am-5am (Earthly Branch) | EB3 |
| 5am-7am (Heavenly Stem) | HS4 |
| *5am-7am (Earthly Branch) | EB4 |
| 7am-9am (Heavenly Stem) | HS5 |
| *7am-9am (Earthly Branch) | EB5 |
| 9am-11am (Heavenly Stem) | HS6 |
| *9am-11am (Earthly Branch) | EB6 |
| 11am-1pm (Heavenly Stem) | HS7 |
| *11am-1pm (Earthly Branch) | EB7 |
| 1pm-3pm (Heavenly Stem) | HS8 |
| *1pm-3pm (Earthly Branch) | EB8 |
| 3pm-5pm (Heavenly Stem) | HS9 |
| *3pm-5pm (Earthly Branch) | EB9 |
| 5pm-7pm (Heavenly Stem) | HS10 |
| *5pm-7pm (Earthly Branch) | EB10 |
| 7pm-9pm (Heavenly Stem) | HS1 |
| *7pm-9pm (Earthly Branch) | EB11 |
| 9pm-11pm (Heavenly Stem) | HS2 |
| *9pm-11pm (Earthly Branch) | EB12 |
# Ba Zi/HP H2
## Hour Pillar For Day HS2

Ba Zi | Heavenly Stems | Earthly Branches | Hsia Calendar (Xia Calendar) | Hour Pillar | Luck Pillar | Life Cycle | Hidden Stems | Seasonal Cycle | Symbolic Stars | Aspects Of Life | Date Selection | List Of Ba Zi
| Time of Birth | Hour Pillar |
| 11pm-1am (Heavenly Stem) | HS3 |
| *11pm-1am (Earthly Branch) | EB1 |
| 1am-3am (Heavenly Stem) | HS4 |
| *1am-3am (Earthly Branch) | EB2 |
| 3am-5am (Heavenly Stem) | HS5 |
| *3am-5am (Earthly Branch) | EB3 |
| 5am-7am (Heavenly Stem) | HS6 |
| *5am-7am (Earthly Branch) | EB4 |
| 7am-9am (Heavenly Stem) | HS7 |
| *7am-9am (Earthly Branch) | EB5 |
| 9am-11am (Heavenly Stem) | HS8 |
| *9am-11am (Earthly Branch) | EB6 |
| 11am-1pm (Heavenly Stem) | HS9 |
| *11am-1pm (Earthly Branch) | EB7 |
| 1pm-3pm (Heavenly Stem) | HS10 |
| *1pm-3pm (Earthly Branch) | EB8 |
| 3pm-5pm (Heavenly Stem) | HS1 |
| *3pm-5pm (Earthly Branch) | EB9 |
| 5pm-7pm (Heavenly Stem) | HS2 |
| *5pm-7pm (Earthly Branch) | EB10 |
| 7pm-9pm (Heavenly Stem) | HS3 |
| *7pm-9pm (Earthly Branch) | EB11 |
| 9pm-11pm (Heavenly Stem) | HS4 |
| *9pm-11pm (Earthly Branch) | EB12 |
# Annotations to James Joyce's Ulysses/Scylla and Charybdis/187
## Annotations

Tir na n-og (Errata) This Irish expression should read: Tír na nÓg. When an earlier draft of this chapter was printed in The Little Review in April 1919, the reading was: Tir nan og.
Tír na nÓg (Irish) Land of the Young Folk. In Irish mythology, Tír na nÓg is the Celtic Otherworld, an afterlife of perfect happiness where no one grows old.

## References

* ↑ The Little Review, Volume 5, Number 12, p. 41.
* ↑ Gifford (1988) 220. Thornton (1968) 179.
# Annotations to James Joyce's Ulysses/Scylla and Charybdis/183
## Annotations

absit nomen (Latin) let the name be absent. Stephen is alluding to the Latin precept absit nomen, absit omen (If you do not utter an ill-omened expression, you will not incur the bad luck attendant on it). The second half of this phrase, absit omen (let there be no [ill] omen), is used on its own as an apotropaic phrase to ward off any possible bad luck that might attend the uttering of an ill-omened term; today one might knock on wood to achieve the same effect.

## References

* ↑ Gifford (1988) 207.
* ↑ Spears, Richard A. (1981). Slang and Euphemism. New York: Jonathan David Publishers, Inc. ISBN 0-8246-0273-0.
# Annotations to James Joyce's Ulysses/Scylla and Charybdis/182
## Annotations

Liliata rutilantium See 010.21-22.
# Annotations to James Joyce's Ulysses/Scylla and Charybdis/185
## Annotations

Cordoglio (Italian) grief, affliction, deep sorrow.

## References

* ↑ Gifford (1988) 215. Thornton (1968) 172.
# Annotations to James Joyce's Ulysses/Scylla and Charybdis/188
## Annotations

L'art d'être grand... (Errata) This should read: L'art d'être grandp.... The final p was present when an earlier draft of this episode was published in The Little Review. L'art d'être grand is the French for The art of being great, but this erratum is included in the errata list that Joyce himself compiled for the fourth impression of the first edition of Ulysses (January 1924).
L'art d'être grandp... (French) The art of being a grandf... L'Art d'être grand-père (The Art of Being A Grandfather) is a collection of poems for children by Victor Hugo; they were written for Hugo's own grandchildren and published in 1877.
buonaroba (Italian) good stuff. In Elizabethan England bona roba was a slang term for a showy wanton, a wench, a flashy girl. The term occurs twice in Shakespeare's works, II Henry IV 3.2.26 and 3.2.217, though neither occurrence has any particular relevance for the point Stephen is making.

## References

* ↑ The Little Review, Volume 5, Number 12, p. 41.
* ↑ Gifford (1988) 221. Thornton (1968) 180.
* ↑ L’Art d’être grand-père
* ↑ Gifford (1988) 222. Thornton (1968) 181.
* ↑ Samuel Johnson, Dictionary of the English Language.
# Annotations to James Joyce's Ulysses/Scylla and Charybdis/189
## Annotations

Entr'acte (French) a short, usually comic and musical, performance in the interval between two acts of a play or opera. Stephen anticipates that Mulligan's arrival will interrupt the serious discussion and precipitate a comic interlude.
Was Du verlachst wirst Du noch dienen (German) That which you deride you shall nevertheless serve. This phrase is usually glossed as a German proverb, but Joyce's source has not yet been identified.
Glo-o-ri-a in ex-cel-sis De-o (Latin) Glory to God in the highest. See 079.11. The musical quotation is taken from a Plainchant setting of the Gloria in the Liber Usualis for Missa IV, In Festis II Classis 1 (Mass IV, For Feasts of the Second Class, Number 1). 16 June is the feast of the French Jesuit St John Francis Regis.

## References

* ↑ Gifford (1988) 224.
* ↑ Gifford (1988) 224. Thornton (1968) 183-184.
* ↑ Liber Usualis 26. For the same chant in modern notation, see Liber Usualis 26.
# Aros/Developer/Docs/Libraries/IFFParse

* Navbar for the Aros wikibook
* Aros User
* Aros User Docs
* Aros User FAQs
* Aros User Applications
* Aros User DOS Shell
* Aros/User/AmigaLegacy
* Aros Dev Docs
* Aros Developer Docs
* Porting Software from AmigaOS/SDL
* For Zune Beginners
* Zune .MUI Classes
* For SDL Beginners
* Aros Developer BuildSystem
* Specific platforms
* Aros x86 Complete System HCL
* Aros x86 Audio/Video Support
* Aros x86 Network Support
* Aros Intel AMD x86 Installing
* Aros Storage Support IDE SATA etc
* Aros Poseidon USB Support
* x86-64 Support
* Motorola 68k Amiga Support
* Linux and FreeBSD Support
* Windows Mingw and MacOSX Support
* Android Support
* Arm Raspberry Pi Support
* PPC Power Architecture
* misc
* Aros Public License

## Introduction

Datatypes have largely replaced the EA / Commodore era inspired IFF file formats.
IBM has an entry about IFF file format.
only some few times its called blocklen 128 bytes 1.
Something FRead-ing pointers/IFF-offsets one at a time, then FRead-ing the following block of data? (Disk blocks numbers and file entries?)
Especially IFF:
* Read FORM (LONG)
* Read length (LONG)
* Read type (LONG)
* Read block-length (LONG)
* Read block content (an even number of bytes)
# Aros/Developer/Docs/Libraries/FreeType2

* Navbar for the Aros wikibook
* Aros User
* Aros User Docs
* Aros User FAQs
* Aros User Applications
* Aros User DOS Shell
* Aros/User/AmigaLegacy
* Aros Dev Docs
* Aros Developer Docs
* Porting Software from AmigaOS/SDL
* For Zune Beginners
* Zune .MUI Classes
* For SDL Beginners
* Aros Developer BuildSystem
* Specific platforms
* Aros x86 Complete System HCL
* Aros x86 Audio/Video Support
* Aros x86 Network Support
* Aros Intel AMD x86 Installing
* Aros Storage Support IDE SATA etc
* Aros Poseidon USB Support
* x86-64 Support
* Motorola 68k Amiga Support
* Linux and FreeBSD Support
* Windows Mingw and MacOSX Support
* Android Support
* Arm Raspberry Pi Support
* PPC Power Architecture
* misc
* Aros Public License

## Introduction

Provides TrueType, OpenType and Type 1 font and glyphs support for AROS.

## Examples

link with -lfreetype2
# Aros/Developer/Docs/Libraries/Expansion

* Navbar for the Aros wikibook
* Aros User
* Aros User Docs
* Aros User FAQs
* Aros User Applications
* Aros User DOS Shell
* Aros/User/AmigaLegacy
* Aros Dev Docs
* Aros Developer Docs
* Porting Software from AmigaOS/SDL
* For Zune Beginners
* Zune .MUI Classes
* For SDL Beginners
* Aros Developer BuildSystem
* Specific platforms
* Aros x86 Complete System HCL
* Aros x86 Audio/Video Support
* Aros x86 Network Support
* Aros Intel AMD x86 Installing
* Aros Storage Support IDE SATA etc
* Aros Poseidon USB Support
* x86-64 Support
* Motorola 68k Amiga Support
* Linux and FreeBSD Support
* Windows Mingw and MacOSX Support
* Android Support
* Arm Raspberry Pi Support
* PPC Power Architecture
* misc
* Aros Public License

## Introduction

This library handles the hardware and software expansion of your system.
# Aros/Developer/Docs/Libraries/Identify

* Navbar for the Aros wikibook
* Aros User
* Aros User Docs
* Aros User FAQs
* Aros User Applications
* Aros User DOS Shell
* Aros/User/AmigaLegacy
* Aros Dev Docs
* Aros Developer Docs
* Porting Software from AmigaOS/SDL
* For Zune Beginners
* Zune .MUI Classes
* For SDL Beginners
* Aros Developer BuildSystem
* Specific platforms
* Aros x86 Complete System HCL
* Aros x86 Audio/Video Support
* Aros x86 Network Support
* Aros Intel AMD x86 Installing
* Aros Storage Support IDE SATA etc
* Aros Poseidon USB Support
* x86-64 Support
* Motorola 68k Amiga Support
* Linux and FreeBSD Support
* Windows Mingw and MacOSX Support
* Android Support
* Arm Raspberry Pi Support
* PPC Power Architecture
* misc
* Aros Public License
# A-level Computing/AQA/Paper 2/Fundamentals of functional programming

* What is functional programming
* Basics of functional programming
* List processing
* Writing functional programs
# A-level Computing/AQA/Paper 2/Fundamentals of databases/INSERT

We might also want to add new things to our database, for example when we are adding new Criminal records or a new friendship link on Facebook. To add new records we use the INSERT command with values of the fields we want to insert:
Sometimes we might not want to insert all the fields, some of them might not be compulsory:
| ID | name | gender | DoB | town | numScars |
| 1 | Geoff | male | 12/05/1982 | Hull | 0 |
| 2 | Jane | female | 05/08/1956 | York | 1 |
| 3 | Keith | male | 07/02/1999 | Snape | 6 |
| 4 | Oliver | male | 22/08/1976 | Blaxhall | 2 |
| 5 | Kelly | female | 11/11/1911 | East Ham | 10 |
| 6 | Marea | female | 14/07/1940 | Wythenshawe | 6 |
| 1234 | Julie | female | 12/12/1994 | Little Maplestead | 67 |
| 999 | Frederick | | | Shotley | |
* Exercise: INSERT statements
* Using the above data set, write an INSERT statement to create the following person:
* name: Gerry
* town: Keele
* gender: male
* numScars: 9
* ID: 12
* DoB: 13/12/1987
* Answer:
* Be careful, you must insert the fields in the order they are specified in the table
* INSERT INTO crooks
* VALUES (12, 'Gerry', 'male', '13/12/1987', 'Keele', 9)
* Alternatively you could use the field headings, but this is a little cumbersome:
* INSERT INTO crooks (name, town, gender, numScars, ID, DoB)
* VALUES ('Gerry', 'Keele', 'male', 9, 12, '13/12/1987')
* Using the above data set, write an INSERT statement to create the following person:
* name: Kelly-Ann
* gender: female
* numScars: 1
* Answer:
* INSERT INTO crooks (name, gender, numScars)
* VALUES ('Kelly-Ann', 'female', 1)
# A-level Computing/AQA/Paper 2/Fundamentals of databases/UPDATE

Database aren't always perfect and there may be times that we want to change the data inside our database. For example in Facebook if someone is annoying you and you limit their access to your profile, you'd update the access field from 'normal' to 'restricted'. Or if one of our crooks gets an additional scar you'd have to update the numScars field. Let's take a look at that example, where our crook Peter gains a scar on his right cheek. This was his initial state:
But we have a problem here, this statement updates all records to numScars = 8. This means that every crook will now have 8 scars!
| ID | name | gender | DoB | town | numScars |
| 1 | Geoff | male | 12/05/1982 | Hull | 8 |
| 2 | Jane | female | 05/08/1956 | York | 8 |
| 3 | Keith | male | 07/02/1999 | Snape | 8 |
| 4 | Oliver | male | 22/08/1976 | Blaxhall | 8 |
| 5 | Kelly | female | 11/11/1911 | East Ham | 8 |
| 6 | Marea | female | 14/07/1940 | Wythenshawe | 8 |
We need to specify which crooks we want to update by using a WHERE clause, you saw it earlier in the SELECT example.
* Exercise: UPDATE statements
* Using the above data set, write an UPDATE statement to change Geoff's DoB to 17/12/1939
* Answer:
* UPDATE crooks
* SET DoB = '17/12/1939'
* WHERE name = 'Geoff'
* All the crooks have moved to Canary Wharf, update the table to show this
* Answer:
* UPDATE crooks
* SET town = 'Canary Wharf'
* All the female crooks named Sheila have lied about their ages and they were all born on January 16, 1984
* Answer:
* UPDATE crooks
* SET DoB = '16/01/1984' ---be careful with dates, they might be using American format
* WHERE name = 'Sheila'
* AND gender = 'Female'