Learning PosgreSQL

avatar

Hi fellow Hiveians,

Today I'm here with some more learning!

image.png

Hive Divider Bar Text.png

Learning PosgreSQL

What I've tried to do in my professional life is follow a bit of an important mindset: factor in personal learning to my work days! It's one of those things that are critically important for us as workers and people overall to have skill growth. This leads to many things but one of the big ones is overall job satisfaction if you are able to keep the learning going.

One of the things that some that have read my posts for a while might say "weren't you learning Python??"

Well, yes! I was learning Python but I've put that on hold for a little bit once again. I am still going to be learning Python eventually but one of the things I no longer have access to is Microsoft SQL. I had been using MSQL at my last job and was having a lot of fun using it for my various data analytics tasks I needed. What I knew I needed to eventually do though was to learn the other major popular program PosgreSQL. This is a free and open sourced SQL software that I'm sure many people know of but if you don't, then that's what it is!

SQL is Structured Query Language and it's basically the underlying structure of databases. I can't confirm it officially but I think every single thing we do on the internet is connected to a database. Learning how to operate within software like this is important for those who are working in or interested in the technology side of things. Information from companies, healthcare and everything else is stored and somehow connected to a database. I have wanted to understand this stuff more since I jumped onto the IT side of my career and thankfully had a roundabout way into it.

One of the things I made it a point to do though since leaving my other job, is keeping up with my SQL skills. I have a fair bit of fun using SQL and I'm hoping to eventually connect my SQL software to the Hive database to do some queries! I know there are a lot of things involved with that but I think it would be fun to be able to query the chain and look for something I'm interested in such as my very first post or very first comment. I know that we have some pretty important SQL guys on here like Asher, Arcange and others but it's always fun to do things your own way!

So for my learning I am pretty much using this YouTube tutorial here

I've found it very helpful for a few reasons but mainly because he's methodical and takes his time explaining most things. Some things are skipped or not really applicable to me and what I'm doing but for the most part it's all working well.

Some of the first things I've been doing throughout the beginning is just getting the basics down. I've established the different servers that exist. I can connect to "postgres" as a server so that's what I'll be doing.

image.png

I then have created a database called Test and am adding a table to it, since this is all database stuff it depends on tables.

image.png

Being testing of course, it doesn't hurt anything if you need to delete the table using the DROP TABLE command. You would never want to do this in a production environment though! You will shit yourself and probably get fired hahaha.

We are creating the table here and adding in some mandatory fields like names, gender and date of birth. Without these it will throw an error at you.

image.png

One of the things I didn't realize was the difference between our versions of software. His is on a MAC and mine on Windows. I imported 1000 rows of random data and had to enter through it all lol it was annoying.

image.png

This one was important for me to figure out. I know how to do it in the GUI with Microsoft SQL by doing something SELECT TOP 1000 from TABLE or something but using the command line interface here I wasn't sure how to stop it. I have 1000 rows in my test data here lol so it was annoying following the tutorial and not limiting it, had to hold down the enter key for quite a while!

Once I figured out the LIMIT command, it was so much smoother!

image.png

I used the command

SELECT * FROM person LIMIT 10;

This helped me significantly! It also helps to not import 1000 rows of randomized data but it's important to have a decent sample to work with so that you can mess around with it

Software I used during all of this:
PosgreSQL
Visual Code Studio
pgAdmin 4

Hive Divider Bar Centered.png

Connect with me!

Do you want to get paid, in crypto, for searching the internet? Try using and signing up for Presearch to earn some great crypto! I've currently got 2,540 PRE tokens, with a market value of $613.28. It doesn't sound like a lot but when you search using sites like Google you get paid $0! Join Presearch to break Google's stranglehold on the internet searches. If you'd like to sign up, use my referral link!
https://www.presearch.org/signup?rid=513043


Image source



0
0
0.000
1 comments
avatar

Congratulations @cmplxty! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You have been a buzzy bee and published a post every day of the week.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

Christmas Challenge - 1000 Hive Power Delegation Winner
Merry Christmas - Challenge Feedback - Win a 1000 HP delegation
0
0
0.000