Round 1
Questions:
- Explain your last internship experience and the choice of MongoDB over SQL.
- Discuss the performance of a query with separate indexes:
SELECT ALL WHERE A=10 and B=20
- Is it better to index A and B separately, or make a composite index AB? Which is time/space efficient and why?
- Design an Attendance System with the following requirements:
- Should have different roles like
teacher, dean, student, etc
and different views for different roles. - Teachers opt for courses and students also opt for courses, and we have to keep track of students' attendance in each course, displaying it in both student and teacher/dean views.
- Student should be able to see how many classes he must attend to reach above 75% attendance.
- Some other features.
- Should have different roles like
- Difference between
Hashing vs Encrypting
. - If someone else obtains your
Session ID
, how will you prevent them from logging into the account? - What if someone has the same IP address as yours?
Candidate's Approach
- Discussed the choice of MongoDB and attempted to explain indexing concepts, although lacking prior knowledge on types of indexes.
- Designed the database structure for the Attendance System, including tables and optimizations.
- Explained the login system using a
session id
for user authorization. - Attempted to address security concerns regarding session hijacking by logging the user's IP address.
Interviewer's Feedback
- The interviewer seemed to appreciate the candidate's willingness to think through problems, especially regarding indexing and database design.
- However, there were areas of confusion, particularly around hashing vs encrypting and session security, which indicated a need for further study.