Learn PostgreSQL Tutorial - Full Course for Beginners

  Рет қаралды 2,580,395

freeCodeCamp.org

freeCodeCamp.org

Күн бұрын

Пікірлер: 2 000
@AmanSinghYT
@AmanSinghYT 4 жыл бұрын
⭐️ Contents ⭐️ ⌨️ (0:03:16) What is a Database ⌨️ (0:05:17) What is SQL And Relational Database ⌨️ (0:09:10) What is PostreSQL AKA Postrgres ⌨️ (0:10:53) PostgreSQL Installation (Mac OS) ⌨️ (0:14:21) PostgreSQL Installation (Windows) ⌨️ (0:17:38) GUI Clients vs Terminal/CMD Clients ⌨️ (0:21:39) Setup PSQL (MAC OS) ⌨️ (0:25:22) Setup PSQL (Windows) ⌨️ (0:30:15) How to Create Database ⌨️ (0:33:35) How to Connect to Databases ⌨️ (0:38:12) A Very Dangerous Command ⌨️ (0:41:37) How To Create Tables ⌨️ (0:45:46) Creating Tables Without Constraints ⌨️ (0:49:12) Creating Tables with Constraints ⌨️ (0:55:55) Insert Into ⌨️ (0:59:14) Insert Into Example ⌨️ (1:02:36) Generate 1000 Rows with Mockaroo ⌨️ (1:12:28) Select From ⌨️ (1:15:18) Order By ⌨️ (1:19:53) Distinct ⌨️ (1:21:59) Where Clause and AND ⌨️ (1:25:29) Comparison Operators ⌨️ (1:29:35) Limit, Offset & Fetch ⌨️ (1:32:43) IN ⌨️ (1:35:43) Between ⌨️ (1:37:45) Like And iLike ⌨️ (1:43:10) Group By ⌨️ (1:46:41) Group By Having ⌨️ (1:52:08) Adding New Table And Data Using Mockaroo ⌨️ (1:55:40) Calculating Min, Max & Average ⌨️ (1:59:48) Sum ⌨️ (2:01:55) Basics of Arithmetic Operators ⌨️ (2:05:59) Arithmetic Operators (ROUND) ⌨️ (2:09:43) Alias ⌨️ (2:12:32) Coalesce ⌨️ (2:16:15) NULLIF ⌨️ (2:20:21) Timestamps And Dates Course ⌨️ (2:23:21) Adding And Subtracting With Dates ⌨️ (2:25:58) Extracting Fields From Timestamp ⌨️ (2:27:28) Age Function ⌨️ (2:29:24) What Are Primary Keys ⌨️ (2:31:23) Understanding Primary Keys ⌨️ (2:36:26) Adding Primary Key ⌨️ (2:40:55) Unique Constraints ⌨️ (2:49:15) Check Constraints ⌨️ (2:54:45) How to Delete Records ⌨️ (3:01:36) How to Update Records ⌨️ (3:05:55) On Conflict Do Nothing ⌨️ (3:11:09) Upsert ⌨️ (3:16:41) What Is A Relationship/Foreign Keys ⌨️ (3:19:48) Adding Relationship Between Tables ⌨️ (3:25:04) Updating Foreign Keys Columns ⌨️ (3:29:30) Inner Joins ⌨️ (3:35:17) Left Joins ⌨️ (3:40:53) Deleting Records With Foreign Keys ⌨️ (3:47:27) Exporting Query Results to CSV ⌨️ (3:50:42) Serial & Sequences ⌨️ (3:57:18) Extensions ⌨️ (3:59:39) Understanding UUID Data Type ⌨️ (4:05:54) UUID As Primary Keys ⌨️ (4:16:30) Conclusion
@hejsjsi2449
@hejsjsi2449 2 жыл бұрын
THANKS
@mendylanda125
@mendylanda125 2 жыл бұрын
Thanks!
@sattasundertalukder1972
@sattasundertalukder1972 2 жыл бұрын
awesome man...Thanks a bunch.....
@abbiemorancie547
@abbiemorancie547 2 жыл бұрын
GREAT! THANKS MEHN
@venusbahrami2875
@venusbahrami2875 2 жыл бұрын
Thanks, can you send the link that he talks about it at 1:54?
@sewind6613
@sewind6613 2 жыл бұрын
That someone would take their time to make such a complete set of tutorials, and to make them available for free, is amazing. Words are not enough to express my gratitude, and my respect for you.
@Friend_2162
@Friend_2162 9 ай бұрын
I believe they were not free in the beginning. We can just appreciate they are free eventually after just 4 years :)
@andrerangel7654
@andrerangel7654 5 жыл бұрын
Somebody give that man a medal!!
@zbigniewbrzezinski8869
@zbigniewbrzezinski8869 4 жыл бұрын
I will !
@smile-tk7yt
@smile-tk7yt 3 жыл бұрын
@@zbigniewbrzezinski8869 😅😂😅😂
@allanmachado2011
@allanmachado2011 3 жыл бұрын
big agree
@zes3813
@zes3813 3 жыл бұрын
wrr
@ouichoulhicham5726
@ouichoulhicham5726 3 жыл бұрын
i only have a cookie
@calvinbarajas5144
@calvinbarajas5144 3 жыл бұрын
This lecture is amazing because (a) Nelson knows the exact technical terminology, (b) he is very patient and methodical, (c) covers the basics very well, (d) gives professional insight into how to use PostgreSQL.
@elco7956
@elco7956 2 жыл бұрын
**proceeds to call an asterisk a star**
@user-xw4mu6nz4t
@user-xw4mu6nz4t Жыл бұрын
@@elco7956 I've been a web developer for 7 years and I still do that.
@IceEnglish-ii7jv
@IceEnglish-ii7jv Жыл бұрын
​@@elco7956 asterisk AS star 😮
@electrolyteorb
@electrolyteorb Жыл бұрын
​@@elco7956 @IceEN Holy mother of GOD!!!!
@DXYZTVGaming
@DXYZTVGaming 4 ай бұрын
@@elco7956 imagine being overly critical because someone didnt say asterisk XD
@mercantilism954
@mercantilism954 2 жыл бұрын
Note for beginners: 34:50 Here, he is using a command prompt, not postgres shell. If " psql - -help" does not work on your terminal, you need to add an environment variable. This video explains how to add one. kzbin.info/www/bejne/ZnalnImwfqehpcU 35:44 If your password does not work, use 'postgres' for the username. Your code should look like this " psql -h localhost -p 5432 -U postgres test" This is simply because you have not created a user account called 'user'
@omar-bb3dv
@omar-bb3dv 2 жыл бұрын
thank you so much
@chantelboiro3899
@chantelboiro3899 2 жыл бұрын
Thank you! I was wondering what I was missing
@JadeObidosXP
@JadeObidosXP Жыл бұрын
I was wondering why that part doesn't work on my end. Thank you so much for this!
@leishmaniaful
@leishmaniaful Жыл бұрын
Thanks, man. How can they miss this from the video? freecodecamp tutorials used to be proficient...
@windows99
@windows99 Жыл бұрын
Oh my god. I was so confused why it doesn't work on my part. Thank you so much.
@АйдарХабиров-т3к
@АйдарХабиров-т3к 4 жыл бұрын
Thank You for using easy English. I understand a lot of. Respect from Russia with 41 peoples.
@nyteskun
@nyteskun 4 жыл бұрын
41+1
@sergeyvechkitov221
@sergeyvechkitov221 4 жыл бұрын
+1
@WeirdAlSuperFan
@WeirdAlSuperFan 4 жыл бұрын
just fyi this guy's English is terrible, but hey at least it's simple
@АлексейДогачев
@АлексейДогачев 4 жыл бұрын
@nabil libre just racist up there
@diegodelsol1309
@diegodelsol1309 4 жыл бұрын
@@WeirdAlSuperFan How so? He is speaking slowly and clearly and obviously has a good grasp of the concepts.
@Terzaghi12
@Terzaghi12 4 жыл бұрын
For Windows users, the command 'psql' only will work if you edit the environment variables and add 'C:\Program Files\PostgreSQL\13\bin' to your path, the 13 it's the version of Postgres i've installed. After that, the command you have to enter on the cmd or powershell is: psql -U postgres then it will ask for the password you set on the installation
@karljasoncangas8525
@karljasoncangas8525 Жыл бұрын
thanks Capt.
@anwinkon242
@anwinkon242 Жыл бұрын
thanks this really worked for me
@manisha_nair
@manisha_nair Жыл бұрын
Thanks a lot man!
@nikethvelala5424
@nikethvelala5424 Жыл бұрын
Thank you 🫡
@sirhuman560
@sirhuman560 8 ай бұрын
Thank you brotherrr :))
@gunk4196
@gunk4196 Жыл бұрын
The fact that this is free is insane! A very good course on Postgres. I finished this in less than 24 hours and before starting I didn't even know what 'SQL' was but now I feel like I have a solid understanding of Postgres.
@richumathew7352
@richumathew7352 5 ай бұрын
Also train and make project before you forget
@khateebanwer7466
@khateebanwer7466 2 жыл бұрын
For someone who is following this tutorial currently : 1) at around 01:06:00 when you go through the SQL file in VSCode , do change the value of varchar of gender greater than 20 because Mockaroo includes more than 2 genders in randomly generated database which will throw an error during its execution through cli when not changed. 2)When using terminal (for windows users ) , you might get errors during execution of sql file through cli due to path format which can easily be dealt with --> before even opening your postgres ,navigate through the command line where the actual file is located and then open postgres and use \i filename.extension to execute your file. 3)When installing postgres , always provide passwords without any alphanumeric characters like "$" otherwise it will throw an error during the installation phase ( I don't know what is that error as it was really vague but this worked for me).
@LooseFlannel
@LooseFlannel 2 жыл бұрын
just so you know you can also change the data Mockaroo gives, you can set it to only be male and female
@khateebanwer7466
@khateebanwer7466 2 жыл бұрын
@@LooseFlannel Thanks for the information , brother.
@MrMadmaggot
@MrMadmaggot 2 жыл бұрын
In ubuntu when I try to import the person.sql it denies me the permission.
@Technomic-o
@Technomic-o Жыл бұрын
Thanks man , can you please elaborate more on pointe 2 ? following the way mention on the video Im getting missing requirement error . i even went through the command line where the actual file is located and used \i filename.extension but still not able to execute it
@facundoarrascaeta3143
@facundoarrascaeta3143 Жыл бұрын
@@Technomic-o I used i\ 'C:/Users/:myuser/Downloads/person.sql' on windows and it worked, you have to put the path in quotes
@your_unniya
@your_unniya 10 сағат бұрын
Your are an excellent teacher, I understand everything fully and I've actually sat through this 4 hour lecture for 9 hours. 9 hours included breaks and lunch/dinner.
@madhanmurali4877
@madhanmurali4877 4 жыл бұрын
Completed till WHERE Clause and you're getting straight to the point without wasting time. It is really helpful for a complete newbie like me. Thank you!
@kieranbarker1902
@kieranbarker1902 3 жыл бұрын
This video is excellent. I'm only as far as creating tables (around the 41-minute mark) but it's already better than the courses I could find on Udemy! Thank you! 🙏
@fahansheikh
@fahansheikh Жыл бұрын
for user using ubuntu/linux(check if postgres is preinstalled in your system) following the installation steps may cause installation of two versions of postgres simultaneously which can cause unnecessary trouble for beginners.
@richard1991ish
@richard1991ish 3 ай бұрын
also just going to take a moment to appreciate how excellent this tutorial is. Clear, concise, straight to the point with real-world examples. Worked through the whole thing, and learned a TON. TYSM! ⭐⭐⭐⭐⭐
@alexnavarro2628
@alexnavarro2628 2 жыл бұрын
Seriously a 10/10 course! I sat down and watched this whole thing in a single session. I seriously appreciate your teaching style, and how well you explained everything. Thank you!
@gwagner3446
@gwagner3446 5 жыл бұрын
Dude, this course was VERY GOOD! Basically binged through the whole 4 hours and felt like no time! Very didactic and well explained. THANK YOU SO MUCH FOR THIS AMAZING CONTENT!!
@ugljesavojvodic3384
@ugljesavojvodic3384 4 жыл бұрын
For Windows users it's even easier, even though it seems to be confusing, just enter database name when it ask for it. This how it looks in the shell: - Server [localhost]: Database [postgres]: test Port [5433]: Username [postgres]: Password for user postgres:your_pw - Please note when you connect for the first time you are actually connect to default one and that's why you don't enter any name, it will have name"postgres", and the owner is also default one, guess the name - "postgres". - When you login with all empty parameters you noted line in terminal like "postgres=#", well the part before "=#" is actually name of database, so in this default case "postgres". - You noted he has owner "amigoscode" (when he list all databases) , it's actually added role, check postgres documentation how to add role and change owner of table. - Also, when you are in "postgres=#" database you can easily switch to another (that is already created, it won't create it by itself) database using command: \c another_database_name (example: "postgres=# \c test" result: "test=#")
@pranayreddy7303
@pranayreddy7303 4 жыл бұрын
thank u its really helpful could u please tell me how to clear the terminal
@ugljesavojvodic3384
@ugljesavojvodic3384 4 жыл бұрын
​@@pranayreddy7303 Actually I never clear terminal, no matter of what I am working on :) Try with \! clear Usually I just hit enter few times... :D Be aware of using ; at the end of sequence... It's mentioned in this tutorial. But during login to database, I'm not sure how can it be cleared...
@yatskovych
@yatskovych 2 жыл бұрын
thanks so much! I was confused about switching to another DB, so I went to the comments. You rock
@ugljesavojvodic3384
@ugljesavojvodic3384 2 жыл бұрын
@@yatskovych I'm glad to se it is helpful 👍 Thank for feedback.
@O_o___o_0
@O_o___o_0 2 жыл бұрын
@@ugljesavojvodic3384 Man, thank you soooooo much! I ended up stuck with that yesterday and you made my day this morning 🤘🙏
@franciscojavierramirezhern8588
@franciscojavierramirezhern8588 5 жыл бұрын
I had a lot of extra work trying to follow some parts of this awesome course, the difference between MacOS and Windows are tinny, but important, when you try to import file using \i you must have to use '/' not '\' and other differences that I had to search on google and stack, but finally.... Thanks for sharing this course, I appreciate this. I heard something that bad MySql settings are so dangerous and complicate to fix and protect from SQL injection, so, he said PostgreSQL is more secure and flexible, but I just looking for answers. Anyway, nice work! greetings!
@yepyepyep3
@yepyepyep3 4 жыл бұрын
thanks! needed help with that exact part
@Nephros
@Nephros 2 жыл бұрын
Thanks a lot
@tunmbi_okediran
@tunmbi_okediran 9 ай бұрын
Yeah, thanks a bunch
@gourishaverma8740
@gourishaverma8740 11 күн бұрын
it did not work for me
@niyazi95
@niyazi95 3 жыл бұрын
33:39 guys if you cant run "psql" command in the command line, you must add it to system environments, find the postgresql folder in C:\ and add its "bin" folder to "Path" variable in the env.
@divakarsiva623
@divakarsiva623 3 жыл бұрын
@Niyazi Yildirim can u explain in detail....since many of us have the same problem
@mergenberdiyev8438
@mergenberdiyev8438 3 жыл бұрын
@@divakarsiva623 Maybe it's already late, but here is a video how to do that kzbin.info/www/bejne/ZnalnImwfqehpcU&ab_channel=jinujawadm
@arpansingh4284
@arpansingh4284 3 жыл бұрын
@@mergenberdiyev8438 Nope , its never late . Thanks !
@billyssk666
@billyssk666 3 жыл бұрын
@@mergenberdiyev8438 This tutorial doesn't work with version 14. There is no "bin" folder with the psql.exe file. Anyone have another fix?
@yatskovych
@yatskovych 2 жыл бұрын
@@billyssk666 worked just fine for me (version 14.1). Maybe you didn't see bin folder of psql.exe file
@gideonrichards1862
@gideonrichards1862 3 жыл бұрын
Thanks you this was a really helpful course, even as we are now on 13.2. A couple of comments to aid the user of the tutorial, if I may: 1) Please can you explain at the beginning how to get back to the =# prompt - I struggled on the Mac because the ctrl is ctrl button and not cmd button; 2) Please can you explain how you clear the screen at the beginning of the tutorial; 3) Please can yous tree at the beginning how important accurate typing is for the student; 4) Please can you ensure when you are using a comma and not a dot (e.g. NUMERIC(19, 2)) that that is clear. I did miss that. Apart from that this has really helped me and I would recommend it to anyone doing PostgreSQL as a beginner. I will look up the longer more advance course! Kind Regards Gideon
@TheAremoh
@TheAremoh 5 жыл бұрын
From being scared to run sql command from command line to liking it. Thanks for this awesome video
@O_o___o_0
@O_o___o_0 2 жыл бұрын
First thank you so much for this amazing course, easy to follow and straight to the point For those like me that will be learning on PostgreSQL 14, at 33:50 he uses the command psql --help for the option help and on Windows and PSQL 14 it's actually the \? options command that will give you the same result.
@SamareshMaity231
@SamareshMaity231 2 жыл бұрын
thanks Johan
@olamideadigun9206
@olamideadigun9206 2 жыл бұрын
So many things have changed with mockaroo too. My Gender column has 8 inputs so you don't have to add Hello to practice CHECK CONSTRAINT.
@SHrehman12
@SHrehman12 2 жыл бұрын
OMG, Thank you
@kalamansihans
@kalamansihans 2 жыл бұрын
thanks! I didn't notice this helpful comment. Anyway another work around I found for this is to go to the directory of the bin folder and enter psql --help. It works the same.
@ady4230
@ady4230 2 жыл бұрын
Thanks man
@LordBenjamin1998
@LordBenjamin1998 5 жыл бұрын
One of the best tutorials out here for PostgreSQL, the explanation is clear and the pace of it is great for beginners. Props to you.
@shashanksingh4968
@shashanksingh4968 Жыл бұрын
This is an awesome go to guide for learning Postgres SQL DB for an absolute beginner, you can get your SQL refreshed also along the way. I learnt a lot along the way, though the course is bit outdated for November 2022, have some execution errors for the queries shown in videos, but thanks to people in comment section who become savior and help the fellows out along the way. Happy Learning team. Let's code something! ❤❤
@adamrolczyk7217
@adamrolczyk7217 2 жыл бұрын
It was my long long dream to learn Postgres. I watched the entire video almost in one sitting, making notes in vscode and using commands in terminal. Thank you so much for sharing this knowledge. Can't wait to use it to build something cool.
@sadramohh
@sadramohh 2 жыл бұрын
Can we maybe have the notes? pretty please?
@maaxmith
@maaxmith 4 жыл бұрын
To anyone getting an error when using the psql command in Windows Terminal: You need to add "psql" to your system path variables: - In the search bar, type "env" and click on "Edit the system environment variables" - Click on "Environment Variables" - Then, in the "System Variables" table, click on the column with the Variable name "Path" and then click on "Edit" - Click on "New" and paste the path to the "bin" folder of your psql installation. E.g. in my case, its "C:\Program Files\PostgreSQL\13\bin", but it could be different based on where you installed PostgreSQL or what version you have. Now restart the Console, and the command should work.
@BexruzXolmuminov
@BexruzXolmuminov 3 жыл бұрын
thank you man.
@afunnykorean
@afunnykorean 3 жыл бұрын
Im getting this prompt after I have typed "psql" Password for user "****": (Note "****" is my folder path, that looks like this when i open command prompt-> C:\Users\"****">) When i enter my postgressql database password, it says psql: error: FATAL: password authentication failed for user "****" My postgressql username is set to default, and not "****". Any idea what is causing this?
@afunnykorean
@afunnykorean 3 жыл бұрын
I figured it out, you have to type: psql -U 'userName'
@maaxmith
@maaxmith 3 жыл бұрын
@@afunnykorean or "psql -U postgres". I actually don't know the cause of that bug, but its at least easy to fix :)
@elBanananas
@elBanananas Жыл бұрын
this should be top comment.
@chriswilson8584
@chriswilson8584 5 жыл бұрын
The best PostgresQL tutorial I've seen so far.
@leondaz
@leondaz 4 жыл бұрын
If you're having trouble in AVG, use this "SELECT AVG(price::money::numeric) from car;" and this basically casts the VARCHAR money to Money (adds commas every 3 numbers) and casts the result to a number (decimal) as numeric is an alias for decimal in postgreSQL.
@HologramJay
@HologramJay 2 жыл бұрын
Nice. Thank you!
@stalinengoma7680
@stalinengoma7680 3 жыл бұрын
Very comprehensive video. I didn’t know about any database before and this man just plugged everything I needed to know how databases work. Thank you man
@ianawilsonn
@ianawilsonn Жыл бұрын
Halfway through, and it's a great course so far. Some of the material is a little dated, as Postgresql has made some changes as they are at version 15+. For example: Postgresql uses "SELECT factorial(5);" now instead of "SELECT 5!;" to get the factorial of 5. Might be time for an updated course.
@Ou8y2k2
@Ou8y2k2 5 жыл бұрын
1:21:60 should be 1:21:59 in the description. Thanks for the course.
@vandergaming8952
@vandergaming8952 2 жыл бұрын
There is a problem with the new Mockaroo options. You have to have a currency infront of the NUMERIC value, which creates a problem when importing the file into a terminal (at least in windows). you'd have to use Studio Code, Edit > Repalce > Find $ (whatever currency) and leave the replace with what as blank. Hold down enter until it replaced every line. Save and import.
@wOhtest
@wOhtest 2 жыл бұрын
Thanks. Same thing on MAC. You literally save my dawn studying. Lol
@mitchelldirt
@mitchelldirt Жыл бұрын
Alternatively you can change the data type to MONEY :) EDIT: You'll need to specify how you want to average your money type by doing AVG(price::numeric) NOTE: To output a factorial you'll need to use factorial(number) if using postgres >= 14
@samuelsunday9965
@samuelsunday9965 Жыл бұрын
thank so much. I was stuck here before i saw your comment.
@prometheus8457
@prometheus8457 2 жыл бұрын
To those on Windows, to clear the screen, run "\! clear" or "\! cls". Hope this helps.
@az-ni7hc
@az-ni7hc 2 жыл бұрын
Awesome. Thanks a lot
@kasperkat2004
@kasperkat2004 3 жыл бұрын
Nelson, you outdid yourself with this! I am using Windows and psql and it works. There are no problems with it. But I have been using command lines/terminals for years. Thanks again Lad.
@banisan2035
@banisan2035 3 жыл бұрын
Hey everyone. For windows users on the mockaroo section: I encountered some problems importing the .sql file. Apparently psql doesn't accept the common backslashes \ that are used for paths on windows. So you need to use forward slashes / like on linux or mac. So for example, here's what I typed in psql: \i C:/Users/MyName/Desktop/person.sql
@olamideadigun9206
@olamideadigun9206 2 жыл бұрын
I am stuck with "No such file or directory".
@Adivasi7777
@Adivasi7777 2 жыл бұрын
@@olamideadigun9206 \i 'C:/wherever_you_downloaded_it/person.sql' ......Don't forget the single apostrophe...
@rezafadillah5129
@rezafadillah5129 2 жыл бұрын
@@Adivasi7777 thank you bro
@rezafadillah5129
@rezafadillah5129 2 жыл бұрын
thank you for the information
@hrishavdeka4187
@hrishavdeka4187 2 жыл бұрын
thanks a lot I was stuck here for so long
@OladipupoPopoola
@OladipupoPopoola 5 жыл бұрын
Wow! I just finished this course and I must confess you took me from a noob to an intermediate pro. Thank you so much. but I can't fid your other courses.....please share link in reply. I really appreciate. God bless you bro.
@arvi8843
@arvi8843 4 жыл бұрын
Thank you so much for congratulating me by the end of this video for finishing this course. I learned a lot! 💯 💯 💯
@TonnySanjiao
@TonnySanjiao 5 жыл бұрын
Great work man. Thank you from Barcelona. I like your voice, it's very clear to understand to non English-speaking like me.
@yunjiehong4649
@yunjiehong4649 4 жыл бұрын
Really clear accent! Easy to understand. Thank u, bro.
@uddayagupta911
@uddayagupta911 10 ай бұрын
It's 2023 the course still holds strong, one thing that I would like to mention is to also refer to the official postgres documentation side by side. Most of the things that you would need to run query on a database are listed in the video, but variety of some things is not covered, which you can learn on your own (read documentation). I would highly recommend watching this as your first beginner video as the explanation is really good. Some things you can only learn after working on projects, so don't worry about them.
@ciscogopro8481
@ciscogopro8481 Жыл бұрын
Thank you Nelson, I went through the whole video and for the first time after so many tutorial finally I understood and learn about database and Postgres. Thank you do much for make easy for newbies.
@krzysztoflechowski81
@krzysztoflechowski81 5 жыл бұрын
you are great, I wish your tutorial was there when I started my SQL journey 15 years ago.
@kirollosmagdy275
@kirollosmagdy275 5 жыл бұрын
does it mean that after 15 years of experience , you're still looking for tutorials ? , omg what scary future do we juniors have 😅
@krzysztoflechowski81
@krzysztoflechowski81 5 жыл бұрын
@@kirollosmagdy275 you'll allways be learning as there's more to know, not that scary these days. I haven't worked on PG as much as on other databases. I knew it was great, but haven't had a chance in my projects. The more I appreciate how effective the author made it here.
@TubeSwarn
@TubeSwarn 4 жыл бұрын
The teacher's pace is just awesome!! He is the best teacher in the world.
@banisan2035
@banisan2035 3 жыл бұрын
Thank you so much for this tutorial! It always fills me with joy when so much effort is put into something that simply benefits everyone without expecting anything in return. So much wholesome altruism in the IT community.
@John-fd9fe
@John-fd9fe 3 жыл бұрын
I love the fact that we have timestamps. I already knew a lot of SQL, I just needed to learn PostgreSQL and I could skip a lot of the lessons. Thank you very much.
@zulfiqaralikhan3227
@zulfiqaralikhan3227 3 жыл бұрын
I am from Pakistan yesterday I downloaded this video and watched it offline. After watching then I open youtube and search your video just for saying thank you for such a clear , simple and educated tutorial. Now I subscribed to your channel and will explore this channel. Keep it up sir
@mauroavellaneda9019
@mauroavellaneda9019 3 жыл бұрын
Minute 24:57: To be able to write in bash profile or like in this case, zshrc, after you open the text editor, you need to type "i" to start typing. Another way of saving it is, when you finish what you need to type, press scape and then Shift + z + z. (two times "z")
@rohitdalal954
@rohitdalal954 4 жыл бұрын
If you are on Windows, to insert the data using Mockaroo: \i 'C:\\INSERT\\YOUR\\PATH\\HERE'; What a great tutorial this is. A simple and clear explanation. Thank you so much ;)
@TechZuppo
@TechZuppo 4 жыл бұрын
G.O.A.T.
@pranayreddy7303
@pranayreddy7303 4 жыл бұрын
atill i cant open the .sql file in terminal
@Dineshsharma-ec6ys
@Dineshsharma-ec6ys 4 жыл бұрын
I got permission denied error help me out
@rohitdalal954
@rohitdalal954 4 жыл бұрын
@@Dineshsharma-ec6ys Try to use single quote 'path' for the file path.
@adeyemiblessing
@adeyemiblessing 2 жыл бұрын
Thanks a lot for this. Just saved me from fraustration
@mythic414
@mythic414 3 жыл бұрын
Thank you for this video! You're a great teacher and the material was clear and straight to the point. Definitely one of the best online courses i've come across
@harlanreece2348
@harlanreece2348 2 жыл бұрын
I am reaching out to you because your post appears to be the most recent. I have a basic question that you may be able to answer. No luck reaching Nelson.
@random-0
@random-0 Жыл бұрын
@@harlanreece2348 you should have asked the doubt directly in the comment
@vladimiraleksic4066
@vladimiraleksic4066 8 ай бұрын
Great job. I am enrolled in the Code Institute online boot camp and the tutorials there cannot be compared with this material in terms of quality. Thank you a lot.
@abdikhaliqmohamoud3373
@abdikhaliqmohamoud3373 2 жыл бұрын
The best and complete PostgreSQL Course out there.
@EuanFR
@EuanFR 2 жыл бұрын
Really good, for beginners or as a refresher to prepare interviews. Just a small improvement that could be made: I was especting a chapter to explain (summarize) the differents types of alter table queries (ie ADD, DROP, MODIFY, CHANGE). It would be an honor to help you providing a french version of these courses.
@BigSmoke-r9w
@BigSmoke-r9w 3 ай бұрын
Finished this in 3 days! Thank you good sir
@BigSmoke-r9w
@BigSmoke-r9w 2 ай бұрын
Came back in this video to practice, thanks again!
@elijahdare9826
@elijahdare9826 2 ай бұрын
@@BigSmoke-r9wNice one
@dalvandi
@dalvandi 2 жыл бұрын
Tutorial really gets down to the basics and is a really good starting point for beginners like myself with no previous experience with databases! Especially cool that you covered the installation for both MacOS and Windows!
@xilllllix
@xilllllix 2 жыл бұрын
indeed! what a great teacher and lecture! i feel like i can do whatever i want now with Postgres...
@SharinganCrypto
@SharinganCrypto 2 жыл бұрын
reference: 21:50 connect to postgres 50:35 create table 1:05:28 creating 1000 rows (import) 1:06:44 loading sql file in editor 1:07:50 \i file 1:15:23 order by 1:55:49 min, max, avg 2:27:33 age function
@Lampalot
@Lampalot 2 жыл бұрын
MashAllah brother such an amazing course, May Allah give you jannah !
@vs4vijay
@vs4vijay 5 жыл бұрын
Very Informative!!! Watched the whole video in 1.25x speed. I would suggest to walk us through on TRIGGERS, VIEWS, INDEXING, TRANSACTIONS and JSON data handling.
@smyasir0
@smyasir0 5 жыл бұрын
good suggestion Soni ! you know any tutorials regarding these ?
@anandkulkarni6992
@anandkulkarni6992 3 жыл бұрын
For those who are wondering where to run "psql" --> Run it in command prompt If it says 'psql' is not recognized as an internal or external command, operable program, or batch file. Set the path in an environment variable (kzbin.info/www/bejne/ZnalnImwfqehpcU) and run the command "psql -U postgres" in command prompt and enter your password
@yatskovych
@yatskovych 2 жыл бұрын
Thank you! I tried simply running the command "psql", without "-U postgres", but it didn't accept my password. Thanks to you, I now realize that one needs to state the user by using -U
@tejaltelang3558
@tejaltelang3558 2 жыл бұрын
Thank you very much!! I ran into the same problem and was looking for solution!
@venusbahrami2875
@venusbahrami2875 2 жыл бұрын
I am trying to get the data that Nelson is referring to in the "Adding Relationship Between Tables" chapter. Can anyone help me find it?
@windows99
@windows99 Жыл бұрын
What exactly is environment variable? Description to me looks like a background app, not a variable.
@varshamane2374
@varshamane2374 Жыл бұрын
Thanks for your help .😊
@m.alisetiapratama6932
@m.alisetiapratama6932 5 жыл бұрын
What a timing! Just in time when I want to learn it. Appreciate it a lot guys!
@rohankapur5776
@rohankapur5776 2 жыл бұрын
wonderful course. I'm ditching nosql dbs for postgres permanently after this. thank you
@vedeshp3274
@vedeshp3274 4 ай бұрын
I really appreciate everything in this course It was perfect course for me very nicely explained Thank You ! If you can provide the link for the advanced postgresql course , that would be great!
@michaelvigato3228
@michaelvigato3228 5 жыл бұрын
Boi this is excellent, it's really hard to believe this is free
@brian1801
@brian1801 3 жыл бұрын
Nelson -- quite simply -- YOU ROCK!!! Seriously outstanding content, videos and presentation skills. Thank you for taking the time to create this awesome course. Wishing you nothing but the greatest success!
@sarathradhakrishnan2135
@sarathradhakrishnan2135 3 жыл бұрын
I must admit, this is way more better than some Udemy courses.
@reynaldlamury4772
@reynaldlamury4772 3 жыл бұрын
there is also good course about postgreSQL there in udemy from Jose Portilla if iam not mistaken
@osjerick
@osjerick 2 ай бұрын
8:41 A relational database doesn't necessarily require relationships between tables to be considered relational. A 'relation' in this context is simply a table, which is a set of tuples (rows) with attributes (columns) drawn from different domains. This concept is fundamental to relational algebra.
@itsReshad
@itsReshad 2 жыл бұрын
I cant believe the quality of content and explanation in this video. Brilliant course explaining PostgreSQL. Very easy to follow - Highly recommend it!
@notsoaverageraj7917
@notsoaverageraj7917 3 жыл бұрын
2:16:57 : "I have 10 apples and I want to divide it with 0 people" That totally makes sense as it sounds like my sibling.
@johnwick-m4m
@johnwick-m4m 3 жыл бұрын
LOL
@gustavoadolfogrisalesmonto1910
@gustavoadolfogrisalesmonto1910 2 жыл бұрын
@@johnwick-m4m at least you (one person)
@inventaunmanana4860
@inventaunmanana4860 2 жыл бұрын
In 1:57:00 you might not be able to calculate the average of the price column. This happens if you generated the table using the dollar sign on the price. The solution I found is: cast price to a text, replace the '$' by nothing (' '), and cast back to numeric: SELECT AVG(REGEXP_REPLACE(price::text, '[$,]', '', 'g')::numeric) from car;
@venusbahrami2875
@venusbahrami2875 2 жыл бұрын
can you say where we should use it?
@olakunleoluwatobi3054
@olakunleoluwatobi3054 Жыл бұрын
Thanks, it worked.
@rgraptor2542
@rgraptor2542 6 ай бұрын
This dollar sign also can cause an error, "invalid input syntax for type numeric", another way to fix if you don't want to regenerate the data is to go into the vscode file and highlight one of the dollar signs and ctrl+shift+L which should select every dollar sign then delete them and save it. edit: or someone else says you can switch the data type in the file from NUMERIC to MONEY
@ladibakare7794
@ladibakare7794 7 күн бұрын
@@rgraptor2542 Many thanks for your comment. Deleting the dollar sign worked for me.
@ВладимирАдамчук-в6ы
@ВладимирАдамчук-в6ы 5 жыл бұрын
Thanks from Russia. Great tutorial!
@timothyajani7100
@timothyajani7100 2 ай бұрын
Finally I've faced my Fears. This is the best database course ever. I'll be done with the course today. I never knew database could be this easy. I'm so happy
@deasto1850
@deasto1850 3 жыл бұрын
If you are using windows at 34:00 try '\! psql --help'. Though I still can't connect using '\! psql -h localhost -U test' because it kept prompt me password and any password I enter is not the right one.
@michabartoszek5749
@michabartoszek5749 5 жыл бұрын
Idk why, but commands: "psql --help" doesn't work on windows 10 in SQL Shell (psql), it only works in CMD. So it's not exact the same on windows as on mac.
@mconn86
@mconn86 5 жыл бұрын
That is the way it is supposed to be. It's not clear in the video but he is running everything from the mac terminal (CMD shell is the equivalent in windows). He is calling psql from the terminal so if you were to type psql --help into the SQL Shell (psql) it won't work because you are already in psql
@thuyvuong9874
@thuyvuong9874 5 жыл бұрын
@@mconn86 I tried running psql - - help in the cmd but I get an error, " is not recognized as an internal or external command operable program or batch file" . What am I doing wrong? The tutorial is so confusing because the commands don't work the same in windows.
@abdullaashraf1998
@abdullaashraf1998 5 жыл бұрын
@@thuyvuong9874 you only need to add the directory of psql to the path variable
@nureyna629
@nureyna629 4 жыл бұрын
@@thuyvuong9874 You are not alone!! I found myself difficult to follow this command on windows.
@sidm2290
@sidm2290 4 жыл бұрын
@@thuyvuong9874 Even i tried to do same failed miserably even i added the environment to path. Did everything that can be possible but nothing worked out. So just stick to the pysql shell.
@manishseal8990
@manishseal8990 2 жыл бұрын
For 1:09:04, for windows user, type in the following command \i 'C:\\Users\\your_name\\Downloads\\person.sql'. (Take note of the double slashes and apostrophes)
@gauravupadhyay6602
@gauravupadhyay6602 2 жыл бұрын
I was stuck here, thanks a lot :)
@vedanttiwari2961
@vedanttiwari2961 10 ай бұрын
Thanks a lot, i was this close to give up but you saved me.
@roardinoson7
@roardinoson7 Ай бұрын
or invert the slashes
@kjane3390
@kjane3390 4 жыл бұрын
I am only 8.42 minutes through and I already felt the urge to thank you for such an incredible video. I have a terrible attention span and I am genuinely excited for what the next 4 hours will bring. Thank you thank you thank you!!!!!
@user-xw4mu6nz4t
@user-xw4mu6nz4t Жыл бұрын
Legend has it Mr. Terrible-Attention-Span still hasn't finished the video,
@mmkamalraj8931
@mmkamalraj8931 2 жыл бұрын
End to End Postgres. Starting with SELECT * to JOINS in the same methodical explanation. Best vid to learn and practice postgres.
@homemadebymiko
@homemadebymiko Ай бұрын
Absolute Gold! Thank you so much - Great content to follow from absolute beginner to being comfortable. This definitely gave me the foundation I need to explore PostgreSQL documentation & terminal on my own.
@StarBattle08
@StarBattle08 4 жыл бұрын
1:53:33 Make sure the currency is set to none, otherwise it won't work if you use numeric for the type for the price
@babichilakalapudi9759
@babichilakalapudi9759 4 жыл бұрын
Literally beating my head for 1hr. Bro .. you saved me ! Tq
@rgraptor2542
@rgraptor2542 6 ай бұрын
thank you tons friend.
@JazminMortimer
@JazminMortimer 3 жыл бұрын
I think the description would benefit from including whether or not the course teaches actual SQL or just how to use postGres. People like me who don't know anything and is looking to learn SQL don't know if it is the same thing or not :( I figured it out now but it took me a while to be sure.
@lemirabolantiavventuredell1622
@lemirabolantiavventuredell1622 2 жыл бұрын
I've the same question :(. So, i hope that you can help me: this course teache SQL AND how use PostgreSQL, or only the last one? Thanks!
@seannagle1714
@seannagle1714 2 жыл бұрын
This is fantastic, and I am learning a lot. It is nice to have someone who takes it slow and allows you to follow through the command line perspective. Very helpful. One thing I think might be a mistake, or correct me if I am confused, but around 1:19:00 you give an example of "SELECT * FROM person ORDER BY id, email". I am pretty sure that SQL never gets to sorting by email considering the first item it is sorting by is a primary key. Am I right there? You make reference to the emails all starting with a at the top, but that must just be coincidental, no? Thanks a million for this video, and I look forward to finishing it and recommending it to anyone who wants to learn SQL!
@kokoyoke2775
@kokoyoke2775 3 жыл бұрын
Working as an oracle dba, even non IT employees could use this db. This is really help me to learn postgres, respect sir!!!
@anandakumarsanthinathan4740
@anandakumarsanthinathan4740 3 жыл бұрын
AT 2:03:39, SELECT 10 / 2 gives a result of 5. If we are to try SELECT 10 / 4, it would give the answer as 2, and not 2.5. This is because of the way computers work. An integer divided by an integer will always yield an integer. On the other hand, if you are to type-in SELECT 10.0 / 4, then you would get the right answer 2.5, because in this case the numerator is not an integer any more and is a fractional decimal number. And so the answer given out is also a fractional decimal number.
@tejasparekh6808
@tejasparekh6808 4 жыл бұрын
Amazing explanation man!!! you just made my lockdown fruitful....thanks a lot.
@gouravgoel2974
@gouravgoel2974 4 жыл бұрын
great
@michaelvigato3228
@michaelvigato3228 5 жыл бұрын
50:35 Isn't a PRIMARY KEY attribute automatically also NOT NULL?
@panther-xc8929
@panther-xc8929 4 жыл бұрын
Correct! Primary key columns cannot have NULL values, so it's pointless to define it there
@mahdipakravan676
@mahdipakravan676 4 жыл бұрын
Actually , Not Null is unuseful command for primary
@Getaneh188
@Getaneh188 3 жыл бұрын
Yes, primary key is not null and unique
@shimanshuyadav5654
@shimanshuyadav5654 2 жыл бұрын
thanks bro even I had this doubt
@Ian69885
@Ian69885 5 жыл бұрын
I can not thank you enough. you explain the subject way better than my lecturer
@diegopiscoya4318
@diegopiscoya4318 5 жыл бұрын
Lmao that seems to be a really recurrent event in cs matters
@shahman1
@shahman1 5 жыл бұрын
@@diegopiscoya4318 its true, surprisingly or unsurprisingly
@mgultas
@mgultas 3 жыл бұрын
This video is one of the best SQL and PostgreSQL intro videos that I have come across. Thanks.
@sportymcballin2762
@sportymcballin2762 2 жыл бұрын
"Entuh!" Thank you for this outstanding resource! I got a little bit confused around the iterm2 part since I'm on Windows, but I installed cmder and it seems to do the same job. I'm not sure if I skipped over a crucial part or what, but that was the only portion of the video so far that was confusing for me almost 90 minutes in.
@christianhorauf9958
@christianhorauf9958 3 жыл бұрын
Hint about loading data from an SQL-file (1h 2m-1h-12m): Since the Video has been shot, Mockaroo seems to have changed their policy for representing gender. When I tried to import the sql file I ran into the error ERROR: value too long for type character varying(7). This happens, because Mockaroo not only outputs Male and Female but also several other genders like 'Genderfluid', 'Non-binary', etc. To fix this change the size of the gender-colum to 25 in the CREATE TABLE command: create table person ( id BIGSERIAL NOT NULL PRIMARY KEY, first_name VARCHAR(50) NOT NULL, last_name VARCHAR(50) NOT NULL, email VARCHAR(150), gender VARCHAR(25) NOT NULL, date_of_birth DATE NOT NULL, country_of_birth VARCHAR(50) NOT NULL );
@omoyenijoshua2093
@omoyenijoshua2093 3 жыл бұрын
Thank you.
@hokage97531
@hokage97531 4 жыл бұрын
I'm at 35:00, using windows and bversion 12 of PostgresQL, and the commands seem completely different. first off I get a prompt that says "(database name)=#", rather than the ~ he gets, second, the --h commans isnt working. I'm typing in "help" to get commands, and it says \h for sql help, and \? for psql help. I typed in \? assuming it would show me the same PSQL help it shows on the video, but it shows a completely different set of commands, al starting with \ instead of with --. I haven't watched the rest of the video, but so far it seems like it's different for windows. I hope not. EDIT: I did manage to do the rest of the tutorial without problems, it works on windows aswell, I just skipped this step in particular. Wonderful tutorial. However I'm having trouble trying to add a NOT NULL constraint to an already created row. Is this possible? I'm using " ALTER TABLE person MODIFY name VARCHAR(30) NOT NULL; " and it says there's a syntax error around modify. Any help?
@Naveenkashyap243
@Naveenkashyap243 4 жыл бұрын
do 'ALTER TABLE person ALTER COUMN name SET VARCHAR(30) NOT NULL;' this might help
@darkdraconium
@darkdraconium 4 жыл бұрын
Thank you for including this top bit, when it got to this point in the video I was dreading that this video might have already gotten out dated as I'm also working with 12 myself.
@123lex123
@123lex123 3 жыл бұрын
FYI: If you want to load the table that is created with Mockaroo, make sure to update VARCHAR to about (20). Mockaroo updated their Gender Data to larger variety than just MALE/FEMALE. With VARCHAR(7) you will run into errors.
@jingzhou5169
@jingzhou5169 3 жыл бұрын
Question: I saw 2 type for string, varchar and text, will it be OK always to use 'text'?
@olubayokayode101
@olubayokayode101 3 жыл бұрын
Thanks. your comment is so helpful. no errors again. Thanks once again
@CronusVelox
@CronusVelox Жыл бұрын
Mockaroo also has a data field called "Gender Binary" so you can use that instead to get a table more like the tutorial
@prisalvarado4056
@prisalvarado4056 Жыл бұрын
thanks a lot!! :)
@navblank6848
@navblank6848 5 ай бұрын
This tutorial was very helpful. I wanted a refresher from my university databases course and learned some new things along the way. I was confused when you mentioned resources being in the description though because they don't seem to be. But, a commenter dropped the Google Drive link.
@YuuffyLIVE
@YuuffyLIVE 11 ай бұрын
Is this postgres tutorial still up-to-date and worth starting with? Or has there been any noticable updates that make this obsolete?
@ruixue6955
@ruixue6955 2 жыл бұрын
19:59 client 20:53 Postico 22:24 client in terminal: psql 22:32 *-p* for the port 25:58 connect to db with psql
@HolgerJakobs
@HolgerJakobs 5 жыл бұрын
Since PostgreSQL is mostly used on Linux systems, they should be dominant and not missing in the installation part of this video.
@danibaba7058
@danibaba7058 4 жыл бұрын
linux omegalul
@HolgerJakobs
@HolgerJakobs 4 жыл бұрын
@@PatrickMcMunn The installation part is almost the same, whether you use Linux or a BSD system.
@pauloTx
@pauloTx 4 жыл бұрын
Linux users are supposed to know how to do it.
@HolgerJakobs
@HolgerJakobs 4 жыл бұрын
@@pauloTx Even among Linux users are some beginners. There are new Linux users every day.
@eduardoo31
@eduardoo31 3 жыл бұрын
@@HolgerJakobs this is why it's so hard to get into linux. if you ask a question on stack overflow or something everyone assumes you are an expert and know what every command means...
@КатяПетриковская
@КатяПетриковская Жыл бұрын
Thank you so much! Such a great job you've did. Wish you all the best and inspiration to learning people. Thank you again!
@renanfayad5237
@renanfayad5237 8 ай бұрын
Thank you very much! Excellent course, great didactics, easy-to-understand english and well-explained content!
@ihorrud5088
@ihorrud5088 Жыл бұрын
The best tutorial I've ever seen for PostgreSQL!
@henrikflindt3086
@henrikflindt3086 5 жыл бұрын
These 4 hours was better than 15 + lecturers
@JG-sg7yy
@JG-sg7yy 5 жыл бұрын
Thanks so much for this tutorial. I am trying to follow along and am having some trouble doing so in one specific area so far. I have Windows by the way. The area I am struggling with is on Connect to Database 33:40. Reason I am having trouble is because I open SQL Shell and it displays Server [localhost] and does not allow me to delete this so that I can write exactly what you wrote which is ~ psql --help. How do I go about doing this the right way? I have also tried entering ~ psql --help after login into the database and I am not able to do as you are showing on the tutorial.
@rolerasi1
@rolerasi1 5 жыл бұрын
same problem for me, can anyone please help?
@MordMaman
@MordMaman 5 жыл бұрын
@@rolerasi1 you need to add it to your path, but he offers a second option \c any luck i know this was 3 months ago!
@sleeksilk497
@sleeksilk497 4 жыл бұрын
Same problem. Someone should kindly come to our aid, please.
@scienceofart9121
@scienceofart9121 5 жыл бұрын
I'm only in the 20th minute but I liked this tutorial soo much, Thanks man !
@maandhisacademy6419
@maandhisacademy6419 10 ай бұрын
Thank Mr. Nelson may God bless you brother. I was struggling with this concept for days. Thanks alot.
@somnvm37
@somnvm37 2 жыл бұрын
a very good tutrial! btw, I use linux, and i can't just do what you do in normal terminal, I have to type 'sudo su postgres' and then I'll be logged in as a postgres user also, would be an improvement if you changed your console settings so that it shows your folder username and other status things. That way we won't confuse where you are besides this little thing - perfect.
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 1,2 МЛН
PostgreSQL CRASH COURSE - Learn PostgreSQL in 2024
50:26
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 8 МЛН
Não sabe esconder Comida
00:20
DUDU e CAROL
Рет қаралды 39 МЛН
Good teacher wows kids with practical examples #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 13 МЛН
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 12 МЛН
Learn Database Normalization - 1NF, 2NF, 3NF, 4NF, 5NF
28:34
Decomplexify
Рет қаралды 2 МЛН
PostgreSQL vs MySQL
6:33
IBM Technology
Рет қаралды 341 М.
APIs for Beginners - How to use an API (Full Course / Tutorial)
2:19:33
freeCodeCamp.org
Рет қаралды 4,4 МЛН
God-Tier Developer Roadmap
16:42
Fireship
Рет қаралды 7 МЛН
Вся база SQL для начинающих за 1 час
1:19:48
Vlad Mishustin
Рет қаралды 308 М.
you need to learn SQL RIGHT NOW!! (SQL Tutorial for Beginners)
24:25
NetworkChuck
Рет қаралды 1,6 МЛН
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 622 М.
6 SQL Joins you MUST know! (Animated + Practice)
9:47
Anton Putra
Рет қаралды 178 М.
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 8 МЛН