Schema definition

Now that we have configured the RDS properly, let's take a look at the schema of our letsPoll database. After analyzing the requirements, we can design the database to have three tables/relations, as follows:

  1. RESPONDENT: The respondent/user store is the AWS Cognito user pool. It dictates the authorization and authentication. It will serve us well if we maintain the minimum required data of the respondent in our backend database, as a tie-in to the user pool. It will have the following elements:
    • A_RESPONDENT_ID: The auto-incremented primary key
    • RESPONDENT_ID: A randomly generated public respondent ID
    • RESPONDENT_EMAIL_ID: The respondent's email ID from the Cognito user pool
    • RESPONDENT_DISPLAY_NAME: The display name of the ...

Get Hands-On Serverless Applications with Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.