DEV Community

Discussion on: Explain ORM like I'm five

Collapse
 
dmerand profile image
Donald Merand

I love this building blocks analogy! I also agree that it seems like many of these folks haven't met a 5-year-old. Extending the blocks analogy...

Imagine that I ask you to make some sculptures of fishes for me. I don't really care what material you use to make the sculpture - you can use clay, or legos, or popsicle sticks. As long as it's a sculpture, and the things you give me look like fishes, I'm happy.

The fish is the object, the database is the material (clay/legos or maybe MySQL/PostgreSQL), and you, the sculptor, are the object-relational mapper. Maybe you started making fishes out of legos, but now you like making them out of clay, but I'm still happy because you keep giving me fishes.

Collapse
 
cutiko profile image
Erick Navarro • Edited

Your fishes are a great way metaphore for models!