Back to Table of Contents

Brain Teasers Database Design

Sample Data


Here are the files that I used to bulk load sample data into my tables. As you can see, this is a small database. I was counting on most of my data being entered via the web site, so I did not need to pre-load very much information. I found most of these brain teasers at the rec.puzzles Archive.

LOAD DATA
INFILE *
INTO TABLE teaser
FIELDS TERMINATED BY '|'
(id,title,category,body,hint,answer,numviews,diffvotes,funvotes,diffrating,funrating)
BEGINDATA
1|I Never Was|Riddle|I never was, am always to be, No one ever saw me, nor ever will And yet I am the confidence of all To live and breathe on this terrestrial ball.|It never comes|Tomorrow|1|1|1|5|5
2|Once in a Minute|Riddle|What occurs once in a minute, twice in a moment, but never in an hour.|Its all in the riddle|The Letter M|1|1|1|5|5
3|Food and Water|Riddle|Give it food and it will live; give it water and it will die.|It's not alive|Fire|1|1|1|5|5
4|Body Parts|Trivia|Name ten body parts that are spelled with three letters.  No slang words.|No Hint|arm, ear, eye, gum, hip, jaw, leg, lip, rib, toe|1|1|1|5|5
5|Helium Balloon|Physics|A helium-filled balloon is tied to the floor of a car that makes asharp right turn.  Does the balloon tilt while the turn is made?If so, which way?  The windows are closed so there is no connectionwith the outside air.|Think of a ball in water|The balloon tilts into the turn because the air in the car tilts away from the turn and the balloon floats on the air.|1|1|1|5|5
6|Birthdays|Probability|How many people must be at a party before you have even odds or better of two having the same bithday?|Multiply your probablities.|23 people|1|1|1|5|5
7|Bugs|Analysis|Four bugs are placed at the corners of a square. Each bug walks always directly toward the next bug in the clockwise direction. How far do the bugs walk before they meet?|Its not that far|Each bug walks a distance equal to the side of the square before it meets the next bug.|1|1|1|5|5
8|Clock Hands|Arithmetic|Do the 3 hands on a clock ever divide the face of the clock into 3 equal segments, i.e. 120 degrees between each hand?|no hint|No|1|1|1|5|5


LOAD DATA
INFILE *
INTO TABLE account
FIELDS TERMINATED BY '|'
(username,password,numlogins,lastlogin DATE 'yyyy-mm-dd',email,name)
BEGINDATA
jolefsky|ge432s|10|2000-01-01|olefsky@cs.stanford.edu|Jake Olefsky
turkeyboy|33ddfe|24|2000-03-15|tom22@hotmail.com|Thomas Innes
super|passwd|5|2000-04-20|mhough@stanford.edu|Mike Hough
Brainmaster|monkey2|1|2000-01-08|alia@yahoo.com|Alia Syed
JohnC|gibralter|45|2000-01-31|johnc@hotmail.com|John Catron
Kristen|1234asdf|17|2000-02-21|kristenj@apple.com|Kristen Johnson
CookieMonster|himom|34|2000-04-01|emil@alto.com|Emil Alto
theUltimateT|stapler|32|2000-04-21|karin@olefsky.com|Karin Olefsky
babyfishmouth|4today5|6|2000-03-04|megryan@hollywood.com|Meg Ryan
klin|printer4|3|2000-04-30|klin@aol.com|Kamie Lin


LOAD DATA
INFILE *
INTO TABLE featured
FIELDS TERMINATED BY '|'
(fdate DATE 'yyyy-mm-dd',id)
BEGINDATA
2000-5-12|2
2000-5-13|3
2000-5-14|1
2000-5-15|4
2000-5-16|6
2000-5-17|5



LOAD DATA
INFILE *
INTO TABLE submitted
FIELDS TERMINATED BY '|'
(id,username,submitdate DATE 'yyyy-mm-dd',approveddate DATE 'yyyy-mm-dd', approved)
BEGINDATA
1|jolefsky|1997-1-9|1997-1-9|y
2|jolefsky|1997-2-7|1997-2-7|y
3|turkeyboy|1998-6-24|1998-7-24|y
4|JohnC|1997-7-1|1997-7-5|y
5|super|1998-2-5|1998-4-9|y
6|babyfishmouth|1999-2-15|2000-1-1|y
7|babyfishmouth|1999-2-15|2000-1-1|y
8|JohnC|1997-7-1|1997-7-5|y



Back to Table of Contents


by Jake Olefsky - June 2000