Tumgik
#SQL
nerdymemes · 5 months
Text
Tumblr media
145 notes · View notes
lunacoding · 11 months
Text
SQL Interactive Websites
Hi! I wanted to share some websites that have helped me with bettering my SQL skills and are interactive, as in you can learn as you practice SQL on the website through an educational or fun way! 
SQL Bolt
This website is one of the best for beginners to SQL as it helps with explaining the different SQL statements as well as giving brief interactive exercises for each explanation/topic. Additionally, it offers help on more intermediate topics as well such as subqueries. However, this site doesn’t have many resources on more advanced SQL topics, so it may not be best if you’re more intermediate in SQL, but could be good for a basics refresher.
SQL Zoo
This website is another one which is good for beginners to SQL as similarly to SQL Bolt, it primarily explains different SQL statements and queries. There are brief interactive exercises as well as quizzes on various SQL topics. Additionally, there are assessments for more advanced users of SQL to test their knowledge which consist of 15 questions for different databases, including dressmaker, musicians, help desk, and so forth.
Select Star SQL
This website is an interactive SQL exercise where you learn as you go while interacting with a database of death row patients. The difficulty of queries slowly increases as you go through the exercise. I find this website helpful as it threw me into SQL and I prefer the learning while doing method, especially with real-world data. This could potentially be triggering if you don’t want to read the details of people being on death row.
SQL Murder Mystery
This website is an interactive SQL exercise where you try to figure out who committed a murder using SQL. This website is good for both beginners and more intermediate SQL learners. It offers a walkthrough for people who are completely new to SQL. Alternatively, the website gives schema details to those experienced with SQL and want to figure it out on their own.
SQL Police Department
This website is similar to SQL Murder Mystery where you try to figure out police cases through learning SQL. It has prompts where you then use SQL to try to figure out the information the police need. The site also has a guide on SQL and gives basic summaries on different queries. I found this site fun to use and it has a cool interface. However, one con of this site is you can only do a certain amount of SQL queries before it asks you to pay for the longer version of the site.
Practice SQL
This website has been my personal favorite as the interface is clean and easy to understand. The website gives you prompts to use SQL to select from two different databases, the first of which is based on doctors and patients in different provinces while the the second is based on products and their orders as well as employees who work at the company. For both of these databases, there’s a series of prompts/questions from easy to intermediate to advanced SQL. Additionally, there’s learning resources which helps explain different queries and functions of SQL as well, if you’re confused or need help!
I hope you guys find these websites helpful!!
258 notes · View notes
welele · 3 months
Text
Tumblr media
Viendo las webs gubernamentales y la de tráfico que tenemos, esa inyección SQL seguro que colaría.
76 notes · View notes
cyberjulie · 1 year
Text
He's making a database. He's sorting it twice. SELECT * from contacts WHERE behavior = 'nice' SQL Clause is coming to town. 🎄🎅
Tumblr media
569 notes · View notes
crackaddict55 · 7 months
Text
🤩Are you a CS Student !?!???? 🥳🤩😎CHECK OUT THESE-
No. No I’m not. I study at home.
97 notes · View notes
codingquill · 8 months
Text
SQL Fundamentals #1: SQL Data Definition
Last year in college , I had the opportunity to dive deep into SQL. The course was made even more exciting by an amazing instructor . Fast forward to today, and I regularly use SQL in my backend development work with PHP. Today, I felt the need to refresh my SQL knowledge a bit, and that's why I've put together three posts aimed at helping beginners grasp the fundamentals of SQL.
Understanding Relational Databases
Let's Begin with the Basics: What Is a Database?
Simply put, a database is like a digital warehouse where you store large amounts of data. When you work on projects that involve data, you need a place to keep that data organized and accessible, and that's where databases come into play.
Exploring Different Types of Databases
When it comes to databases, there are two primary types to consider: relational and non-relational.
Relational Databases: Structured Like Tables
Think of a relational database as a collection of neatly organized tables, somewhat like rows and columns in an Excel spreadsheet. Each table represents a specific type of information, and these tables are interconnected through shared attributes. It's similar to a well-organized library catalog where you can find books by author, title, or genre.
Key Points:
Tables with rows and columns.
Data is neatly structured, much like a library catalog.
You use a structured query language (SQL) to interact with it.
Ideal for handling structured data with complex relationships.
Non-Relational Databases: Flexibility in Containers
Now, imagine a non-relational database as a collection of flexible containers, more like bins or boxes. Each container holds data, but they don't have to adhere to a fixed format. It's like managing a diverse collection of items in various boxes without strict rules. This flexibility is incredibly useful when dealing with unstructured or rapidly changing data, like social media posts or sensor readings.
Key Points:
Data can be stored in diverse formats.
There's no rigid structure; adaptability is the name of the game.
Non-relational databases (often called NoSQL databases) are commonly used.
Ideal for handling unstructured or dynamic data.
Now, Let's Dive into SQL:
Tumblr media
SQL is a :
Data Definition language ( what todays post is all about )
Data Manipulation language
Data Query language
Task: Building and Interacting with a Bookstore Database
Setting Up the Database
Our first step in creating a bookstore database is to establish it. You can achieve this with a straightforward SQL command:
CREATE DATABASE bookstoreDB;
SQL Data Definition
As the name suggests, this step is all about defining your tables. By the end of this phase, your database and the tables within it are created and ready for action.
Tumblr media
1 - Introducing the 'Books' Table
A bookstore is all about its collection of books, so our 'bookstoreDB' needs a place to store them. We'll call this place the 'books' table. Here's how you create it:
CREATE TABLE books ( -- Don't worry, we'll fill this in soon! );
Now, each book has its own set of unique details, including titles, authors, genres, publication years, and prices. These details will become the columns in our 'books' table, ensuring that every book can be fully described.
Now that we have the plan, let's create our 'books' table with all these attributes:
CREATE TABLE books ( title VARCHAR(40), author VARCHAR(40), genre VARCHAR(40), publishedYear DATE, price INT(10) );
With this structure in place, our bookstore database is ready to house a world of books.
2 - Making Changes to the Table
Sometimes, you might need to modify a table you've created in your database. Whether it's correcting an error during table creation, renaming the table, or adding/removing columns, these changes are made using the 'ALTER TABLE' command.
For instance, if you want to rename your 'books' table:
ALTER TABLE books RENAME TO books_table;
If you want to add a new column:
ALTER TABLE books ADD COLUMN description VARCHAR(100);
Or, if you need to delete a column:
ALTER TABLE books DROP COLUMN title;
3 - Dropping the Table
Finally, if you ever want to remove a table you've created in your database, you can do so using the 'DROP TABLE' command:
DROP TABLE books;
To keep this post concise, our next post will delve into the second step, which involves data manipulation. Once our bookstore database is up and running with its tables, we'll explore how to modify and enrich it with new information and data. Stay tuned ...
Part2
87 notes · View notes
studentbyday · 8 months
Text
Tumblr media
day 43 // 100doc
finished sql lab
finished movies problem
worked on fiftyville - gotta check my queries tmr bc I don't get the right answers...
81 notes · View notes
momodidit · 6 months
Text
mySQL - a little peek into databases
// Code Journal Nr. 1
Databases is one of the courses this semestar that I really put on a back burner - undeserving! I found my motivation today to make a little cheat sheet for myself, with a simple tutorial how to create a database with a single table. I hate examples that do not relate to me in any way - so I choose to make a imaginary bookcase database.
Also do not get discouraged by the Command Line - it is just he most basic way to use mySQL and it looks very "hacker from the 90'".
Tumblr media
P.S. in order to use mySQL you have to install it from their website. It is straight forward - just click your way throught it.
Couple of basic things in mySQL. Lets build a Bookcase database.
in order to create a database you just need to use CREATE DATABASE - do not forget the ";" !
Tumblr media
In order to use the database you have to type USE database_name.
USE bookcase;
if you want to see what databases are there:
SHOW DATABASES;
if you want to delete your Database use DROP:
DROP DATABASE bookcase;
Tumblr media
Ok now we have a Database - but in order to be functional we need to create Tables. Tabels are the main form of storing data in SQL. Collums represent different attributes ( book name, author …) , and rows are the data entries - in this case the separate books.
in order to crate a Table you write the individual attributes that your book needs to have with the datatypes specified:
CREATE TABLE book ( id INT AUTO_INCREMENT, title VARCHAR(100), author VARCHAR(100), publication_year YEAR, PRIMARY KEY(id) );
in order to identify your book you give it a primary key → in this case it is the personal id of the book. But you can also imagine it being the ISBN number.
Now you can add your books in your database.
you add entries with INSERT INTO
INSERT INTO book (title, author, publication_year) VALUES ('The Great Gatsby', 'F. Scott Fitzgerald', 1925);
Tumblr media
if you want to see al entries you use SELECT → "*" means all.
SELECT * from book;
And you will get all the entries - so far only one:
Tumblr media
Bem! Your own little mySQL database.
34 notes · View notes
code-es · 1 year
Text
Tumblr media Tumblr media Tumblr media Tumblr media
let today = new Date(11 April 2023);
Life as of recently!!
I'm really enjoying backend stuff since my last two courses have basically just been figma prototyping, but I'm so happy to be back to coding. These weeks of figm-ing have really made me realize that code is where i want to be. But I'm also generally confused lol, it's up and down but i like it. I went bouldering, which is like the official sport of tech lmao. Also top right pic is of a bugged project me and my boyfriend are working on, and its so nice to just sit down and be accountable and confused with someone lol
Good luck with your studies 🌸
98 notes · View notes
meanvanillabean · 1 year
Text
Tumblr media Tumblr media
10.30.22 halloween eve 🎃
sunday study sesh with friends. surprisingly, we were productive. i finished a sql lab and studied marketing. the weather was dark and stormy—perfect for a day inside.
cafe order ☕️: vanilla latte, matcha latte, and blueberry cheesecake (not pictured)
374 notes · View notes
mechanical-moron · 6 months
Text
Programmers, Web designers, game developers, anyone else who does stuff with numbers on a computer screen.....curious to know if you guys ever dream in code, and if so, do you like it? I for one do not find it to be particularly enjoyable but want to hear what others have to say lol.
33 notes · View notes
misogynist-lesbian · 6 months
Text
Tumblr media
oh god i can still see it when i close my eyes
36 notes · View notes
devhubby · 9 months
Text
40 notes · View notes
crackaddict55 · 1 year
Text
Ok turns out if you don’t practice your problem solving skills often there is a 100% chance your brain will regress to the state of your 6 year old self and you will forget how to solve the most basic problems.
Good to know.
321 notes · View notes
codingquill · 8 months
Text
SQL Fundamentals #2: SQL Data Manipulation
Tumblr media
In our previous database exploration journey, SQL Fundamentals #1: SQL Data Definition, we set the stage by introducing the "books" table nestled within our bookstore database. Currently, our table is empty, Looking like :
books
| title | author | genre | publishedYear | price |
Data manipulation
Tumblr media
Now, let's embark on database interaction—data manipulation. This is where the magic happens, where our "books" table comes to life, and we finish our mission of data storage.
Inserting Data
Our initial task revolves around adding a collection of books into our "books" table. we want to add the book "The Great Gatsby" to our collection, authored F. Scott Fitzgerald. Here's how we express this in SQL:
INSERT INTO books(title, author, genre, publishedYear, price) VALUES('The Great Gatsby', 'F. Scott Fitzgerald', 'Classic', 1925, 10.99);
Alternatively, you can use a shorter form for inserting values, but be cautious as it relies on the order of columns in your table:
INSERT INTO books VALUES('The Great Gatsby', 'F. Scott Fitzgerald', 'Classic', 1925, 10.99);
Updating data
As time goes on, you might find the need to modify existing data in our "books" table. To accomplish this, we use the UPDATE command.For example :
UPDATE books SET price = 12.99 WHERE title = 'The Great Gatsby';
This SQL statement will locate the row with the title "The Great Gatsby" and modify its price to $12.99.
We'll discuss the where clause in (SQL fundamentals #3)
Deleting data
Sometimes, data becomes obsolete or irrelevant, and it's essential to remove it from our table. The DELETE FROM command allows us to delete entire rows from our table.For example :
DELETE FROM books WHERE title = 'Moby-Dick';
This SQL statement will find the row with the title "Moby-Dick" and remove it entirely from your "books" table.
To maintain a reader-friendly and approachable tone, I'll save the discussion on the third part of SQL, which focuses on data querying, for the upcoming post. Stay tuned ...
33 notes · View notes
pancakeke · 1 year
Text
Tumblr media
80 notes · View notes