If you’re not familiar with ORMs and ActiveRecords here are the major php ones to check out.
Doctrine
Propel
Eloquent
My preference for ActiveRecord is Eloquent and Mapper Doctrine.
The wonderful thing about learning an ORM and/or ActiveRecord is all the terminology transitions nicely across languages.
Examples:
Sequalize – Node JS based ORM
Rails ActiveRecord RoR ActiveRecord
All of them pretty much follow the same patterns. So if you learn the patterns it should be easy enough to understand in any context and every application needs some type of persistence layer.
Using plain jane SQL has its place but it is so 1999 with all the wonderful ORM and ActiveRecord options available. I suggest you try one or a few you just might get hooked at the level of ease to persistent *most data structures.
many also have community extensions to support things like hierarchical structures using adjacency list, closures, nested sets, etc.