C++ Data Modeling Interview Questions

Describe a schema (or classes) to power an online restaurant reservation system. Describe the tables and the relationships beween the tables.

This system should allow a user to reserve a table at a restaurant for a certain time period and a certain party size.

It should allow the restauranteur to configure the system to describe their restaurant and manage reservations.

Think http://opentable.com

  1. Describe how you would store a social graph in a relational database.
  2. Describe an efficient algorithm to determine whether or not person X is a 2nd degree connection of person Y.
  3. Describe an efficient algorithm to determine whether or not person X is a 3rd degree connection of person Y.
  4. How can you make #3 very quick. E.g. how does Linked In compute 3rd degree connections quickly?