Page 245 - Touhpad Ai
P. 245

Types of Data Models
                 As the need to store and use data has grown, different types of data models have been developed. Each type is used in
                 different situations depending on the kind of data and how it is used.


                 Hierarchical Data Model
                 In the Hierarchical data model, data is stored in a tree-like structure, where one main item (called the parent) is linked
                 to many others (called children). In the hierarchical model, each parent can have many children, but each child has only
                 one parent.
                 Example: Think of a school. The principal is the parent, and under them are teachers (children). Each teacher can have
                 multiple students, but each student belongs to only one teacher.
                 This model was used in old systems like IBM’s IMS and is still used in some places like XML files and geographic systems
                 (GIS). However, it's not as flexible as modern models.

                 Relational Data Model

                 In this model, data is stored in tables (also called relations). Tables in a relational data model are connected using a
                 common field, like an ID. Each table has rows and columns. This model helps keep data organised and reduces repetition.
                 Example: One table stores student data:

                                                   Student_ID     Name         Class
                                                      101         Sonia          11A

                                                      102          Parul         11B

                 Another table stores exam scores:

                                                   Student_ID    Subject       Marks
                                                      101         Maths          88
                                                      102         Science        90


                 We can connect these two tables using the Student_ID.
                 Relational databases use SQL (Structured Query Language) and are widely used in shopping systems, banking, and
                 schools because they keep data organised and avoid repetition. It is often used to manage and query data in relational
                 databases.

                 Entity-Relationship (ER) Model
                 This model uses diagrams to show how data items (called entities) are related to each other.

                 Example: An ER diagram might show that:
                 u  A Student enrolls in a Course
                 u  A Teacher teaches the Course

                                     Teacher                Teaches                Student

                                     Teacher                                       Student

                                    Teacher_ID                                    Student_ID
                                      Name         Entities                         Name         Entities
                                      Subject                                       Class



                                                                            Data Modelling and Simple Linear Regression  243
   240   241   242   243   244   245   246   247   248   249   250