So some of you may be coming to Goaland from a language like PHP and a framework like Laravel or there
are other ones in other languages, but all of those frameworks tend to use object relational mappers.
And the one in Laravel, which is on the screen in front of you, is called eloquent.
And the intention of this particular package is to make interacting with the database much easier.
So, for example, if we come down here, you can define a model and give certain rules to that model
and to query the database.
For example, if we get down to database connections or a little bit further retrieving models.
So you have a model like this, you can say, go get flight, all go to the flight's table in the database
and get all the records and then loop through them.
And you will notice as I go through this course that I'm not using an object, relational mapper.
And most people that are experienced and go tend to avoid them.
They exist.
And I want to draw a couple to your attention.
They exist, but they're really not used that frequently by people that work in go on a daily basis.
For example, there's one called Gorm and it's at Gormogon IO and it does give you most of the same
functionality that you would get in something like Eloquent in Laravel.
The problem with these, from my perspective and from the perspective of lots of people, is that they
add a completely unnecessary layer of complexity to interacting with your database.
What most people that work in go on a regular basis tend to do is to write a sequel, to write a sequel
exactly as you would if you're interacting with the database from a command line.
And they do that because it removes a layer of complexity and it results in faster code.
Eloquent, for example, does make it easier for people that aren't that familiar with SQL to work with
the database, but it slows things down a great deal in some cases.
So I'm not going to be using Gorm and another one that I'll draw your attention.
And I actually like this one much more than I like.
Gorm and I have used this in the past, is called Upper DB and it works very well.
It is completely agnostic, it works with postgrads.
It works with pretty much any database you would probably be using and it is extremely easy to use.
So for example, they're on on the website up or up or Geographe for it gives you examples of how things
work and you can go through these at your leisure.
And if you find that this is a useful thing for you to incorporate into your code, don't feel guilty
for doing it.
Lots of people do it.
It's just that I tend not to.
And in this course, I want you to become familiar with working with sequel.
So we'll be doing it the old fashioned way, which is faster, easy to maintain and not that difficult.