RBreedvbeld / csharp-data-modelling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C# Data Modelling Exercise

Learning Objectives

  • Explain that an Entity Relationship Diagram is used to visualise and define the implementation of a database
  • Use user stories to design conceptual data models
  • Use conceptual data models to design logical data models
  • Use logical data models to design physical data models

Instructions

Fork the repo as normal.

Create the Entity-Relationship Diagrams using whichever tool you feel works best for you.

Once you have a solution for each activity add it to this repo as an image.

Push your repo once you have completed the activities and create a Pull Request as normal.

Core Exercise - Hotel Booking System

Epic

”A local hotel wants to keep a record of room bookings. The hotel has a lot of rooms, but customers will only be able to choose one room per booking. The person who books the room is not necessarily the person providing contact details.”

User Stories

  • As a customer, so I can have a place to stay tomorrow night, I want to book a room at the hotel.
  • As the hotel owner, so I can expand my business, I want to add new rooms to the hotel.

Design a simplified booking system for this epic.

Extension Exercises

Come up with User Stories (and possibly a more detailed Epic) for each of the following scenarios.

Then design the database tables and relationships which would be needed to implement them.

  1. A local candle maker wants to open an online store selling their handmade candles and other artifacts, they need a database system to use as part of this online shop. Details of customers need to be stored, products need to be stored and updated, a record of customer orders also needs to be maintained. Design the database system for the Candle Shop.

  2. A restaurant wants to introduce an online booking system for their main dining room, which has various tables. The restaurant is open throughout the day so customers can book for a variety of times.

  3. A University library wishes to implement an online system for borrowing books and other items from the library. Each user will be able to borrow up to 6 items at a time.

  4. When they originally launched Social Media sites such as Twitter, Identica, Diaspora and Mastodon all described themselves as micro-blogging sites, design a database schema for a similar micro-blogging Social Media site.

  5. Think about an online learning system as used by a school, a university or a coding bootcamp, design the database tables etc that might be required to implement such a system.

About