What is Data Modelling?
Data Modeling
The process of creating a visual representation of the data and its relationships within a database.
- By data modelling, we can organize and structure the data in a clean manner.
- This ensures efficiency, accuracy, and scalability.
Why is Data Modelling Important?
- Clarity and Organization: It provides a clear blueprint of how data will be stored, making it easier to understand and manage.
- Efficiency: Proper modelling reduces data redundancy and ensures data integrity.
- Scalability: A well-designed model can easily accommodate future changes or expansions.
- Communication: It serves as a common language between developers, designers, and stakeholders.
Scenario: Data Modelling a School
- Step 1: Identify Entities and Attributes
- Student : StudentID , StudentName , Email
- Course : CourseID , CourseName , Credits
- Instructor : InstructorID , InstructorName , Department
- Step 2: Define Relationships
- A Student enrolls in a Course.
- An Instructor teaches a Course.
- Step 3: Create Tables
| Student | Course | Enrollment |
|---|---|---|
| StudentID | CourseID | StudentID |
| StudentName | CourseName | CourseID |
| Credits | EnrollmentDate |
- Step 4: Establish Keys
- Primary Key : StudentID in Student , CourseID in Course
- Foreign Key : CourseID in Enrollment links to Course