Table of Contents 00:30 Install Windows 05:40 Install MacOS 07:55 Database Basics 10:30 Create Database 11:40 Create Tables 16:34 Datatypes 18:49 Constraints 19:37 Database Design 25:10 Primary & Foreign Keys 25:55 Designate Foreign Keys 34:22 How Keys Link Tables 36:46 Altering Tables 39:35 Rename 39:53 Create Index 40:29 Truncate : Delete Data 40:42 Drop Table 40:57 Alter in Workbench 42:12 Insert 46:59 More Altering 51:19 Select 51:39 Conditional Operators 51:51 Where 52:29 Logical Operators 53:58 Between 54:30 Order By 55:16 Limit 55:40 Concat 56:14 Alias 56:52 Sum 57:32 Distinct 58:23 In 58:55 Inner Joins 1:03:16 Arithmetic Operators 1:04:28 Outer Joins 1:05:55 Cross Joins 1:07:04 Unions 1:09:06 NULL 1:09:55 Like 1:12:04 Regexp 1:16:00 Group By 1:17:37 Having 1:19:18 Aggregate Functions 1:22:35 Views 1:29:04 Updatable Views 1:31:20 Stored Procedures 1:38:36 In & Out Parameters 1:42:05 If, Elseif & Else 1:45:22 Case 1:47:53 While 1:49:42 Repeat 1:50:31 Cursors 1:53:00 Loop 1:55:12 Error Handling 1:59:26 User Defined Errors 2:04:02 Transactions 2:07:05 Stored Functions 2:12:20 Triggers
@terryhenyo9216
5 жыл бұрын
Thank You Derek!
@aditya95sriram
5 жыл бұрын
Appreciate the effort you put into your videos, thank you
@derekbanas
5 жыл бұрын
Thank you :)
@aditya95sriram
5 жыл бұрын
@@derekbanas Also, maybe you should pin this comment so that it's the first comment that shows up.
@spooky_zen
5 жыл бұрын
thank you addin this to the KDB;)
@joaofelipe2060
5 жыл бұрын
Hi Derek. You can download The installer without login. There was a button below called "No thanks Just take me to download"
@derekbanas
5 жыл бұрын
That's funny I've never noticed :)
@rajarshivaidya444
5 жыл бұрын
I was also gonna ask the same but you beat me to it a week earlier, lol
@jameshello38
2 жыл бұрын
For people who are getting "foreign key constraint fails" error while inserting data in sales_item table, it is because in the video the id in sales_order starts from 200, but while you insert data it starts from 1. So a simple solution is to update the id in sales_order to make it start from 200. Just run the following query after inserting the sales_order data from Derek's code and you are done: UPDATE sales_order SET sales_order.id = sales_order.id + 200;
@HappyPlantnSoul
2 жыл бұрын
I didn't see your command to the error however I set the foreign key to 0: SET FOREIGN_KEY_CHECKS=0; and ran the sales_ item data and set the foreign key back to 1: SET FOREIGN_KEY_CHECKS=1;
@oliwierrogula1768
2 жыл бұрын
@@HappyPlantnSoul this was the one that helped me, thank you
@SakyTalks
5 жыл бұрын
I thought it was clickbait but then I saw duration of the video..
@derekbanas
5 жыл бұрын
I do my best to always fulfill the promises I make in my video titles :)
@Coldpi3ce
4 жыл бұрын
If you get an error at around the 51 minute mark for INSERT sales_item, copy and paste this instead: pastebin.com/TffJzLk6 It has to do with him doing it twice. All the ID's for sales_order_id have been subtracted by 200 to work
@brianlimjj800
4 жыл бұрын
omg I freaking love you! thanks for saving my day
@courier_games8784
Жыл бұрын
Hey Derek, sorry for bothering you on this old video. But I was wondering you are doing something at 1hour and 38 minutes when writing the get_supplier_value procedure. You Select from two tables at once and supply a single filter in the WHERE clause. But the table you didn't mention in the WHERE clause also magically got filtered as if they where Joined in the background. Can you explain what happens there? Thanks for the video btw.
@gimifeHD
4 жыл бұрын
Love your videos! You are the reason why I'm studying Computer science.
@derekbanas
4 жыл бұрын
Thank you for the nice compliment :) That makes me very happy
@panchamss3
5 жыл бұрын
Do you reply to all comments? I love you man thank you for all your hardwork for us over the years! Cheers
@derekbanas
5 жыл бұрын
Love you too :) Yes I answer every comment I receive both on old and new videos
@aaronjoseph2335
5 жыл бұрын
I have an exam tmrw and this video literally just saved my life.. Now I can write the exam with ease.. Thanks Derek🙏🙏
@derekbanas
5 жыл бұрын
Best of luck on your exam :)
@rogermyers929
4 жыл бұрын
@50:24 you say that you accidentally started the ID's at 201. This leads to a 1452 Foreign Key constraint error when inserting the data into the sales_item table. Is there a way to alter the ID's in my sales order table to start @201?
@rogermyers929
4 жыл бұрын
To fix it I imported to a spreadsheet and subtracted 200 from the ID's then exported to a csv, opened it in notepad and pasted it into MySQL workbench. Crude but effective. I'd love to know if there is a more elegant way to do this with just MySQL.
@tmmcardle
4 жыл бұрын
@@rogermyers929 - thanks - I had same issue, I copied the command from www.newthinktank.com/2019/10/sql-tutorial-2019/ (FIRST - toggle line wrap on (3rd icon) - top right above text) lines 483-675, and then pasted into MYQSL Workbench, then changes all values in second column by removing the first 2, therefore lowering each value by 200. Inserted successfully after that.
@rmkc2335
4 жыл бұрын
@@tmmcardle - helpful. Imported the text into Excel (comma-delimited), it creates columnms A to G. I added a blank column H. I fixed the second column by subtracting 200 from each number and replacing that column. The formula in column i to use in Excel for each row is =TEXTJOIN(",",FALSE,A132:H132) Where the "," is the comma delimiter, FALSE means the blank cell H will force Excel add a comma Axxx:Hxxx is the columns A to H to be concatenated (adding in a comma after each) Replace the bad text in the import query, so: INSERT INTO sales_item VALUES (24,70,2,0.11,0,0, NULL), Make sure the last line uses a colon ; not a comma, so: (12, 9, 'Red', 'Coming Soon', 110.77, NULL); There are a fair number of these typos in the example code. I suppose the "learning path" trying to figure out the bugs would be part of the learning exercise. It is a good thing there are these comments here for those of us that get stumped.
@debjyotiarr
3 жыл бұрын
Hi Derek, huge thanks for doing this. One problem I encountered: When creating the procedure get_supplier_value (timestamp 1:35:00 ), I get an error with the following response "Error Code: 1140. In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'sales_db.product.supplier'; this is incompatible with sql_mode=only_full_group_by" . The code you gave works perfectly well after I turn off the only_full_group_by mode. Given that it's a default mode and it might be useful, is there any way around it?
@narayanpoudel7400
8 ай бұрын
How did you turn off the only_full_group_by mode?
@blakeliu1034
4 жыл бұрын
50:25 to get the id started at 201, there is a faster way UPDATE sales_db.sales_order SET id = 200+id WHERE (id >= 1);
@tgl2343
3 жыл бұрын
THANK YOU SO MUCH! I WAS STUCK FOR OVER HALF AN HOUR WONDERING WHY I CAN'T INSERT THE SALES ITEM VALUES!
@FeruMohammed
7 ай бұрын
Thank you. Saved me.
@codingbrew705
5 жыл бұрын
Derek my man! Your videos are amazing :) The tutorial videos you make helped me land a full-time engineering role. Just wanted to say thanks!
@derekbanas
5 жыл бұрын
That's amazing! I'm very happy that I could help :)
@jasonwakeman
Жыл бұрын
Ditto. Also helped me pass college and senior-semester project voted best out of 34 teams of 4. Instructor could not believe how simple and logical table schemas were. literally wrote/created them on first day of group collab after watching a shorter video by derek (which comprised 90% of my learning relational dbs). Only had one small schema update to one of the four, (and we added one more table later). 8 years later, I'm watching again because i think i was more proficient then than I am now :D
@sebosebo4661
5 жыл бұрын
Thank you for the easy to understand installation. I learned sql on codecademy and was ready to try my skills...but I didn't know where. As in, I literally didn't know where to code. Thanks :P
@derekbanas
5 жыл бұрын
Thank you :) I'm happy to be able to help
@camden8311
3 жыл бұрын
I used PostgreSQL and took notes on translating the queries from this video to it. It's pretty similar up to the section on procedures, then it's very different and was hard for me to follow along with. PostgreSQL translations: 13:50 - MEDIUMINT => INT Postgres does not have unsigned ints. The INT type is a 32-bit signed integer. 14:40 - ENUM => you must add "CREATE TYPE sex AS ENUM ('M', 'F');" at the very top of the file, then line 12 should be "sex sex NOT NULL" (the second "sex" is the enum that you defined) 16:00 - primary key => id SERIAL PRIMARY KEY Postgres uses a data type called SERIAL that auto-increments on its own. (Actually it's just an INT but it updates on its own) 23:00 - see note at 14:40 about enums 27:45 - BLOB => BYTEA 33:00 - TINYINT => SMALLINT Postgres doesn't have a TINYINT (1 byte) type, the closest is SMALLINT which is 2 bytes 36:30 - BOOL default 0 => BOOL default FALSE Postgres uses TRUE/FALSE as the values for booleans instead of 1/0 38:00 - Totally different command for modifying the column: ALTER TABLE sales_item ALTER COLUMN day_of_week TYPE VARCHAR(9), ALTER COLUMN day_of_week SET NOT NULL; 39:50 - Again, using a similar syntax as above: ALTER TABLE transaction_type RENAME TO transaction; 43:00 - Skip the id parameter, Postgres will add it for you. 44:50 - Same thing here, remove that last NULL value from each item (just use find and replace in your text editor, only takes a couple seconds). Remember this for future queries, I'll stop noting the id thing from here on out. 47:15 - The differences here have already been covered but here's the query: ALTER TABLE sales_order ALTER COLUMN purchase_order_number TYPE BIGINT, ALTER COLUMN purchase_order_numebr SET NOT NULL; 48:30 - Skip changing to SMALLINT because we already set it that way at 33:00 50:50 - The fifth column is BOOL type, so replace those 0s with FALSE - the quickest way is to Find & Replace ", 0," to ", false," 55:30 - LIMIT 5, 10 => LIMIT 5 OFFSET 5 Postgres skips the number of items specified in OFFSET, so you're telling it to skip the first five and then show the next 5. 57:34 - Postgres requires "GROUP BY product_id" added at the end, before the semicolon. 1:08:45 - MONTH(birth_date) => EXTRACT(MONTH FROM birth_date) 1:14:20 - WHERE first_name REGEXP '^Ma'; => WHERE first_name ~ '^Ma'; Postgres uses a tilde (~) instead of REGEXP 1:15:30 - I got fewer names in the list for this query than he did. Maybe Postgres uses a slightly different implementation of regex, I don't want to spend all day investigating. 1:17:20 - See note from 1:08:45 1:18:00 - HAVING Amount > 1 => HAVING COUNT(*) > 1 Postgres doesn't allow aliases for the HAVING line, so we need to count again 1:19:06 - This is that annoying error from 57:34 again, Postgres gets mad if you don't include customer.company in the GROUP BY line. You can write "GROUP BY cust_id customer.company" but it doesn't sort it properly. I did some research and couldn't find a good way to get past that issue in Postgres. 1:31:30 - Procedures seem to be completely different in Postgres. The next 30 minutes are still worth watching because they cover things that are used in Postgres, but it's probably not worth trying to follow along on your own. It's best to just go to the Postgres docs for this instead of trying to translate from the video. Also, while researching I saw that Postgres database admins usually prefer to save a script file instead of saving a procedure like this. Here is the example procedure from the official docs: CREATE PROCEDURE insert_data(a integer, b integer) LANGUAGE SQL AS $$ INSERT INTO tbl VALUES (a); INSERT INTO tbl VALUES (b); $$; CALL insert_data(1, 2); 1:42:05 - The if/else and while loops have similar syntax in Postgres. You can experiment with these in stored functions which this video covers toward the end, or try to follow along with Postgres procedures. 2:10:00 - The postgres equivalent to this function is (sorry about the all-lowercase): create or replace function get_order_total(_sales_order_id INT) returns decimal as $$ declare order_total decimal(8, 2); begin select sum(sales_item.quantity * item.price) as Total into order_total from sales_order join sales_item on sales_item.sales_order_id = sales_order.id join item on item.id = sales_item.item_id where sales_order.id = _sales_order_id group by sales_order.id order by sales_order.id; return(order_total); end $$ language plpgsql; Make sure to use that beginning underscore (_) before sales_order_id on the first line, because Postgres will get it confused with a table name otherwise. 2:16:00 - You can convert the procedure to the Postgres equivalent using the Postgres docs, but I couldn't get the trigger to work. It doesn't seem to understand the "NEW.first_name" syntax even though it's supposed to support it. I'm not sure what to do to make it work.
@pashabiceps95
3 жыл бұрын
good work
@markangelogarcia2584
5 жыл бұрын
hi guys i'm an anspiring web dev currently studying html5/css3 so which languages should i learn next? (i was work as a technical support in a company but due to massive lay offs i was 1 of the unfortunate who got fired but due to family needs i seek urgent employment currently working as a pump attendant and now seeking to work as a freelancer(web dev) to provide a better future to my family) please help me any advice and tips would really help me.............thanks guys
@derekbanas
5 жыл бұрын
Definitely JavaScript if you want to get into web development. I have a tutorial kzitem.info/news/bejne/qq96vKp9pqyFn6Q
@noteventrollin9581
4 жыл бұрын
Hey derek, thanks for the informative video. How did you change to dark theme? Im trying in windows and cant succeed. my windows theme is dark. using latest workbench ver.
@conniedecinko9245
5 жыл бұрын
Don't save credit card numbers in the database. It's not being PCI compliant. It always not a question of if your database gets compromised, but when.
@derekbanas
5 жыл бұрын
Yes I know. I was just sticking with my invoice example maybe a little to close.
@serhiy2020
5 жыл бұрын
Thank you for the video Derek. BTW, you don't have to sign up for the account. There's a "No thanks, just start my download." link below
@derekbanas
5 жыл бұрын
I've never noticed that. Thanks for pointing it out
@iron_maiden_fan1015
5 жыл бұрын
I downloaded mysql as in the video but my download did not include the workbench application. Do I need to download that separately
@derekbanas
5 жыл бұрын
You can get it here dev.mysql.com/downloads/workbench/
@veronikavakadinova904
4 жыл бұрын
Recently I watched several tutorials from your channel and they are so good. Thank you for publishing them. Stay safe. 🍀
@derekbanas
4 жыл бұрын
Thank you for the compliment :) I wish you good health as well.
@weltmeister
5 жыл бұрын
I just want to inform you that I just started my 6 months Database management training today and you dropped this video on me, perfect timing, keep it up.
@derekbanas
5 жыл бұрын
Happy I could help
@robbradley1337
5 жыл бұрын
Don't put zip codes in INTs! Some zipcodes begin with zero. I guess if you remember to left zero pad you'll be okay, but eh.
@johnnymartin3911
3 жыл бұрын
When I get to the sales_items values, following with the video and also going back and deleting and following from the page where the code is: I keep receiving the following error SQL Error [1452] [23000]: Cannot add or update a child row: a foreign key constraint fails (`sales_db`.`sales_item`, CONSTRAINT `sales_item_ibfk_2` FOREIGN KEY (`sales_order_id`) REFERENCES `sales_order` (`id`))
@pashabiceps95
3 жыл бұрын
same issue
@pashabiceps95
3 жыл бұрын
i found answer in comments Hi, I know that the fault is somewhere deeper but here is a simple solution which I've found. Disable foreign key check before adding data to table SET FOREIGN_KEY_CHECKS=0 and enable it right after the data is inserted SET FOREIGN_KEY_CHECKS=1
@piobasartejr.7686
Жыл бұрын
It's challenging at first but I enjoyed, I am going to watch this again and again until my brain used to it and fully understand every single detail, with much gratitude Derek
@Gujko20
4 жыл бұрын
do you need to download MySQL separately or does it also work when you use the same thing from XAAMP?
@msmckenzie5624
5 жыл бұрын
Thanks so much for your tutorial! I'm getting Error Code: 1452. "Cannot add or update a child row: a foreign key constraint fails" while trying to insert sales_item values. I'm using MySQL workbench 8.0.12 on MacOS Sierra. Do you have any idea what may be causing the error? Thanks.
@nathang83
4 жыл бұрын
Getting the same error. Did you find a fix?
@msmckenzie5624
4 жыл бұрын
@@nathang83 Not yet, the fix I initially tried caused a problem later on, so, I'll have to find another solution.
@DollopWise
4 жыл бұрын
I'm having the same problem when inserting into the Item table. Did you eventually find a fix?
@MuzzyV29
4 жыл бұрын
I think it is because the ID foes upto hundred with his data. @50.33 he explains and shows that his id starts with 201 upto 300. So you should enter your sales_order data three times and delete first 200 rows to reconcile the data. I fixed one of my issue and i believe your error references to the same issue but I do not remember my error exactly now. good luck :)
@MinecraftVinesFHAM
4 жыл бұрын
@@MuzzyV29 this worked, thank you!
@fourierboys
4 жыл бұрын
Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails (`sales_db`.`sales_item`, CONSTRAINT `sales_item_ibfk_2` FOREIGN KEY (`sales_order_id`) REFERENCES `sales_order` (`id`)) HELP PLEASE...ANYONEEEEE
@fabianrr
5 жыл бұрын
Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails (`sales_db`.`sales_item`, CONSTRAINT `sales_item_ibfk_2` FOREIGN KEY (`sales_order_id`) REFERENCES `sales_order` (`id`)) 😢
@jogosua1755
Жыл бұрын
@51:16 INSERT INTO sales_item VALUES (24, 270, 2, 0.11, 0, 0.0, NULL) Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails (`sales_db`.`sales_item`, CONSTRAINT `sales_item_ibfk_2` FOREIGN KEY (`sales_order_id`) REFERENCES `sales_order` (`id`)) Can someone help me?
@guitar0wnz
2 жыл бұрын
Casually reposting a comment that helped me solve Error 1452 that I got at around 50:48 " Gujju Pappu 2 years ago I think it is because the ID foes upto hundred with his data. @50.33 he explains and shows that his id starts with 201 upto 300. So you should enter your sales_order data three times and delete first 200 rows to reconcile the data. I fixed one of my issue and i believe your error references to the same issue but I do not remember my error exactly now. good luck :)"
@gudeboindy6674
3 жыл бұрын
Please, what is the problem in my product column? Columns: type_id int UN name varchar(30) supplier varchar(30) description blob id int UN AI PK. I got this error when l want to insert data to product : Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails (`sales_db`.`product`, CONSTRAINT `product_ibfk_1` FOREIGN KEY (`type_id`) REFERENCES `product_type` (`id`)) Thanks.
@unlimitedpowertv8048
3 жыл бұрын
I think I found something wrong while you were inserting the information for the sales_item table, your sales_order_id starts from 200+, but when I try to run it it says "Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails (`sales_db`.`sales_item`, CONSTRAINT `sales_item_ibfk_2` FOREIGN KEY (`sales_order_id`) REFERENCES `sales_order` (`id`))" I googled why it says that and it seems that if you only have sales_order(id) goes up to 100 you cannot insert sales_item with sales_order_id> 100, but if you insert items with sales_item_id
@PerryCS2
3 жыл бұрын
I love your videos but today a thought just popped into my mind... "Bueller, Bueller, anyone, Bueller".... (from Ferris Bueller's Day Off). LOL! Sorry, couldn't help myself.
@bapple7844
4 жыл бұрын
Writing this so that I have something I can look at to remember this concept. ON describes the relationship between two tables defined by a condition WHERE filters items according to a condition
@shaunyork7420
4 жыл бұрын
If you ever happen to get around to a Postgresql version of this video, please cover all those fancy jsonb_* , json_* functions as well at functions that return SETOF also LISTEN, NOTIFY and replication... My SQL skills are atrocious.
@besartc.835
3 жыл бұрын
Hi Derek - I don't know if I'm doing anything wrong but I followed all your steps and I can't seem to get MySQL working on my Macbook Catalina. It's all good until SQL Workbench doesn't show up anywhere on my computer, I can't find it. Would be super helpful if you can provide any tips
@Monkeyz73
4 жыл бұрын
do the PRIMARY KEY, INT, UNSIGNED, NOT NULL commands have to be in order? or can i put them in any order?
@robertsmith4019
4 жыл бұрын
Nice job Derek. I guess I'm missing something because I'm not finding the values to insert in your comment section.?
@darklen14
3 жыл бұрын
When you don't want to mess with MySQL and use MSSQL and have to convert the crap out of everything based on the direction of this video. --> Makes me a better programmer :)
@codeblooded
5 жыл бұрын
Hi Derek, can you make a learn in one video on RUST
@derekbanas
5 жыл бұрын
Hi, Here is my Rust tutorial kzitem.info/news/bejne/tmd7rJt5h351dW0
@obinator9065
5 жыл бұрын
The part with the redundant data is called normalization (atleast translated from my language). Our school covered first three of them. en.wikipedia.org/wiki/Database_normalization Once again proof that design is 80% of your project, good design = no normalization.
@derekbanas
5 жыл бұрын
I agree 100%! People ask me all the time why I don't spend more time on debugging. From my experience if you spend the time to make a good design using UML, you spend much less time debugging
@dangraff2411
2 жыл бұрын
What is the difference between VARCHAR and CHAR? And why did you use CHAR for the state and VARCHAR for the others?
@andrewdavis5841
3 жыл бұрын
I am not sure I understand where the information cam from that is being queried. I could see that I am following on correctly when running queries, but unclear about where the info being queried came from?
@johnsaylor1583
2 жыл бұрын
1:33:00 why is there a need to change the delimiter here? Why would you not be able to use semicolons inside the procedure otherwise? I think I know the answer but I am confused as to why there would be an explicit begin and end syntax and a processor / compiler would not ignore semicolons before end sot that it did not end the process definition.
@jared1099
2 жыл бұрын
Derek, did you say you have sample tables? I dont find them. Thanks.
@wilbertraymundrayos4175
5 жыл бұрын
OMG. I was literally looking for a tutorial in MySQL because I need to design a database for my inventory system. I'm looking for some tutorial for about 2 days now, but I can't find what I'm looking for. Thank you for releasing thing video.
@derekbanas
5 жыл бұрын
Happy I could help :)
@darkozivadinovic5326
Жыл бұрын
At 50:07 min, you had an error below, as far as I can see in the video, can you tell me how you managed to solve it, since it also gives me the same error?
@iulian4401
3 жыл бұрын
How do you make the whole Workbench Dark? Please help ( on windows 10 )
@AmyMay-m5m
Жыл бұрын
So when downloading there is not Developer default option, can you help?
@iamwhatiam1221
5 жыл бұрын
0:55 its not mandatory to login or signup. i did it months back by clicking the link below saying "No thanks, just start my download."
@rmommy101
4 жыл бұрын
great video derek. really learned a lot. I know the video is very long already but one thing I think you could add is more examples/scenarios where the different queries you talk about can be used. Or what kinds of sql request can be solved using various key words (and their combinations). Otherwise its like learning syntax with out knowing what it is really used for. All in all, great video. Please keep making more :) love the channel.
@derekbanas
4 жыл бұрын
Thank you :) Yes I agree that a long multi-video course is the way to completely grasp most all knowledge. I do my best to pack everything syntax wise into these videos. Just to let you know the reason why tutorial people don't make long courses on KZitem anymore is because KZitem punishes multi-video courses. I recently made a JS tutorial I was very proud of that included numerous real projects and KZitem won't list it in the search results. I hope they change that practice and if they do I'll be the first to go back.
@satishgangavati2922
4 жыл бұрын
can anyone explain the different tables derek created i am unable to find the relation in all the tables wic are created????
@fabianrr
5 жыл бұрын
Data Base Modeling Tutorial 2019 🤔
@derekbanas
5 жыл бұрын
If people would watch it I'd make it
@shivamwagh22
5 жыл бұрын
That would be helpful for sure
@melissatranfield4054
4 жыл бұрын
@@derekbanas Yes, please!
@voltbf4379
4 жыл бұрын
@@derekbanas Would watch 10/10 i have an exam on the subject in 2 months ...
@nashatbasel9144
5 жыл бұрын
Hi and good night sir @Derek Banas , this is my first time that I comment on someone video on youtube but I'd like to say to You, you have a GREAT videos specially in Java... Good work sir.
@derekbanas
5 жыл бұрын
Thank you for the nice compliment. I appreciate it!
@nashatbasel9144
5 жыл бұрын
@@derekbanas I'm the one who must says thanks to you sir.
@cestmagnifique7932
3 жыл бұрын
1:34:36 this DELIMITER thing doesn't work, it does nothing... MySQL80 DELIMITER // CREATE PROCEDURE get_customers() BEGIN SELECT company FROM customer; END // Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '//' at line 5
@cestmagnifique7932
3 жыл бұрын
I found the solution, procedure name must be wrapped in grave accents: DELIMITER // CREATE PROCEDURE `get_customers`() BEGIN SELECT company FROM customer; END // DELIMITER ;
@Ethan.J.C
4 жыл бұрын
at 50:46 after i insert sales_item i get this ERROR! please help i tried to fix it for a long time but im stuck. Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails (`sales_db`.`sales_item`, CONSTRAINT `sales_item_ibfk_2` FOREIGN KEY (`sales_order_id`) REFERENCES `sales_order` (`id`))
@brianlimjj800
4 жыл бұрын
same issue here. did u find a solution?
@pabloraindogarcia8107
3 жыл бұрын
hi derek, where is he python script used to generate all that data? i cannot find it attached..
@haldarnitish
5 жыл бұрын
Thanks you so much Derek. You really made youtube better for students and IT newbies.
@derekbanas
5 жыл бұрын
Thank you for the nice compliment :)
@pashabiceps95
3 жыл бұрын
not only for newbies
@victorkolis3438
4 жыл бұрын
Right neath the log in there is the *no, thanks* link. If you do not happen to have an account 0:55
@cosmophile9
4 жыл бұрын
Typo at 2:06:00 (FALSE->FLASE) Me: He's gonna get you. FLASE: FALSE! Btw love your videos! Thanks a lot!
@justingolden21
4 жыл бұрын
At 1:18:11, when you say "HAVING Amount > 1", why not say "WHERE Amount > 1"? What's the difference? I don't understand what functionality "HAVING" provides here.
@EzraSchroeder
2 жыл бұрын
@Derek Banas how did you decide on which book to refer to ("best SQL book")??? In general how do you decide which tech books to read? I have a masters degree in computer science now from a USA top-5 for grad school in comp sci with a high GPA, no relevant full time work experience, but I need to learn how to learn fast like you do...
@derekbanas
2 жыл бұрын
I know professors and ask them to rate the books out there on what ever topic I make videos on. That is were my recommended books come from. Of course I also then check them myself. I'm good at learning quickly because I have figured out how I best learn. I basically study in short bursts for about 1.5 to 2 hours at a time. If I want to remember something I use spaced repetition systems like Anki. I break down the core concepts in books as quickly as possible so that I can connect the core subject while everything is fresh in my mind.
@taqi5675
5 жыл бұрын
Sir Derek how do you understand something really fast
@derekbanas
5 жыл бұрын
I utilize software to learn topics very quickly. If I want to memorize something like a language I use basically a flash card system kzitem.info/news/bejne/lquou46LkKGFf6Q If I want to learn something more abstract like a musical instrument I make software that makes learning fun and efficient kzitem.info/news/bejne/l5-j2aGpm3p9qJg I have made hundreds of personal applications that were made to help me learn new things.
@thevelins
4 жыл бұрын
Derek, I do consider many of your videos to be The Benchmark on the respective topics. Over the years, you have provided much value to me and, most importantly, my padawan colleagues and students. My respect and gratitude goes towards you!!! To the point, I think I saw a mistake here: 1:37:35 ... cartesian join and total sum - no grouping by supplier_name. Am I missing something? I was expecting something like: SELECT product.supplier, SUM(item.price) INTO supplier_name, price_sum FROM product, item WHERE product.supplier = the_supplier AND product.id = item.product_id GROUP BY product.supplier
@derekbanas
4 жыл бұрын
Thank you for the nice compliment :) Sorry if I made a mistake. I'll take a look
@robq5703
2 жыл бұрын
Thanks for providing the fix :)
@Idk-vy3py
4 жыл бұрын
Do i have to install mysql workbench separately? Because after I have installed the DMG Archive of MySQL, MySQL Workbench was not installed
@derekbanas
4 жыл бұрын
Yes do that
@enan2852
5 жыл бұрын
literally after i started my Database course at the uni , thank you
@derekbanas
5 жыл бұрын
Happy I could help :)
@mariansand9663
5 жыл бұрын
Due to lack of time, I haven’t followed your channel for some time, I'm afraid. Today I popped in and saw you surpassed 1 million subscribers. Congratulations, very well deserved! I’ve learned a ton of things from your teaching, especially Java and C# and I’m very grateful and appreciative of your work in general. Some time ago, we had a conversation about how to increase views. I’m glad you adopted a few things we were talking about. I’ve just started watching your “Learn SQL in one video” tutorial to check whether there is something new or anything I don’t know. While watching I realised that although you start from scratch, complete beginners may be overwhelmed by e.g. the relative complexity of the tables. Therefore, in case you ever run out of ideas or requests (which I doubt) you might want to go a new route (in addition to your tutorials) and start a series for possibly young viewers who don’t have any previous knowledge about any programming language. Ignoring the very smart viewers, that perhaps needs a slightly different approach of teaching in which you break down concepts by introducing more visuals and giving a comprehensive introduction instead of the complete run down. Afterwards you could always refer to your videos that cover the complete language or a more thorough approach. Please, don’t get me wrong, your tutorials are amazing, instructive and very helpful, the positive comments are a reflection on that. I’m just expressing an idea which came into mind and wanted to let you know about. The suggested route might not be what you want. (And maybe you’ve already made up your mind by going the Udemy route.) Footnote: Flutter might be an interesting topic to cover.
@derekbanas
5 жыл бұрын
Thank you :) I can't believe I made it to 1M! Yes I basically decided to go the Udemy route to teach beginners through advanced. I recently did a lot of work with KZitem directly and I learned that they are just not interested in the education space any more. With Udemy I can provide quizzes, problems with in browser compilers, etc. I didn't od it in the past because they used to charge to much and while I wish they'd allow me to charge $5, $10 I think is reasonable. I'll continue to make KZitem videos, but people are just not interested in anything that isn't a learn in one anymore. I worked very had on a recent JS tutorial and nobody watched it which basically proved that I needed to expand beyond KZitem. Either way I still love KZitem mainly because of the audience and I'll remain here until they kick me out :)
@jamiemcmanaman8673
5 жыл бұрын
Thank you for this great tutorial, my question is can we do same stuff in SQL Developer, since I have many programs in my laptop, I don't wanna install MySQL too..
@chesstictacs3107
4 жыл бұрын
Mr. Banas, how do you change the white theme to the dark one?
@jonlbs7
4 жыл бұрын
Howdy.. Your tutorials are by far the BEST. Just one quick [possibly dumb] question... I just installed and I get a white skin background. Is there a way to configure it to a black screen background to match yours as I continue on this tutorial? God Bless !!
@danielquill
4 жыл бұрын
At 41:00, when I right click on 'customer' and select 'alter table' I get a completely different dialogue box which doesn't seem to allow the changes possible on the version you use in this video (I downloaded version 8.0.21 of MySQL Workbench in late August 2020 using your instructions in this video).
@camden8311
3 жыл бұрын
For anyone using Linux, the best graphical program I found was DBeaver Community, available on Flathub. You have to manually install and set up the database though. I used postgres instead of MySQL because it was easier to find and set up on Linux, the language for it is mostly the same. Install your distro's postgres package, let it run the setup thing it asks for, then launch the database with "sudo systemctl start postgresql". To access your postgres database through DBeaver, you need to modify pg_hba.conf and postgresql.conf (the location of these files depends on your distro, for me it was /var/lib/pgsql/data) to allow access through localhost and password-based authentication. After doing this I could open DBeaver and follow along with the video.
@franurbanliker728
4 жыл бұрын
Hi Derek! Modify isn't working for me. It gives me a syntax error close to modify. Do you have any knowledge on modifying tables in previous SMSS versions?
@wenthetranslator3414
4 жыл бұрын
Dutch people: I am trying to install in the Netherlands. After I press download for the installer, there is a warning I should check if the signature of this installer is legit with 3 programs of Oracle. There is also a 'bookwork' for each program to see how I should check. This takes the *fun out of installing it (*scares me to death). My laptop helps to say while I want to press Okay: Warning! This is an executable program which my contain virusses of other code that may damage your computer. Did you also experience this?
@doubled8741
5 жыл бұрын
You the awesome, rich knowledge in the contents and excellent explanation. Keep the great work. Thank you.
@derekbanas
5 жыл бұрын
Thank you :) I try to do my best
@bowu2094
4 жыл бұрын
I'm not able to insert value into sales_item (which you did at 51:06), I think that has something to do with reference "sales_order_id"
@bowu2094
4 жыл бұрын
Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails (`sales_db`.`sales_item`, CONSTRAINT `sales_item_ibfk_2` FOREIGN KEY (`sales_order_id`) REFERENCES `sales_order` (`id`))
@jackflavell445
5 жыл бұрын
14:42 ... its been a while since that was so confidently stated
@derekbanas
5 жыл бұрын
That's funny :) I was expecting someone to comment on that
@yonishachar1887
5 жыл бұрын
The truth will always, at some point, return to be confidently stated.
@adamtak3128
4 жыл бұрын
ugh...
@jeremyjohns9795
4 жыл бұрын
@Nahid Islam Nahid, I think your the one whose confused. We're fine. Thank you.
@jeremyjohns9795
4 жыл бұрын
We are clearly not. Thank you. Enjoy your day!
@ChristianPretorius
5 жыл бұрын
Hey man, thanks for this video! Day 475! Super impressive!
@derekbanas
5 жыл бұрын
Happy you liked it :) I have found it is easier to run every day since having children for some reason
@yonishachar1887
5 жыл бұрын
LMFAO and just a few days ago I completed watching your 40 minutes MySQL tutorial from 5 years ago
@derekbanas
5 жыл бұрын
This time I covered everything for real :)
@musa4747
3 жыл бұрын
Hi Derek, I trust you're well? I'd like to ask if it would be possible to treat a View as Table? I'm doing a premier league stats centre personal project and currently have all the individual match data but I don't want to use the readily available League Table data. I'd like to calculate the results from each match and generate the points total, total goals etc scored by each club and place it in a view. I'd like to know if I can pull the View data as I would a normal table or would I need to make the view a concrete Table?
@techfantasy6157
5 жыл бұрын
Do you play PUBG Moblie? Can you do a live stream? Can you teach us how to play?
@derekbanas
5 жыл бұрын
Sorry I don't play any video games other than the ones I make
@navirosas5968
5 жыл бұрын
The Awaken Coder Derek Banas!! | Thank you for being an incredible teacher 😀
@derekbanas
5 жыл бұрын
Thank you for the nice compliment :)
@wesleymogire9355
2 жыл бұрын
Thanks for yet another amazing video, if it's not too much to ask can you please send me the link to the python script for auto-generating the info. All I can find in the description is the code itself and the info generated
@tawandamashayamombe7030
4 жыл бұрын
Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails (`sales_db`.`sales_item`, CONSTRAINT `sales_item_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `item` (`id`)) Hi Derek im getting this error please help
@derekbanas
4 жыл бұрын
I have all my code here to help find the error www.newthinktank.com/2019/10/sql-tutorial-2019/
@tawandamashayamombe7030
4 жыл бұрын
Derek Banas Thanks mate!!!
@kresimircosic3753
5 жыл бұрын
Hey Derek, is it hard to explain MySQL migrations? I am not how to manage one using Node, I was told I need an ORM to do it. Are those migrations necessary when you are altering a database, for example adding a column, and then filling in the data that was inside before the addition?
@EJ-jh1vf
3 жыл бұрын
14:52 Based
@szymonkurowski3427
4 жыл бұрын
Just finished a whole tutorial. After a few days ;) Thanks a lot Derek! I learned much neat stuff.
@derekbanas
4 жыл бұрын
Thank you very much :) Happy to help
@heatherhulett4741
3 жыл бұрын
IT'S PRONOUNCED LIKE NAIKEE, NOT NAIKE LOL
@caddydz
5 жыл бұрын
Thanks for the amazing content Derek, I watched your MySQL tutorial years ago in 2016 and forgot almost everything because of ORMs, do you think raw SQL is still relevant?
@derekbanas
5 жыл бұрын
Thank you very much :) I personally don't like ORMs. They are so many I've come across with different syntax which I wish I did, but I don't have to time to master. I'd much prefer to use SQL which is nearly the same with every language. Just my personal opinion
@brandonhorine1346
2 жыл бұрын
Had an error on line 15 could someone help
@_lemonny
4 жыл бұрын
I followed everything exactly, but cannot insert the values for the sales item table. I'm getting "Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails." I retraced my steps through the video, but this is still failing. Any help?
@jasebanta2513
4 жыл бұрын
Gujju Pappu 7 months ago "I think it is because the ID foes upto hundred with his data. @50.33 he explains and shows that his id starts with 201 upto 300. So you should enter your sales_order data three times and delete first 200 rows to reconcile the data. " basically insert the sales_order twice, then you end up with 300 rows of repeated data and then you should be able to run the insert sales_item statement.
@_lemonny
4 жыл бұрын
@@jasebanta2513 Thanks a heap!
@jared1099
2 жыл бұрын
Derek. Excellent overview. What books do you recommend?
@asniceful
3 жыл бұрын
Hello Could you consider tutorial on connecting to remote mysql using workbench from another client
@UCECRUSH
5 жыл бұрын
for line 15 where I enter the "PRIMARY KEY" it says this is not valid at this position and Ive looked everywhere through manuals to why it gives me that syntax error
@samartajshaikh2601
2 жыл бұрын
Bro, this is one of the best tutorials available on KZitem on this topic...
@derekbanas
2 жыл бұрын
Thank you for the nice compliment :)
@adamtak3128
4 жыл бұрын
Do these commands work for postgresql or is that something different?
@derekbanas
4 жыл бұрын
SQL is a standard across all DBs. They only add to the core SQL language
@prashlovessamosa
Жыл бұрын
This person is a legendary teacher
@luv1pocket
4 жыл бұрын
Surprised only 1800 likes and how did he get 20 dislikes?
@derekbanas
4 жыл бұрын
Wow 1800 likes!!! That shocked me
@PeacefulCountryLife
4 жыл бұрын
Please put "MySQL" in the title. I thought you were talking about the ANSI ("standard") SQL
Пікірлер: 409