diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-01-09 10:55:03 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-01-09 13:09:38 +0100 |
| commit | 04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa (patch) | |
| tree | 5c691241355c943a3c68ddb06b8cf8c60aa11319 /srcs/phpmyadmin/doc/html/relations.html | |
| parent | 7e0d85db834d6351ed85d01e5126ac31dc510b86 (diff) | |
| download | ft_server-04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa.tar.gz ft_server-04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa.tar.bz2 ft_server-04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa.zip | |
phpmyadmin working
Diffstat (limited to 'srcs/phpmyadmin/doc/html/relations.html')
| -rw-r--r-- | srcs/phpmyadmin/doc/html/relations.html | 194 |
1 files changed, 194 insertions, 0 deletions
diff --git a/srcs/phpmyadmin/doc/html/relations.html b/srcs/phpmyadmin/doc/html/relations.html new file mode 100644 index 0000000..33cae54 --- /dev/null +++ b/srcs/phpmyadmin/doc/html/relations.html @@ -0,0 +1,194 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Relations — phpMyAdmin 5.0.1 documentation</title> + + <link rel="stylesheet" href="_static/classic.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: './', + VERSION: '5.0.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="index" title="Index" href="genindex.html" /> + <link rel="search" title="Search" href="search.html" /> + <link rel="copyright" title="Copyright" href="copyright.html" /> + <link rel="top" title="phpMyAdmin 5.0.1 documentation" href="index.html" /> + <link rel="up" title="User Guide" href="user.html" /> + <link rel="next" title="Charts" href="charts.html" /> + <link rel="prev" title="User management" href="privileges.html" /> + </head> + <body role="document"> + <div class="related" role="navigation" aria-label="related navigation"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="charts.html" title="Charts" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="privileges.html" title="User management" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.0.1 documentation</a> »</li> + <li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <div class="section" id="relations"> +<span id="id1"></span><h1>Relations<a class="headerlink" href="#relations" title="Permalink to this headline">¶</a></h1> +<p>phpMyAdmin allows relationships (similar to foreign keys) using MySQL-native +(InnoDB) methods when available and falling back on special phpMyAdmin-only +features when needed. There are two ways of editing these relations, with the +<em>relation view</em> and the drag-and-drop <em>designer</em> – both of which are explained +on this page.</p> +<div class="admonition note"> +<p class="first admonition-title">Note</p> +<p class="last">You need to have configured the <a class="reference internal" href="setup.html#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a> for using phpMyAdmin +only relations.</p> +</div> +<div class="section" id="technical-info"> +<h2>Technical info<a class="headerlink" href="#technical-info" title="Permalink to this headline">¶</a></h2> +<p>Currently the only MySQL table type that natively supports relationships is +InnoDB. When using an InnoDB table, phpMyAdmin will create real InnoDB +relations which will be enforced by MySQL no matter which application accesses +the database. In the case of any other table type, phpMyAdmin enforces the +relations internally and those relations are not applied to any other +application.</p> +</div> +<div class="section" id="relation-view"> +<h2>Relation view<a class="headerlink" href="#relation-view" title="Permalink to this headline">¶</a></h2> +<p>In order to get it working, you first have to properly create the +[[pmadb|pmadb]]. Once that is setup, select a table’s “Structure” page. Below +the table definition, a link called “Relation view” is shown. If you click that +link, a page will be shown that offers you to create a link to another table +for any (most) fields. Only PRIMARY KEYS are shown there, so if the field you +are referring to is not shown, you most likely are doing something wrong. The +drop-down at the bottom is the field which will be used as the name for a +record.</p> +<div class="section" id="relation-view-example"> +<h3>Relation view example<a class="headerlink" href="#relation-view-example" title="Permalink to this headline">¶</a></h3> +<img alt="_images/pma-relations-relation-view-link.png" src="_images/pma-relations-relation-view-link.png" /> +<img alt="_images/pma-relations-relation-link.png" src="_images/pma-relations-relation-link.png" /> +<p>Let’s say you have categories and links and one category can contain several links. Your table structure would be something like this:</p> +<ul class="simple"> +<li><cite>category.category_id</cite> (must be unique)</li> +<li><cite>category.name</cite></li> +<li><cite>link.link_id</cite></li> +<li><cite>link.category_id</cite></li> +<li><cite>link.uri</cite>.</li> +</ul> +<p>Open the relation view (below the table structure) page for the <cite>link</cite> table and for <cite>category_id</cite> field, you select <cite>category.category_id</cite> as master record.</p> +<p>If you now browse the link table, the <cite>category_id</cite> field will be a clickable hyperlink to the proper category record. But all you see is just the <cite>category_id</cite>, not the name of the category.</p> +<img alt="_images/pma-relations-relation-name.png" src="_images/pma-relations-relation-name.png" /> +<p>To fix this, open the relation view of the <cite>category</cite> table and in the drop down at the bottom, select “name”. If you now browse the link table again and hover the mouse over the <cite>category_id</cite> hyperlink, the value from the related category will be shown as tooltip.</p> +<img alt="_images/pma-relations-links.png" src="_images/pma-relations-links.png" /> +</div> +</div> +<div class="section" id="designer"> +<h2>Designer<a class="headerlink" href="#designer" title="Permalink to this headline">¶</a></h2> +<p>The Designer feature is a graphical way of creating, editing, and displaying +phpMyAdmin relations. These relations are compatible with those created in +phpMyAdmin’s relation view.</p> +<p>To use this feature, you need a properly configured <a class="reference internal" href="setup.html#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a> and +must have the <span class="target" id="index-0"></span><a class="reference internal" href="config.html#cfg_Servers_table_coords"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['table_coords']</span></code></a> configured.</p> +<p>To use the designer, select a database’s structure page, then look for the +<span class="guilabel">Designer</span> tab.</p> +<p>To export the view into PDF, you have to create PDF pages first. The Designer +creates the layout, how the tables shall be displayed. To finally export the +view, you have to create this with a PDF page and select your layout, which you +have created with the designer.</p> +<div class="admonition seealso"> +<p class="first admonition-title">See also</p> +<p class="last"><a class="reference internal" href="faq.html#faqpdf"><span class="std std-ref">6.8 How can I produce a PDF schema of my database?</span></a></p> +</div> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">Relations</a><ul> +<li><a class="reference internal" href="#technical-info">Technical info</a></li> +<li><a class="reference internal" href="#relation-view">Relation view</a><ul> +<li><a class="reference internal" href="#relation-view-example">Relation view example</a></li> +</ul> +</li> +<li><a class="reference internal" href="#designer">Designer</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="privileges.html" + title="previous chapter">User management</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="charts.html" + title="next chapter">Charts</a></p> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/relations.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> +<div id="searchbox" style="display: none" role="search"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <div><input type="text" name="q" /></div> + <div><input type="submit" value="Go" /></div> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related" role="navigation" aria-label="related navigation"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="charts.html" title="Charts" + >next</a> |</li> + <li class="right" > + <a href="privileges.html" title="User management" + >previous</a> |</li> + <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.0.1 documentation</a> »</li> + <li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> »</li> + </ul> + </div> + <div class="footer" role="contentinfo"> + © <a href="copyright.html">Copyright</a> 2012 - 2018, The phpMyAdmin devel team. + Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. + </div> + </body> +</html>
\ No newline at end of file |
