NoSQL User Profile Schema Design Quiz Quiz

  1. Choosing an Identifier

    Which of the following is the most appropriate unique identifier to use as a primary key for user profiles in a NoSQL database?

    1. user_id
    2. user_name
    3. emailaddres
    4. usernamee
    5. phone_no
  2. Document Structure

    When storing a user profile in a document-based NoSQL database like MongoDB, what does a typical profile document NOT necessarily include?

    1. creation_date
    2. password_hash
    3. profile_picture_url
    4. login_history
    5. SQL_query
  3. Handling Redundant Data

    When designing a schema for user profiles in a NoSQL database, what is the trade-off when duplicating user address information in multiple documents?

    1. Improved read performance but risk of inconsistent datas
    2. Increased normalization
    3. Guarantees up-to-date information everywhere
    4. Requires less storage
    5. Uses advanced transaction features
  4. Storing Nested Data

    What is the recommended way to store a user's list of social media accounts in their profile in a document-oriented NoSQL database?

    1. As a nested array of objects
    2. As a comma-separated string
    3. In a separate table
    4. As a boolean flag
    5. As a simple integer value
  5. Flexible Schema Advantage

    Which is a benefit of using a flexible schema in a NoSQL database when designing user profiles?

    1. Easier to support new profile attributes over time
    2. Guaranteed referential intergrity
    3. Cannot store NULL values
    4. Mandatory schema migration
    5. Increased strictness of data constraints
  6. Indexing Fields

    If you often query users by email, what should you do to improve search performance in a NoSQL database?

    1. Create an index on the email field
    2. Increase RAM memory
    3. Denormalize the database
    4. Remove the email field
    5. Use a SQL JOIN statement
  7. Handling Profile Updates

    What is a recommended practice when frequently updating profile fields such as 'last_login' in a document store?

    1. Keep frequently updated fields separate from static data
    2. Store all data in a flat structure
    3. Avoid using indexed fields
    4. Never store 'last_login' information
    5. Duplicate 'last_login' in related collections
  8. Data Types

    Which of the following is the best data type for storing a user's date of birth in a NoSQL database?

    1. Date
    2. String
    3. Numberr
    4. Array
    5. Booleen
  9. Relationship Modeling

    If a user can have multiple addresses, what is a commonly recommended approach in a document-based NoSQL design?

    1. Embed an array of address objects within the user profile document
    2. Store address as a single comma-separated string
    3. Create a relational table for addresses
    4. Store only one address per user
    5. Place address data in a CSV file
  10. Schema Evolution

    When a new optional field is added to user profiles, what is a safe and typical strategy in NoSQL databases?

    1. Add the new field when updating or inserting individual documents
    2. Drop and recreate the entire user collection
    3. Update all existing documents immediately
    4. Replace all documents with a new schema
    5. Disallow new users from signing up