Triplebyte Interview Question

What is database normalization?

Interview Answers

Anonymous

May 22, 2017

Got it wrong, as I focused mainly on Cracking the Coding Interview style coding questions when preparing. Their interview made me realize how important it is to know other concepts, such as how the computer system works, databases, the web, system design, etc.

Anonymous

May 24, 2017

What: A way to reorganize the fields in a relational database to reduce duplication, and ensure data is organized in a logical fashion. Example of duplication in a table of students: StudentID Name StateOfOrigin Address CourseStudentIsTaking 11 Alice OH 15 Lane Street Physics 12 Bob CA 18 Home Lane Biology 11 Alice OH 19 Star Blvd English 13 Chuck WA 1 Main Street ??? In the above table, if the student Chuck is not currently taking a class, we are unable to insert him into the list of students. Also, Alice appears twice, with different address and subject. We want a way to make sure that when she changes her address, we can update just one attribute in the database, not multiple times, to reduce mistakes we make. A better way to organize this is by having three tables instead: STUDENTS student_id NameOfStudent Address ROSTER student_id ClassTheyAreTaking ADDRESS student_id address state