Git Product home page Git Product logo

databases's Introduction

If you are following the curriculum we recommend you to start with module 1: HTML/CSS/GIT. To get a complete overview of the SocialHackersCodeSchool curriculum first, click here.

Please help us improve and share your feedback! If you find better tutorials or links, please share them by opening a pull request.

Module #6 - Databases: Store and retrieve data with MySQL (Backend)

Databases

Have you ever thought about how your brain remembers things? It happens automatically for humans, but that's not so for computers. Any time you go to a website and you fill in some details, in for example a form, that information needs to be saved somewhere. This "somewhere" is called a database.

In this module you'll learn all about a fundamental part of any software application: how to (safely) store data, so that it can be used on-demand. You'll learn how to structure and group data so your apps know where to find and store the correct data.

Learning goals

In this module you will get familiar with the complexity of storing data. By the end of it you have learned:

  • What the meaning is of a database entity
  • How to work with Structured Query Language (SQL)
  • Learn all about the relational model
  • Recognize the basic setup of a database
  • Know about MySQL as an example of a relational database system
  • Learn about NoSQL databases, with an emphasis on MongoDB

Before you start

Before you start you need to install the software we'll use to store our data: MySQL.

Note: Make sure you select the right operating system: MacOS, Windows or Ubuntu/Linux.

For a step-by-step tutorial, check out this MySQL tutorial

After you've finished installing the software, open it through your command line interface:

  • Windows users should use Microsoft MySQL Command Line client.
  • Linux users should use Gnome Terminal
  • MacOS users should use Terminal.

Step 1: Creating a root user

To get started with your new MySQL client, we first have to create a root user.

A root user, also known as a superuser is a special user account that has access to all commands and files of any particular software.

The Microsoft MySQL Command Line client gives you a msql> prompt after typing in your root password. Note that this password is the one you used for the root user of the mysql. Linux and MAC users can execute mysql -uroot -p and then type your password.

Step 2: Creating a hyfuser account

After creating the root user, it's time to create the account we'll be using for this module. Execute the following commands, one after the other:

# Step 1: This command creates a user 'hyfuser' with password 'hyfpassword' for the database server at 'localhost'

mysql> create user 'hyfuser'@'localhost' identified with mysql_native_password by 'hyfpassword';

# If this does not work try the alternative command:

mysql> create user 'hyfuser'@'localhost' identified by 'hyfpassword';

# Step 2: This command gives all permissions to user 'hyfuser'. The (_._) means every table of every database.

mysql> grant all privileges on *.* to 'hyfuser'@'localhost';

# Step 3: This command creates a database named 'userdb'

mysql> create database userdb;

For a step-by-step walkthrough on video, you can watch the following video:

Planning

Week Topic Readings Homework Lesson Plan
1. What's a database, Entities, Data structures, Structured Query Language (SQL) Readings W1 Homework W1 Lesson Plan W1
2. Identifiers, Relationships, Domain Modeling, Advanced SQL commands Readings W2 Homework W2 Lesson Plan W2
3. Normalization, Transactions, SQL Injection, NoSQL (with MongoDB) Readings W3 Homework W3 Lesson Plan W3

Finished?

Did you finish the module? You're almost at the top!

If you feel ready for the next challenge, click here to go to React!

Credit:

This curriculum is developed by HackYourFuture, modifications, and changes can be found in this Fork. (edited)

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

databases's People

Contributors

unmeshvrije avatar jasongwartz avatar mkruijt avatar filievski avatar laurensrietveld avatar noergitkat avatar gijscor avatar shadoo77 avatar chris-gunawardena avatar tkaria avatar allhandsondeck avatar wilgert avatar danlaudk avatar hatemkhattab avatar jidarwish avatar remarcmij avatar rts-rob avatar sohailhaqyar avatar tjebbee avatar daanaerts avatar pcelentano avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.