In: Computer Science
Given Codd's Rule 4:
Rule 4: Dynamic online catalog based on the relational model: The database description is represented at the logical level in the same way as ordinary data, so that authorized users can apply the same relational language to its interrogation as they apply to the regular data.
In three sentences, explain what this means. Give two example queries from MySQL that show how MySQL realizes the concepts
Meaning of the rule :
This rule simply means that Description of actual database
should be similarly represented as we represent ordinary data( by
tables, columns, views etc). you must be able to inquire about a
database's meta-data using the same language that you use to
inquire about the actual data. What tables are available? What
columns do they contain? Such questions can be answered.
Database dictionary(catalog) is called the Catalog. Dynamic nature
of Database is called dynamic online catalog. Thsi rule simply says
that Management of dynamic database should be in threlational
model. The structure description of the complete
Database and it must be stored online. The Catalog
must be governed by same rules as rest of the database. The same
query language should be used on catalog as used to query
database.
Give two example queries from MySQL that show how MySQL realizes the concepts:
MySQL does have system tables in a special database called
"mysql", that contain access privilege information and
are used to authenticate users and determine what tables,
databases, and columns they have privileges on and what type of
privileges they have.
You can find more information here.
https://dev.mysql.com/doc/refman/5.7/en/system-schema.html
Note : You must be logged in as root inorder to execute the
below statement.
Get the current Timezone used by MySQL database
SELECT @@GLOBAL.time_zone, @@SESSION.time_zone;
Display the current structure of the log tables
SHOW CREATE TABLE mysql.general_log;