[{"data":1,"prerenderedAt":445},["ShallowReactive",2],{"blog-why-conversations-dont-belong-in-relational-databases":3},{"id":4,"title":5,"body":6,"description":12,"extension":434,"meta":435,"navigation":439,"path":440,"seo":441,"sitemap":442,"stem":443,"__hash__":444},"blog\u002Fblog\u002Fwhy-conversations-dont-belong-in-relational-databases.md","Why Conversations Don't Belong in Relational Databases",{"type":7,"value":8,"toc":416},"minimark",[9,13,19,22,27,30,33,49,52,56,59,71,74,95,98,106,150,155,188,193,266,274,285,289,296,299,307,313,317,320,340,343,357,369,373,383,386,390,397,400,409],[10,11,12],"p",{},"When building chatbot platforms or conversational agents, developers often try to store conversation logic in relational or document-based databases. But here’s the problem:",[14,15,16],"blockquote",{},[10,17,18],{},"Conversations aren’t tables. They’re networks.",[10,20,21],{},"This article explores why traditional databases struggle with conversation modeling and why Wanderer takes a different path using graphs.",[23,24,26],"h2",{"id":25},"tables-are-for-structured-data-conversations-arent","Tables Are for Structured Data. Conversations Aren’t.",[10,28,29],{},"Relational databases are great when your data fits into predictable rows and columns think products, invoices, users. This is the basis for CRUD apps (Create, Read, Update, Delete) and admin panels.",[10,31,32],{},"But conversations aren't structured like spreadsheets. They're full of:",[34,35,36,40,43,46],"ul",{},[37,38,39],"li",{},"Conditional paths",[37,41,42],{},"Branching questions",[37,44,45],{},"Loops and returns",[37,47,48],{},"Deep context dependencies",[10,50,51],{},"Trying to force this into a tabular model means you're constantly writing glue code to simulate logic that just doesn’t belong there.",[23,53,55],{"id":54},"lets-try-it-anyway","Let’s Try It Anyway…",[10,57,58],{},"Imagine trying to store a conversation like this:",[60,61,62,65,68],"ol",{},[37,63,64],{},"A user is greeted with a question.",[37,66,67],{},"Depending on their answer, the bot either asks a follow-up, jumps to another branch, or ends.",[37,69,70],{},"Some answers lead to the same node. Others diverge. Some depend on earlier context.",[10,72,73],{},"In a relational model, you'd need:",[34,75,76,83,88],{},[37,77,78,79],{},"A ",[80,81,82],"strong",{},"questions table",[37,84,78,85],{},[80,86,87],{},"suggestions (answers) table",[37,89,90,91,94],{},"An ",[80,92,93],{},"edges table"," connecting questions and answers with conditions",[10,96,97],{},"Here’s a simplified version:",[99,100,102,105],"h3",{"id":101},"questions",[103,104,101],"code",{},":",[107,108,109,122],"table",{},[110,111,112],"thead",{},[113,114,115,119],"tr",{},[116,117,118],"th",{},"id",[116,120,121],{},"label",[123,124,125,134,142],"tbody",{},[113,126,127,131],{},[128,129,130],"td",{},"1",[128,132,133],{},"Hey! How are you?",[113,135,136,139],{},[128,137,138],{},"2",[128,140,141],{},"Why are you stressed?",[113,143,144,147],{},[128,145,146],{},"3",[128,148,149],{},"What do you want to do?",[99,151,153,105],{"id":152},"suggestions",[103,154,152],{},[107,156,157,165],{},[110,158,159],{},[113,160,161,163],{},[116,162,118],{},[116,164,121],{},[123,166,167,174,181],{},[113,168,169,171],{},[128,170,130],{},[128,172,173],{},"I'm fine",[113,175,176,178],{},[128,177,138],{},[128,179,180],{},"I'm stressed",[113,182,183,185],{},[128,184,146],{},[128,186,187],{},"Book a holiday",[99,189,191,105],{"id":190},"edges",[103,192,190],{},[107,194,195,213],{},[110,196,197],{},[113,198,199,201,204,207,210],{},[116,200,118],{},[116,202,203],{},"from_type",[116,205,206],{},"from_id",[116,208,209],{},"to_type",[116,211,212],{},"to_id",[123,214,215,229,241,253],{},[113,216,217,219,222,224,227],{},[128,218,130],{},[128,220,221],{},"question",[128,223,130],{},[128,225,226],{},"suggestion",[128,228,130],{},[113,230,231,233,235,237,239],{},[128,232,138],{},[128,234,221],{},[128,236,130],{},[128,238,226],{},[128,240,138],{},[113,242,243,245,247,249,251],{},[128,244,146],{},[128,246,226],{},[128,248,138],{},[128,250,221],{},[128,252,138],{},[113,254,255,258,260,262,264],{},[128,256,257],{},"4",[128,259,221],{},[128,261,138],{},[128,263,226],{},[128,265,146],{},[10,267,268,269,273],{},"It ",[270,271,272],"em",{},"works"," but only in theory. As your flows grow, the model becomes unmanageable.",[34,275,276,279,282],{},[37,277,278],{},"You’d need recursive queries or stored procedures to resolve the next valid step.",[37,280,281],{},"You’d constantly join and filter across multiple tables.",[37,283,284],{},"Traversing the logic visually or debugging it becomes nearly impossible.",[23,286,288],{"id":287},"document-stores-arent-much-better","Document Stores Aren’t Much Better",[10,290,291,292,295],{},"MongoDB and other document databases offer more flexibility. But you still face the same challenge: ",[80,293,294],{},"relationships",".",[10,297,298],{},"You can either:",[34,300,301,304],{},[37,302,303],{},"Nest everything (but then reuse becomes difficult), or",[37,305,306],{},"Reference everything (but then querying and joining gets ugly again)",[10,308,309,310,295],{},"In short: neither tabular nor document structures naturally express ",[80,311,312],{},"networks",[23,314,316],{"id":315},"conversations-are-graphs","Conversations Are Graphs",[10,318,319],{},"At Wanderer, we treat every flow as a graph:",[34,321,322,328,334],{},[37,323,324,327],{},[80,325,326],{},"Nodes"," represent questions, messages, actions, etc.",[37,329,330,333],{},[80,331,332],{},"Edges"," represent the logic between them - may, must, not, push, call.",[37,335,336,339],{},[80,337,338],{},"States"," flow through the system, triggering changes based on edge logic.",[10,341,342],{},"This allows us to:",[34,344,345,348,351,354],{},[37,346,347],{},"Model even the most complex conversational structures",[37,349,350],{},"Visualize flows clearly, with every logical condition visible",[37,352,353],{},"Traverse the graph deterministically or reactively",[37,355,356],{},"Store and share flows as clean, portable JSON",[14,358,359],{},[10,360,361,362,365,366,368],{},"In a graph, your data ",[270,363,364],{},"is"," your logic. And your logic ",[270,367,364],{}," visual.",[23,370,372],{"id":371},"from-theory-to-practice","From Theory to Practice",[10,374,375,376,379,380,382],{},"With Wanderer, the conversation graph ",[80,377,378],{},"is the database",". The flow you draw ",[270,381,364],{}," what gets saved. There’s no translation layer, no hidden logic, and no mismatch between front-end and back-end.",[10,384,385],{},"And best of all: it runs entirely in the browser.",[23,387,389],{"id":388},"final-thoughts","Final Thoughts",[10,391,392,393,396],{},"Relational and document databases were never designed for conversational logic. The more you try to force it, the more complexity you create. Wanderer embraces the true structure of conversations ",[80,394,395],{},"as networks"," and makes them visible, editable, and executable.",[10,398,399],{},"If you’re tired of fighting against your database schema, try building with the graph instead.",[10,401,402],{},[403,404,408],"a",{"href":405,"rel":406},"https:\u002F\u002Fwanderer-flow.de\u002Fbuilder",[407],"nofollow","Start the Builder",[10,410,411,412],{},"Title image: ",[403,413,414],{"href":414,"rel":415},"https:\u002F\u002Fpixabay.com\u002Fde\u002Fphotos\u002Fkarten-katalog-schubladen-holz-194280\u002F",[407],{"title":417,"searchDepth":418,"depth":418,"links":419},"",2,[420,421,430,431,432,433],{"id":25,"depth":418,"text":26},{"id":54,"depth":418,"text":55,"children":422},[423,426,428],{"id":101,"depth":424,"text":425},3,"questions:",{"id":152,"depth":424,"text":427},"suggestions:",{"id":190,"depth":424,"text":429},"edges:",{"id":287,"depth":418,"text":288},{"id":315,"depth":418,"text":316},{"id":371,"depth":418,"text":372},{"id":388,"depth":418,"text":389},"md",{"date":436,"author":437,"headerImage":438},"2025-03-17","Chris","\u002Fimages\u002Fblog\u002Fdatabase.jpg",true,"\u002Fblog\u002Fwhy-conversations-dont-belong-in-relational-databases",{"title":5,"description":12},{"loc":440},"blog\u002Fwhy-conversations-dont-belong-in-relational-databases","3pokrt9aSkIES5LUAEmCMrn1GwiWsLqXz1ekGlcknlI",1786889213828]