Book Image

Flask By Example

By : Gareth Dwyer
Book Image

Flask By Example

By: Gareth Dwyer

Overview of this book

This book will take you on a journey from learning about web development using Flask to building fully functional web applications. In the first major project, we develop a dynamic Headlines application that displays the latest news headlines along with up-to-date currency and weather information. In project two, we build a Crime Map application that is backed by a MySQL database, allowing users to submit information on and the location of crimes in order to plot danger zones and other crime trends within an area. In the final project, we combine Flask with more modern technologies, such as Twitter's Bootstrap and the NoSQL database MongoDB, to create a Waiter Caller application that allows restaurant patrons to easily call a waiter to their table. This pragmatic tutorial will keep you engaged as you learn the crux of Flask by working on challenging real-world applications.
Table of Contents (20 chapters)
Flask By Example
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Index

Understanding relational databases


In its simplest form, a relational database management system, such as MySQL, is a glorified spreadsheet program, such as Microsoft Excel. We use it to store data in rows and columns. Every row is a "thing" and every column is a specific piece of information about the "thing" in the relevant row. I put "thing" in inverted commas because we're not limited to storing objects. In fact, the most common example of a thing, both in the real world and in explaining databases, is data about people. A basic database storing information about customers of an e-commerce website could look something similar to the following:

ID

First name

Surname

E-mail address

Telephone

1

Frodo

Baggins

[email protected]

+1 111 111 1111

2

Bilbo

Baggins

[email protected]

+1 111 111 1010

3

Samwise

Gamgee

[email protected]

+1 111 111 1001

If we look from the left to the right in a single row, we will get all the information about one person. If we look in a...