How to Structure Databases in Laravel
April 2021 / 2 h 07 min / Laravel 8
Notice: if you're interested in more courses than just this one, the best deal is to subscribe to the Yearly membership!
Structuring a Database is one of the biggest struggles I've seen when starting a new project.
There are questions like:
- Should it be a belongsTo or belongsToMany relationship?
- Maybe I use polymorphic relationships?
- Should I have one large table with 20 columns or divide that into multiple smaller ones?
- What would be the query performance for structure X?
So in this 2-hour course, over 20 videos, I will talk about those practical problems, with examples, based on Laravel, MySQL, and Eloquent / Query Builder.
Will you join me?
Some public testimonials from Twitter/Youtube:
PreviewUUID instead of ID: When/How? (5:05)
StartJSON DB Fields: Yay or Nay? (6:45)
StartENUMS, Foreign Keys, or Just String? (8:00)
PreviewCustom Fields. EAV: Entity-Attribute-Value Model (8:20)
StartRecursive Parent-Children - Part 1: Unlimited Subcategories (5:07)
StartRecursive Parent-Children - Part 2: Nested Set Model with Package (4:11)
StartInvoice Numbers with Prefixes: How to Structure DB? (9:25)
StartOrder Statuses: Relationship or Same Table? (4:11)
StartColumn Indexes: when/why/how to Apply Them (7:11)
StartHow to Safely Change DB Relations in Live Laravel Project? (11:21)