[{"data":1,"prerenderedAt":228},["ShallowReactive",2],{"term-o\u002Form":3,"related-o\u002Form":209},{"id":4,"title":5,"acronym":6,"body":7,"category":189,"description":190,"difficulty":191,"extension":192,"letter":193,"meta":194,"navigation":101,"path":195,"related":196,"seo":202,"sitemap":203,"stem":206,"subcategory":207,"__hash__":208},"terms\u002Fterms\u002Fo\u002Form.md","ORM","Object-Relational Mapper",{"type":8,"value":9,"toc":183},"minimark",[10,15,24,28,31,35,172,176,179],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18,19,23],"p",{},"An ORM is like a translator between your code and your database. Instead of writing scary SQL, you just write normal code like ",[20,21,22],"code",{},"User.findAll()"," and the ORM quietly converts it into SQL behind the scenes. It's the universal adapter between code-world and database-world.",[11,25,27],{"id":26},"real-talk","Real Talk",[16,29,30],{},"An ORM is a library that maps database tables to programming language objects, allowing developers to interact with the database using their language's syntax instead of raw SQL. Popular ORMs include Prisma, Sequelize, TypeORM, SQLAlchemy, and ActiveRecord.",[11,32,34],{"id":33},"show-me-the-code","Show Me The Code",[36,37,42],"pre",{"className":38,"code":39,"language":40,"meta":41,"style":41},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Without ORM (raw SQL)\ndb.query('SELECT * FROM users WHERE id = ?', [1]);\n\n\u002F\u002F With ORM (Prisma)\nconst user = await prisma.user.findUnique({ where: { id: 1 } });\n","javascript","",[20,43,44,53,96,103,109],{"__ignoreMap":41},[45,46,49],"span",{"class":47,"line":48},"line",1,[45,50,52],{"class":51},"sHwdD","\u002F\u002F Without ORM (raw SQL)\n",[45,54,56,60,64,68,71,74,78,80,83,86,90,93],{"class":47,"line":55},2,[45,57,59],{"class":58},"sTEyZ","db",[45,61,63],{"class":62},"sMK4o",".",[45,65,67],{"class":66},"s2Zo4","query",[45,69,70],{"class":58},"(",[45,72,73],{"class":62},"'",[45,75,77],{"class":76},"sfazB","SELECT * FROM users WHERE id = ?",[45,79,73],{"class":62},[45,81,82],{"class":62},",",[45,84,85],{"class":58}," [",[45,87,89],{"class":88},"sbssI","1",[45,91,92],{"class":58},"])",[45,94,95],{"class":62},";\n",[45,97,99],{"class":47,"line":98},3,[45,100,102],{"emptyLinePlaceholder":101},true,"\n",[45,104,106],{"class":47,"line":105},4,[45,107,108],{"class":51},"\u002F\u002F With ORM (Prisma)\n",[45,110,112,116,119,122,126,129,131,134,136,139,141,144,148,151,154,157,159,162,165,167,170],{"class":47,"line":111},5,[45,113,115],{"class":114},"spNyl","const",[45,117,118],{"class":58}," user ",[45,120,121],{"class":62},"=",[45,123,125],{"class":124},"s7zQu"," await",[45,127,128],{"class":58}," prisma",[45,130,63],{"class":62},[45,132,133],{"class":58},"user",[45,135,63],{"class":62},[45,137,138],{"class":66},"findUnique",[45,140,70],{"class":58},[45,142,143],{"class":62},"{",[45,145,147],{"class":146},"swJcz"," where",[45,149,150],{"class":62},":",[45,152,153],{"class":62}," {",[45,155,156],{"class":146}," id",[45,158,150],{"class":62},[45,160,161],{"class":88}," 1",[45,163,164],{"class":62}," }",[45,166,164],{"class":62},[45,168,169],{"class":58},")",[45,171,95],{"class":62},[11,173,175],{"id":174},"when-youll-hear-this","When You'll Hear This",[16,177,178],{},"\"We're using Prisma as our ORM.\" \u002F \"The ORM handles all the SQL generation automatically.\"",[180,181,182],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":41,"searchDepth":55,"depth":55,"links":184},[185,186,187,188],{"id":13,"depth":55,"text":14},{"id":26,"depth":55,"text":27},{"id":33,"depth":55,"text":34},{"id":174,"depth":55,"text":175},"backend","An ORM is like a translator between your code and your database. Instead of writing scary SQL, you just write normal code like `User.","intermediate","md","o",{},"\u002Fterms\u002Fo\u002Form",[197,198,199,200,201],"Active Record","Query Builder","Migration","Schema","Model",{"title":5,"description":190},{"changefreq":204,"priority":205},"weekly",0.7,"terms\u002Fo\u002Form",null,"oxLbl5GbgRNl_m1oQ_gZ1RKAS1hjHkQJQtNeWQB4e2U",[210,213,218,222,225],{"title":197,"path":211,"acronym":207,"category":189,"difficulty":191,"description":212},"\u002Fterms\u002Fa\u002Factive-record","Active Record is an ORM pattern where each database row becomes an object that knows how to save itself.",{"title":199,"path":214,"acronym":207,"category":215,"difficulty":216,"description":217},"\u002Fterms\u002Fm\u002Fmigration","database","beginner","A migration is a versioned script that modifies your database schema — adding a column, creating a table, changing a type.",{"title":201,"path":219,"acronym":207,"category":220,"difficulty":216,"description":221},"\u002Fterms\u002Fm\u002Fmodel","ai","A model is the trained AI — the finished product.",{"title":198,"path":223,"acronym":207,"category":189,"difficulty":191,"description":224},"\u002Fterms\u002Fq\u002Fquery-builder","A query builder lets you build database queries by chaining methods instead of writing raw SQL. It's like assembling a sentence with Lego blocks — `.",{"title":200,"path":226,"acronym":207,"category":215,"difficulty":216,"description":227},"\u002Fterms\u002Fs\u002Fschema","A database schema is the blueprint of your database — which tables exist, what columns they have, what types they are, and how they relate to each other.",1776518298711]