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?
- user_id
- user_name
- emailaddres
- usernamee
- phone_no
Document Structure
When storing a user profile in a document-based NoSQL database like MongoDB, what does a typical profile document NOT necessarily include?
- creation_date
- password_hash
- profile_picture_url
- login_history
- SQL_query
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?
- Improved read performance but risk of inconsistent datas
- Increased normalization
- Guarantees up-to-date information everywhere
- Requires less storage
- Uses advanced transaction features
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?
- As a nested array of objects
- As a comma-separated string
- In a separate table
- As a boolean flag
- As a simple integer value
Flexible Schema Advantage
Which is a benefit of using a flexible schema in a NoSQL database when designing user profiles?
- Easier to support new profile attributes over time
- Guaranteed referential intergrity
- Cannot store NULL values
- Mandatory schema migration
- Increased strictness of data constraints
Indexing Fields
If you often query users by email, what should you do to improve search performance in a NoSQL database?
- Create an index on the email field
- Increase RAM memory
- Denormalize the database
- Remove the email field
- Use a SQL JOIN statement
Handling Profile Updates
What is a recommended practice when frequently updating profile fields such as 'last_login' in a document store?
- Keep frequently updated fields separate from static data
- Store all data in a flat structure
- Avoid using indexed fields
- Never store 'last_login' information
- Duplicate 'last_login' in related collections
Data Types
Which of the following is the best data type for storing a user's date of birth in a NoSQL database?
- Date
- String
- Numberr
- Array
- Booleen
Relationship Modeling
If a user can have multiple addresses, what is a commonly recommended approach in a document-based NoSQL design?
- Embed an array of address objects within the user profile document
- Store address as a single comma-separated string
- Create a relational table for addresses
- Store only one address per user
- Place address data in a CSV file
Schema Evolution
When a new optional field is added to user profiles, what is a safe and typical strategy in NoSQL databases?
- Add the new field when updating or inserting individual documents
- Drop and recreate the entire user collection
- Update all existing documents immediately
- Replace all documents with a new schema
- Disallow new users from signing up