Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Build my plan
Design a Database Schema
00:00
5 left

Design a Database Schema

HardSQL · PostgreSQL

Problem

Build a database schema with an entity-relation model for a specific business scenario in the iCapital context. Define entities for investor accounts, alternative funds, and investment commitments, including primary keys, foreign keys, appropriate data types, and integrity constraints. Then provide a query that summarizes approved commitments for active investors and open funds. Rows with a NULL commitment amount are ignored.

Output

  1. One row per active investor
  2. Columns: investor_id, investor_name, total_open_approved_commitment, and open_fund_count
  3. Include active investors without qualifying commitments with zero totals
  4. Order by total commitment descending, then investor name ascending

Schema

investor_accounts
ColumnTypeDescription
investor_idPKBIGINTUnique investor account identifier
investor_nameVARCHAR(150)Investor or account name
emailVARCHAR(255)Unique investor email address
account_statusVARCHAR(20)Account lifecycle status
created_atDATEDate the account was created
alternative_funds
ColumnTypeDescription
fund_idPKBIGINTUnique alternative fund identifier
fund_nameVARCHAR(200)Fund name
asset_classVARCHAR(50)Fund asset class
fund_strategyVARCHAR(100)Investment strategy
fund_statusVARCHAR(20)Fund lifecycle status
minimum_commitmentNUMERIC(18,2)Minimum commitment amount
investment_commitments
ColumnTypeDescription
commitment_idPKBIGINTUnique commitment identifier
investor_idBIGINTReferenced investor account
fund_idBIGINTReferenced alternative fund
commitment_dateDATEDate of the commitment
commitment_amountNUMERIC(18,2)Committed amount
commitment_statusVARCHAR(20)Commitment processing status
Tablesinvestor_accountsalternative_fundsinvestment_commitments
Interviewer

Your question is Design a Database Schema. Start with the requirements and the three tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
Sign up free to run your codeLog inLn 1
Run your query to see results here.