Product design question
How would you design a data model to accommodate an Account Hierarchy?
- Veeva
- Product design
- Hard
Practice this question out loud. An AI interviewer asks it, follows up like a real interviewer would, and scores your answer. Type or speak.
Start a mock interview on this question · Mock interview from a job description
What this question tests
Technical product design for enterprise B2B software, checking whether you can reason about data modeling trade-offs like hierarchy depth, permissions, and real-world account relationships.
How to approach it
- Clarify the use case: parent-child account relationships common in life sciences and enterprise CRM, such as a global pharma company with regional subsidiaries.
- Identify the core requirement: users need to roll up data, like sales or activity, from child accounts to parent accounts while still managing them independently.
- Choose a data model approach: a self-referencing account table with a parent_account_id field, supporting arbitrary depth rather than a fixed number of hierarchy levels.
- Address permissions: users at a parent level may need visibility into child account data, but not vice versa, requiring role-based access tied to hierarchy position.
- Handle edge cases: accounts that move between parents over time, requiring a hierarchy history log rather than overwriting the relationship silently.
- Define success as accurate roll-up reporting performance at scale and correct permission enforcement across reorganizations.
What a strong answer includes
- Chooses a self-referencing model supporting arbitrary depth, the correct and scalable approach versus a rigid fixed-level hierarchy.
- Names the permissions asymmetry, parent sees child but not reverse, a real and commonly overlooked requirement in account hierarchies.
- Addresses hierarchy change over time with a history log, showing awareness that account structures aren't static in enterprise settings.
Common mistakes
- Designing a fixed-depth hierarchy, like exactly 3 levels, which breaks when real customer structures are deeper or shallower.
- Ignoring how the model handles accounts that get reassigned to a different parent over time.
Likely follow-up questions
- How would you handle reporting performance when a hierarchy has thousands of child accounts?
- How would you migrate existing flat account data into this new hierarchy model?
More product design questions
- Design a kid-friendly Swiggy experience for 10-16 year olds.Veeva · Product design · Hard
- Design a TV for a car.Google · Product design · Hard
- Design a refrigerator for the blind.Google · Product design · Hard
- Redesign Twitter for eCommerce.Shopify · Product design · Hard
- You are a PM at Flipkart. The company has decided to increase the userbase of age >60 years on the platform. What will you do?Flipkart · Product design · Hard
- Develop a seller score algorithm for Walmart Marketplace.Walmart · Product design · Hard
More questions from Veeva
Learn the skill behind it
Chapters of the AI PM course that teach what this question tests.
- Chapter 4: Discovery and strategy for AI products
- Chapter 7: AI UX and human oversight: design for a system that is wrong sometimes
- Chapter 14: Get the job: the AI PM interview loop