Showing posts with label SQL GRANT Command. Show all posts
Showing posts with label SQL GRANT Command. Show all posts

Answers: Database Security and Permissions Basics

 Here’s the answer key with explanations for the Part 11 quiz on database security and permissions.


Answer Key & Explanations

  1. What SQL command is used to grant specific privileges to a user?

    Answer: b) GRANT
    Explanation:
    GRANT is the command used to assign specific permissions like SELECT, INSERT, UPDATE, etc., to a database user. CREATE USER only creates the user but doesn’t assign privileges.


  1. In MongoDB, which role allows both reading and writing to a database?

    Answer: b) readWrite
    Explanation:
    The readWrite role grants permission to read and write data in the specified database. The read role allows only reading, while dbAdmin and clusterAdmin are for administrative privileges.


  1. What is the main purpose of encryption in databases?

    Answer: b) Protect data confidentiality
    Explanation:
    Encryption protects sensitive data from unauthorized access by encoding it. It converts data into an unreadable format for unauthorized users. It does not speed up queries or organize data; rather, it secures data both at rest and in transit.


  1. Which security principle suggests giving users only the permissions they need?

    Answer: a) Principle of least privilege
    Explanation:
    This principle ensures users have the minimum necessary permissions to perform their jobs, reducing risk of accidental or malicious data exposure or damage.


✅ Practice Task Solution: If you haven’t seen the original task yet, you can check it here.


💡 Challenge: Can you think of a real-world scenario where applying the principle of least privilege would make a difference? Share your thoughts in the comments!

💬 Leave a comment if you have any questions or feedback!


Featured Post

Database Security Best Practices: Protect SQL and NoSQL Databases from Threats

🔷 Part 17: Database Security Best Practices – Protect Your Data in Production 📍 Introduction Databases hold critical data, making them...

Popular Posts