Physical Design Flashcards
What is an index in MySQL?
What attribute the rows are ordered by in a table
What is the default index in MySQL?
Primary keys and candidate keys, only uses one
Why use an index in MySQL?
Speed up query calls
When do you specify an index?
On the CREATE TABLE
clause with INDEX(column_name)
or on existing tables using CREATE INDEX index ON table_name(column_name)
What is a privilege in MySQL?
Right to execute particular SQL statements or access other users’ objects
What are the levels of privilege in ascending order of capability?
Routine, column, table, database and global
How do you grant privileges in MySQL?
GRANT privilege | ALL ON table|column|proc TO user [WITH GRANT OPTION]
What does the GRANT OPTION
mean in a privilege?
allows grantee to pass privileges on to other users
What are roles in MySQL?
A named collection of users with privileges which can be granted or revoked
How do you grant roles to users in MySQL?
Use role name instead of privilege in GRANT
clause
How do you revoke privilege in MySQL?
REVOKE privilege | ALL ON table|column|proc FROM user
What happens to privileges granted upon revoking the granters privilege?
They are unaffected by the revoke