{"title":"Examples of model relationship API usage","version":"3.2","locale":"en","docname":"topics/db/examples/index","url":"/en/3.2/topics/db/examples/","canonical":"https://djangodocs.dev/en/3.2/topics/db/examples/","summary":"Many-to-many relationships Many-to-one relationships One-to-one relationships","html":"<h1>Examples of model relationship API usage<a class=\"heading-anchor\" href=\"#examples-of-model-relationship-api-usage\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<div class=\"toctree-wrapper compound\">\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"/en/3.2/topics/db/examples/many_to_many/\">Many-to-many relationships</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"/en/3.2/topics/db/examples/many_to_one/\">Many-to-one relationships</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"/en/3.2/topics/db/examples/one_to_one/\">One-to-one relationships</a></li>\n</ul>\n</div>","rootId":"examples-of-model-relationship-api-usage","toc":[],"breadcrumbs":[{"docname":"topics/index","title":"Using Django","url":"/en/3.2/topics/"},{"docname":"topics/db/index","title":"Models and databases","url":"/en/3.2/topics/db/"}],"prev":{"docname":"topics/db/instrumentation","title":"Database instrumentation","url":"/en/3.2/topics/db/instrumentation/"},"next":{"docname":"topics/db/examples/many_to_many","title":"Many-to-many relationships","url":"/en/3.2/topics/db/examples/many_to_many/"},"formats":{"html":"/en/3.2/topics/db/examples/","markdown":"/en/3.2/topics/db/examples.md","json":"/en/3.2/topics/db/examples.json"},"source":"https://github.com/django/django/blob/stable/3.2.x/docs/topics/db/examples/index.txt","official":"https://docs.djangoproject.com/en/3.2/topics/db/examples/","inVersions":["dev","6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0","1.11","1.10","1.9","1.8"],"inLocales":["en","zh-hans","fr","ja","id","it","pt-br","ko","es","el","pl"]}