Skip to content Skip to main navigation Skip to footer

CRUD in Database

Objectives

  • CRUD in database: Identify the create, retrieve, update, and delete requirements of the business
  • Create ER models that reflect all business rules gathered during the interview process
  • Validate your ER model by performing a CRUD in database analysis

Purpose of the CRUD in database

  • From the business scenarios that you develop and the list of business rules that you identify during client interviews, you will build the ERD.
  • The ERD is the conversation tool between the consultant and the client, and it is also the blueprint for the DBA who will eventually build the database.
  • You need a way to check that you haven’t missed any entities or relationships in your data model.
  • You also want to make sure that you haven’t modeled anything that the business does not require.
  • CRUD analysis will help you do this.
CRUD in Database

CRUD in database

  • A good way to validate an ERD is to do a CRUD analysis on it.
  • CRUD is an acronym for create, retrieve, update, delete.
  • These are the four basic functions (or operations) that a database allows.
  • Part of checking a data model for completeness and accuracy is making sure that all the CRUD functions specified by the business scenario and the business rules are represented in the ERD.

CRUD Analysis—Create Function

  • During the client interview, and while writing the business scenarios and rules, look for keywords like:
    • INPUT, ENTER, LOAD, IMPORT, RECORD, & CREATE
  • These all indicate that a record is created in the database at this time.
  • Review the requirements for these keywords.
  • Does your data model account for all of these functions?

CRUD Analysis—Retrieve Function

  • During the client interview, and while writing the business scenarios and rules, look for keywords like:
    • VIEW, REPORT, BRING UP, PRINT, FIND, READ, & LOOK UP
  • These all point to retrieving information from the database.
  • Review the requirements for these keywords.
  • Does your data model account for all these functions?

CRUD Analysis—Update Function

  • During the client interview, and while writing the business scenarios and rules, look for keywords like:
    • CHANGE, MODIFY, ALTER, & UPDATE
  • These all point to updating information that is already in the database.
  • Review the requirements for these keywords.
  • Does your data model account for all these functions?

CRUD Analysis—Delete Function

  • During the client interview, and while writing the business scenarios and rules, look for keywords like:
    • DISCARD, REMOVE, TRASH, PURGE, & DELETE
  • These all point to deleting information that is already in the database.
  • Review the requirements for these keywords.
  • Does your data model account for all these functions?

CRUD in Database Validation

  • Performing a CRUD analysis on your data model helps you check for scope and completeness.
  • If you have a business rule that has no entity to CRUD against, then your data model may be incomplete.
  • Similarly, if you have entities in your ERD that are not touched by any CRUD function (no business rule creates, retrieves, updates, or deletes from it), then you may not need that entity in your model.

Terminology

Key terms used in this tutorial included:

  • Consultant
  • CRUD in database analysis
  • Functions

Summary

In this tutorial, you should have learned how to:

  • Create ER models that reflect all business rules gathered during the interview process
  • Identify the CRUD in database requirements of the business
  • Validate your ER model by performing a CRUD analysis

Was This Article Helpful?

1
Related Articles
0 Comments

There are no comments yet

Leave a comment

Your email address will not be published. Required fields are marked *