Exercise Thursday

At the end of every course section, we'll take a break from coding to practice interview questions with our partner. These questions will (primarily) revolve around the content we learned in this course section, and, much like a "real" interview, some will be more technical than others.

In addition to learning how to implement the new tools, technologies, and concepts, you want to become comfortable talking about them too, so you may accurately demonstrate and communicate these skills you've learned to potential employers in an interview. Not all interviewers will quiz you on vocabulary and concepts, as some of the questions below do. However, you should practice verbally articulating these topics in order to discuss them with confidence in an interview, regardless of the type of question that begins the discussion.

Take turns answering the questions below with your partner:

Technical Interview Questions

  • What is the difference between postgres and psql? What is each responsible for? How does a developer interact with each?
  • What does the term relational database mean? How does a relational database structure its data?
  • What is the difference between a primary key and a foreign key? What is each used for?
  • How can we locate a specific object or database entry in an SQL database? What does this SQL query look like? Construct one for your partner using a whiteboard, scratch paper, or directly in your text editor.
  • Why is it important that the ID value of objects in our application match the ID of that information's entry in our database?
  • How can we ensure the ID value of objects in our application match the ID of that information's entry in our database?
  • In a one-to-many relationship, how do we associate a new object with its parent object in the database?
  • Walk through each of the following types of HTTP requests, describe what they do, and when you would use each:
    • PATCH
    • POST
    • GET
    • DELETE
  • Walk through each of the following types of standard database relationships, describe what they do, and when you would use each:
    • One-to-One
    • One-to-Many
    • Many-to-Many
  • In a one-to-many relationship, why does the "many" contain the ID value of the "one" it belongs to? Why not the other way around? What do you think?
  • Talk through the following portion of code line by line with your partner. What is happening here? What can you determine about the application this code belongs to, based only on this snippet? What do you think its database schema looks like?
patch("/extracurriculars/:id") do
  extracurricular_id = params.fetch("id").to_i()
  @extracurricular = Extracurricular.find(extracurricular_id)
  student_ids = params.fetch("student_ids")
  @extracurricular.update({:student_ids => student_ids})
  @students = Student.all()

Stories and Examples

Offering a tangible story or example that highlights your skills usually goes much further in an interview than simply telling your interviewer you're good at something. (i.e.: Telling a story about a time you tracked down a tricky bug versus simply saying "I'm good at problem-solving!").

Review the STAR method, discussed in this lesson on non-technical interviews. Use the STAR method to practice answering non-technical questions with your partner.

Again, if you come up with a story or example you feel good about, jot it down somewhere! It's tough to come up with stories like this in an interview on the spot. Having a few tucked away to review before an interview will be a huge benefit to you later.

Lesson 28 of 29
Last updated August 7, 2022