DEV Community

loading...
Cover image for Convert user story of a simple library to ER and Relational diagrams in less than 10mins

Convert user story of a simple library to ER and Relational diagrams in less than 10mins

yunweneric profile image Erickeyz ・2 min read

Introduction

The development process of an app/web app, follows 5 steps;
Analysis, wireframing, Designing, Development, Deployment and Maintenance. Designing appears to be the 3rd step. In this step, it entails both frontend and backend design. The frontend design is concerned with the User Interface while the backend concentrates on the database.

Database designs is very critical and important as it determines the nature the application works, data is manipulated and accessed. For applications that might scale up in the long term, it is very important to design a proper database which will suit future use and demands.

A user story is a tool used in Agile software development to capture a description of a software feature from an end-user perspective. A user story describes the type of user, what they want and why. A user story helps to create a simplified description of a requirement.

Convert user story to ER Model

To convert from, read through the user story and note all verbs and nouns. The verbs represents Relationships while nouns represents entities(objects). Carefully select and pick out the necessary nouns(entities/objects) and verbs(relationships).

This is a sample user story I will be using Readme

ER Model Approach

Entities(Objects)

  1. Books
  2. Book copy
  3. Patron

Relationships:

  1. Loan
  2. Reservation

Attibutes(Properties):

  1. ISBN, Title, Author, Name, Due date, Date of reservation, copy #, loan1, loan2, library card #.

Primary Keys:

Attributes that can uniquely identify an entity

  1. ISBN
  2. Library card #
  3. Copy #

ER Diagram

Alt Text

Relational Diagram

Alt Text

Drawing tool:

Lucid

Conclusion:

The ER Model is based on real life scenarios; creating relationships between entities base on their real life applications.

The Relational Model is an approach in database design that organizes data base on first principle predicate logic. This organization primarily is in forms of tables.

Discussion

pic
Editor guide
Collapse
yusufcodes profile image
yusufcodes

Thanks for sharing this. I'm gonna be doing this for my final year project, and this sums it up well!

Collapse
yunweneric profile image
Erickeyz Author

Glad to be of help. Thanks for your feedback