forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
17 lines
4.3 KiB
HTML
17 lines
4.3 KiB
HTML
<a name="EN-US_TOPIC_0000001510162773"></a><a name="EN-US_TOPIC_0000001510162773"></a>
|
|
|
|
<h1 class="topictitle1">GaussDB(DWS) Database and Schema Design Rules</h1>
|
|
<div id="body1528162486098"><p id="EN-US_TOPIC_0000001510162773__a163526b0670d42fa992ba7033a636dc1">In <span id="EN-US_TOPIC_0000001510162773__text1265888159">GaussDB(DWS)</span>, services can be isolated by databases and schemas. Databases share little resources and cannot directly access each other. Connections to and permissions on them are also isolated. Schemas share more resources than databases do. User permissions on schemas and subordinate objects can be controlled using the <strong id="EN-US_TOPIC_0000001510162773__b15854101415557">GRANT</strong> and <strong id="EN-US_TOPIC_0000001510162773__b1185571495510">REVOKE</strong> syntax.</p>
|
|
<ul id="EN-US_TOPIC_0000001510162773__ul14407749155613"><li id="EN-US_TOPIC_0000001510162773__li17407249185610">You are advised to use schemas to isolate services for convenience and resource sharing.</li><li id="EN-US_TOPIC_0000001510162773__li57147515561">It is recommended that system administrators create schemas and databases and then assign required permissions to users.</li></ul>
|
|
<div class="section" id="EN-US_TOPIC_0000001510162773__sb41154e9d50a48e6ada14ffd10d2b591"><h4 class="sectiontitle">Database Design Suggestions</h4><ul id="EN-US_TOPIC_0000001510162773__ul1241013276555"><li id="EN-US_TOPIC_0000001510162773__li47531831165518">Create databases as required. Do not use the default <strong id="EN-US_TOPIC_0000001510162773__b149702415296"><span id="EN-US_TOPIC_0000001510162773__text17442175020432">gaussdb</span></strong> database of a cluster.</li><li id="EN-US_TOPIC_0000001510162773__li7201934125511">Create a maximum of three user-defined databases in a cluster.</li><li id="EN-US_TOPIC_0000001510162773__li17746153765510">To make your database encoding compatible with most characters, you are advised to use the UTF-8 encoding when creating a database.</li><li id="EN-US_TOPIC_0000001510162773__li1931294213555">Exercise caution when you set <strong id="EN-US_TOPIC_0000001510162773__b84235270619237">ENCODING</strong> and <strong id="EN-US_TOPIC_0000001510162773__b84235270619239">DBCOMPATIBILITY</strong> configuration items during database creation. In <span id="EN-US_TOPIC_0000001510162773__text1069744734">GaussDB(DWS)</span>, <strong id="EN-US_TOPIC_0000001510162773__b842352706113254">DBCOMPATIBILITY</strong> can be set to <strong id="EN-US_TOPIC_0000001510162773__b842352706114537">TD</strong>, <strong id="EN-US_TOPIC_0000001510162773__b842352706114542">Oracle</strong>, or <strong id="EN-US_TOPIC_0000001510162773__b1733613542491">MySQL</strong> to be compatible with Teradata, Oracle, or MySQL syntax, respectively. Syntax behavior may vary with the three modes. For details, see <a href="dws_04_0042.html">Syntax Compatibility Differences Among Oracle, Teradata, and MySQL</a>.</li><li id="EN-US_TOPIC_0000001510162773__li164101627125511">By default, a database owner has all permissions for all objects in the database, including the deletion permission. Exercise caution when using the deletion permission.</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001510162773__s51d3bc0fb11b4dccbfd9db3d49343942"><h4 class="sectiontitle">Schema Design Suggestions</h4><ul id="EN-US_TOPIC_0000001510162773__ul14634748125512"><li id="EN-US_TOPIC_0000001510162773__li846585175513">To let a user access an object in a schema, grant the <strong id="EN-US_TOPIC_0000001510162773__b16307749125110">usage</strong> permission and the permissions for the object to the user, unless the user has the <strong id="EN-US_TOPIC_0000001510162773__b7235165515515">sysadmin</strong> permission or is the schema owner.</li><li id="EN-US_TOPIC_0000001510162773__li46701354105515">To let a user create an object in the schema, grant the <strong id="EN-US_TOPIC_0000001510162773__b9676101745511">CREATE</strong> permission for the schema to the user.</li><li id="EN-US_TOPIC_0000001510162773__li17634124817557">By default, a schema owner has all permissions for all objects in the schema, including the deletion permission. Exercise caution when using the deletion permission.</li></ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0077.html">GaussDB(DWS) Database Object Design</a></div>
|
|
</div>
|
|
</div>
|
|
|