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
Database Normal Forms
00:00
5 left

Database Normal Forms

MediumSQL · PostgreSQL

Problem

Explain the different normal forms in a DBMS.

Discuss the purpose of normalization, the conditions for 1NF, 2NF, 3NF, BCNF, 4NF, and 5NF, and the anomalies each form helps prevent. For grading, return the normal forms in order with their defining rule and an associated dependency rule.

Output

  1. One row per normal form
  2. Columns: normal_form, definition, dependency_rule
  3. Sort by normal form progression from 1NF through 5NF

Schema

normal_forms
ColumnTypeDescription
normal_form_codePKVARCHAR(10)Short identifier for the normal form
form_nameVARCHAR(50)Display name of the normal form
definitionTEXTDefining condition for the normal form
sort_orderINTLogical progression order
normal_form_rules
ColumnTypeDescription
rule_idPKINTUnique dependency rule identifier
normal_form_codeVARCHAR(10)Referenced normal form
dependency_typeVARCHAR(80)Type of dependency addressed
rule_textTEXTExplanation of the dependency rule
Tablesnormal_formsnormal_form_rules
Interviewer

Your question is Database Normal Forms. Start with the requirements and the two 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.