PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/Bytedance

Design an RBAC Relational Schema

Last updated: Jun 2, 2026

Quick Overview

This question evaluates understanding of relational database modeling, access control principles, and authorization logic, focusing on how users, roles, permissions, and resources relate within a schema.

  • medium
  • Bytedance
  • System Design
  • Software Engineer

Design an RBAC Relational Schema

Company: Bytedance

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

Design a relational database schema for role-based access control (RBAC). Your design should model the following concepts: - **User**: a person or service account that can access the system. - **Role**: a named grouping of permissions, such as `Admin`, `Editor`, or `Viewer`. - **Permission**: an allowed action, such as `read`, `write`, `delete`, or `approve`. - **Resource**: an object being protected, such as a document, project, repository, or account. Explain: 1. The relationships among users, roles, permissions, and resources. 2. Which relationships are one-to-many versus many-to-many. 3. The tables you would create, including primary keys and foreign keys. 4. How you would answer the question: "Does user U have permission P on resource R?" 5. Any important constraints, indexes, or extensions you would consider for a production system.

Quick Answer: This question evaluates understanding of relational database modeling, access control principles, and authorization logic, focusing on how users, roles, permissions, and resources relate within a schema.

Related Interview Questions

  • Design a Real-Time Auction Platform - Bytedance (medium)
  • Design a High-Frequency Job Scheduler - Bytedance (medium)
  • Design a TinyURL-like short link service - Bytedance (medium)
Bytedance logo
Bytedance
May 27, 2026, 12:00 AM
Software Engineer
Technical Screen
System Design
1
0

Design a relational database schema for role-based access control (RBAC).

Your design should model the following concepts:

  • User : a person or service account that can access the system.
  • Role : a named grouping of permissions, such as Admin , Editor , or Viewer .
  • Permission : an allowed action, such as read , write , delete , or approve .
  • Resource : an object being protected, such as a document, project, repository, or account.

Explain:

  1. The relationships among users, roles, permissions, and resources.
  2. Which relationships are one-to-many versus many-to-many.
  3. The tables you would create, including primary keys and foreign keys.
  4. How you would answer the question: "Does user U have permission P on resource R?"
  5. Any important constraints, indexes, or extensions you would consider for a production system.

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Bytedance•More Software Engineer•Bytedance Software Engineer•Bytedance System Design•Software Engineer System Design
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.