Data Control Language

from Wikipedia, the free encyclopedia

The Data Control Language ( DCL ; German  data control language ) is that part of a database language that is used to grant or withdraw authorizations. DCL is the data monitoring language of a database. The DCL is available in different systems in different forms. Examples:

  • In SQL (in addition to DDL and DML ) it is available in the form of English command clauses (e.g. GRANT SELECT, UPDATE ON INVOICE TO CLERK or REVOKE EXECUTE ON NIGHTLY_JOB FROM DEVELOPERS ).
  • In the historical IMS databases, the DCL is completely taken over by the data protection component of the operating system.

Some software manufacturers do not use the term DCL and include the authorization commands as part of the DDL .

SQL

In the Structured Query Language , which is important for practical applications , the syntax is as follows:

GRANT Operation+ ON Relation TO (PUBLIC|Benutzer) [WITH GRANT OPTION]
REVOKE Operation+ ON Relation FROM (PUBLIC|Benutzer)
  • Relation can in particular also be a view.
  • WITH GRANT OPTION allows the new rights holders to transfer the rights.
  • PUBLIC means all users.
  • The database administrator (DBA) has all rights. The owner of an object also has all rights to this object.

The commands for rights management are specified in SQL, but not those for user management. Therefore, each DBMS implements its own user administration, which role names and / or user groups may or may not know.

  • In modern DBMS rights can be assigned to anything, not just to individual tables.

Examples:

GRANT SELECT, UPDATE ON TABLE Student TO groupx;
Allows the user or group groupx read and change access to the Student table .
REVOKE EXECUTE ON PROCEDURE DSN8ED6 FROM PUBLIC;
Removes the right to execute the stored procedure DSN8ED6 from all not explicitly authorized users . Permissions granted to a user or group are retained.

See also

Individual evidence

  1. 4.1.2 Query data - SELECT ( Memento of the original from December 10, 2016 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. from SQL & MySQL - interactive, page 103, Andreas Buchmann and Ralf Smolarek, Verlag Omnigena, 2005, ISBN 3-936121-02-8  @1@ 2Template: Webachiv / IABot / www.dpunkt.de