MySQL

Chapter 8 - RDBMS Concepts

SQL ERD Data Model Assignment - Company Management System


ERD Data Model Assignment for Beginners in MySQL

Introduction to ERD (Entity-Relationship Diagram)

An Entity-Relationship Diagram (ERD) is a visual representation of the data model of a database. It displays the relationships between the tables (entities) in the database and how they interact with one another through attributes (fields) and relationships (keys). For a Company Management System, an ERD helps in understanding how various entities such as employees, departments, projects, clients, and suppliers interact in the database.

What You Will Learn

In this assignment, you will:

  • Understand what an ERD is and why it's useful.
  • Learn how to create an ERD for a MySQL database using a tool.
  • Design an ERD based on a set of predefined table definitions for a Company Management System.

By the end, you will be able to create a database design using ERD and implement it in MySQL.


Tools for Creating ERD in MySQL

To create an ERD for your database, you can use one of the following tools:

  • MySQL Workbench: A popular tool provided by MySQL that includes a visual ERD designer.
  • dbdiagram.io: A free online tool that allows you to draw ERDs and export them for MySQL.
  • Lucidchart: A web-based tool that supports database diagramming, including MySQL.

For this assignment, MySQL Workbench is recommended. It integrates directly with your MySQL database, allowing you to design, forward engineer, and implement your ERD in MySQL.


Objective of the Assignment

You are required to design a Company Management System database by defining its tables, attributes, constraints, and relationships. This will involve:

  1. Creating multiple tables like Department, Employee, Project, Client, and others.
  2. Establishing relationships such as foreign keys between tables.
  3. Defining primary keys, constraints, and indexes to ensure data integrity and performance.

Assignment Tasks

Construct all the tables from Chapter 5 DDL assignment within the ERD diagram using an ERD tool.

  • Begin by creating each table, then define the columns within the table on the ERD tool canvas.
  • Specify the DATA TYPES and NULLABILITY for all columns.
  • Set PRIMARY KEYS for the tables.
  • Define auto increment (IDENTITY) columns as needed.
  • Establish FOREIGN KEY relationships where necessary.
  • Define INDEXES where applicable.
  • Implement CHECK constraints as needed.
  • Define DEFAULTS where applicable.
  • Refer to Chapter 5 DDL assignment for detailed instructions on tables and columns (https://tansyacademy.com/mysql/data-definition-language-sql-ddl/sql-ddl-assignment-company-management-system-project).

Submission Instructions

  1. ERD Design:

    • Option 1: Export your ERD as a PDF using pgAdmin 4.
    • Option 2: Export the ERD as a DDL SQL script.
  2. SQL Scripts:

    • Submit SQL scripts for creating tables, constraints, indexes, and relationships.
  3. Documentation:

    • Provide a brief explanation of the relationships between the tables and your design decisions.

Good luck with your assignment!

PARTIAL DATA MODEL FOR Company Management System SQL ASSIGNMENT

i

Comments(0 comments)

Comments Not Found