Physical Design Flashcards

1
Q

What is an index in MySQL?

A

What attribute the rows are ordered by in a table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the default index in MySQL?

A

Primary keys and candidate keys, only uses one

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why use an index in MySQL?

A

Speed up query calls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When do you specify an index?

A

On the CREATE TABLE clause with INDEX(column_name) or on existing tables using CREATE INDEX index ON table_name(column_name)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a privilege in MySQL?

A

Right to execute particular SQL statements or access other users’ objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the levels of privilege in ascending order of capability?

A

Routine, column, table, database and global

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you grant privileges in MySQL?

A
GRANT privilege | ALL
ON table|column|proc
TO user
[WITH GRANT OPTION]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the GRANT OPTION mean in a privilege?

A

allows grantee to pass privileges on to other users

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are roles in MySQL?

A

A named collection of users with privileges which can be granted or revoked

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you grant roles to users in MySQL?

A

Use role name instead of privilege in GRANT clause

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you revoke privilege in MySQL?

A
REVOKE privilege | ALL
ON table|column|proc
FROM user
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What happens to privileges granted upon revoking the granters privilege?

A

They are unaffected by the revoke

How well did you know this?
1
Not at all
2
3
4
5
Perfectly