Many-to-Many Schema Design With a Join Table, Composite Primary Key, and Queries

Read the full interview experience this question came from →

Quick Overview

A database schema and SQL question that asks you to model a many-to-many relationship between documents and tags with a join table and a composite primary key. It tests key and index design for both lookup directions, foreign-key delete behavior, and queries that handle zero-match rows and require multiple related tags.

Many-to-Many Schema Design With a Join Table, Composite Primary Key, and Queries

Company: Scribd

Role: Software Engineer

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Onsite

Overview: A database schema and SQL question that asks you to model a many-to-many relationship between documents and tags with a join table and a composite primary key. It tests key and index design for both lookup directions, foreign-key delete behavior, and queries that handle zero-match rows and require multiple related tags.

Read the full Scribd Software Engineer interview experience this question came from

Scribd logo
Scribd
Sep 4, 2026
mediumSoftware EngineerOnsiteData Manipulation (SQL/Python)
1
0
Loading...