A Whistlestop Tour
Of Databases
Jonny Arnold -- @JonnyArnold89
What is a database?
A database is...
A set of data structures optimised for getting and setting data
with
A piece of software that understands how to get and set data.
Let’s build our own!
[write.program]
print(“Speaker Name:”)�speaker_name = read()��print(“Talk Title:”)�talk_title = read()
writeFile(
“Names.txt”,
“#{speaker_name},#{talk_title}”
)
[names.txt]
Danielle,All You Need Are Squares and Circles
Kadi,Once you React You Can't Go Back
Georgia,Breaking through the beginner bottleneck
Jonny,A Whistlestop Tour of Databases
Tatiana,Keeping a clean commit history
[read.program]
fileText = openFile(“names.txt”)
names_and_talks = fileText
.split(“\n”)
.split(“,”)
for(name, talk in names_and_talks) {
print(“#{name}: #{talk}”)
}
A database is...
A set of data structures optimised for getting and setting data
with
A piece of software that understands how to get and set data.
It’s a bit more complicated than that.
Databases use different data structures�when storing and retrieving data:
Relational (MySQL, PostgreSQL)
Document Store (MongoDB, CouchDB)
Graph (Neo4J)
Key-Value (Riak, Memcache)
Tuple (Apache River/Jini)
Relational Databases
Good for storing things that are related to other things, and have the same structure.
Currently the most popular type of database.
Relational Database Concepts
Tables of data (like Excel Spreadsheets)
Joins
SQL
SELECT
speakers.name,
talks.title
FROM
talks
JOIN speakers
ON talks.speaker_id = speakers.id
WHERE
talk.date_presented = DATENOW()
Databases use different data structures�when storing and retrieving data:
Relational (MySQL, PostgreSQL)
Document Store (MongoDB, CouchDB)
Graph (Neo4J)
Key-Value (Riak, Memcache)
Tuple (Apache River/Jini)
Databases store data for �fast storage and retrieval.
Databases use different data structures�when storing and retrieving data.�
A Whistlestop Tour
Of Databases
Jonny Arnold -- @JonnyArnold89
Thanks!