PostgreSQL in 100 Seconds

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
postgresql the most trusted name in Open Source relational databases its development dates all the way back to 1986 at UC Berkeley under the direction of Michael Stonebreaker like other pure relational databases it stores data in tables columns and rows and uses structured query language to read and write data however postgres is technically an object relational database which means it can create its own custom data types to store objects with properties and support Advanced features like inheritance and polymorphism when writing data it runs fully acid compliant transactions but also adds its own special sauce called multiversion concurrency control which gives each transaction a snapshot of the database allowing multiple transactions to run at the same time without traffic jams or locks developers also love its extensibility queries can be reused by writing stored procedures and it even supports languages Beyond SQL like Python and c and it has a robust ecosystem of extensions like post GIS to provide geospatial data for apps like Uber or cytus who Shard and distribute the data base to any scale or PG embedding to give AI chatbots long-term memory and the list goes on to get started you can download and install it locally or better yet use a free Cloud database like neon which provides Auto scaling out of the box and a nice UI to manage your data in addition to a bunch of other Advanced features like branching create a new database then head over to the SQL Editor to run your first query or connect it to your IDE with an extension like SQL tools we could get started by creating a new table but because this is an object relational database let's begin by creating a custom data type which defines the structure of an object with corresponding properties and types what's awesome about postgres though is that we have more exotic data modeling options like arrays can be used by putting brackets in front of a type then make it a two-dimensional array by adding another set of brackets we also have Json data types to handle unstructured data and even key value pairs with extensions like h-store now that we have this custom type we can use it within one or more tables like one table for programmers and another for designers once the table is created we can then use an insert statement to add a row of data into it notice the use of a double colon to cast a string into Json or H store types and now finally we can read the data with a select statement that uses dot notation to access the properties on our custom object every table has a unique primary key and we can create Relationships by storing the primary key from one table as the foreign key on another like a programmer might own many Lambos we can then find those Lambos by doing a join query that compares the programmer's ID to the lambo's owner ID this has been postgresql in 100 seconds big shout out to Neon DB for sponsoring and making this awesome database free to use in the cloud thanks for watching and I will see you in the next one
Info
Channel: Fireship
Views: 619,128
Rating: undefined out of 5
Keywords: webdev, app development, lesson, tutorial
Id: n2Fluyr3lbc
Channel Id: undefined
Length: 2min 36sec (156 seconds)
Published: Thu Jul 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.