Introduction to Databases

Learning outcomes:

  • List differences between a spreadsheet and a database
  • List the main characteristics of a database
  • Describe how a database is used differently than a table of data in a word document

Would you like to download my PowerPoint to follow along?

  • What is a database
    • A database is a collection of information
    • Databases store and organize data so you can get to it easier
    • Databases are good for larger amounts of data
    • Some examples of where a database might be useful
      • Customer information
      • Product or store information
      • Item collection information (Pok√©mon, Movies, Books)
      • Patient records
      • Student records
  • How is a database different then a spreadsheet
    • Both are tools to store and organize data
    • Spreadsheets are better for calculations and data entry
    • Databases are better for manipulating data, running reports and updating data
    • Databases can also handle larger amounts of data more easily than a spreadsheet
    • Databases are also better if there are multiple people that need access to the data, especially if the access needs are simultaneous
    • Spreadsheet vs Database
    • SPREADSHEETS ARE NOT DATABASES
  • Structured vs Unstructured data
    • Structured Data
      • Organized and formatted
      • Version control can be applied in multiples ways and over parts of the data
      • Queries are permitted
    • Unstructured Data
      • Not organized or formatted
      • Version control can only be done as a whole
      • Only text queries can be used
    • Why structured data is important
      • Structured data is typically quantitative and is formatted in specific ways to be more readable for humans and machines.
      • Structured data is easier to run ML (Machine Learning) Algorithms against
      • Easier for people to manipulate and analyze the data without needing to understand much about data types
      • More tools are available for structured data
      • Structured data is generally found in spreadsheets and databases
  • What is CSV and why do we use it
    • CSV means Comma Separate values
    • CSV by Wikipedia
    • There are other ways to sperate out the data such as tab, space, semicolon or colon, the symbol used to separate out the values is called a delimiter
    • It's a text file that allows us to send data in plain text while keeping it organized into tables
    • CSVs are very useful for getting data from one place to another, such as from a spreadsheet into a database
    • CSV is not proprietary so it's also a good way to share data between programs that use proprietary formats
    • Several programs also use CSV for long term data storage as it's fast, readable, and comparatively small
  • Why we have databases
    • Databases allow us to store more data easier than other formats, they also allow us to organize the data in lots of ways
    • Organized data allows us to run reports and queries more easily, so we can answer certain questions about our data, such as What is the email address for the customer? How many units did they buy last month? Last year? How much product have we sold last month? Last year?
    • Databases allow us to store and process our data, but also allow multiple simulations other people to also store and process data
    • Centralized locations for data to ensure everyone is using the same data and has access to it allows for better business practices
  • Examples of kinds of databases
    • Relational
    • Non-relational
    • Hierarchical
    • 3D
    • Geographic
    • Object Oriented
  • Relational Databases
    • Organizes data in rows and columns to form tables
    • Data is structured across multiple tables
    • Tables are connected (or relate) to each other using primary or foreign keys
    • We can have multiple relationships or connections between the tables
    • For example, if you have a customer table, and a products table, and a sales table, you may be able to ask who purchased what, how much, and when
    • This is where we'll be focusing
  • SQL and mySQL
    • SQL or Structured Query Language is how you interact with a relational database
    • SQL is the language
    • MySQL is the database
    • Might hear S Q L
    • Might hear See-quil (or sequel)
    • The language is used to ask questions of your database

Suggested Activities and Discussion Topics:

  • Discussion or short paper, explore the practical applications of databases in real-world scenarios. Students will discuss the importance of databases, their role in various industries, and the challenges associated with managing and utilizing databases effectively.In small groups or pairs, Consider the following questions:
    • Share an example from your own experience or research where a database played a crucial role. It could be a scenario from your workplace, a case study, or a notable application you've come across.
    • Discuss the specific ways in which a well-designed database contributed to efficiency, organization, or decision-making in that context.
    • Consider the evolving landscape of technology and databases. Research and share a current or emerging trend in database management.
  • Complete this PDF

Would you like to see some more classes? Click here