Page 33 - CT_AI_Class-5
P. 33

Example with the Student Table:

                 If you sort the student table by Total Marks from highest to lowest, it will look like
                 this:

                    Student ID             Name                 Class                City           Total Marks
                        003           Priya Iyer                 5A           Chennai                    493
                        001           Aanya Sharma               5A           Mumbai                     485

                        002           Rohan Mehta                5B           Delhi                      472
                        004           Kabir Singh                5C           Kolkata                    461

                 In this case, Priya Iyer, who has the highest marks, comes first. Sorting is useful
                 when you want to find the highest or lowest value in a list, like finding the top scorer

                 in a class.

                 Filtering

                 Filtering means showing only the rows that match a condition you set and hiding
                 everything else. For example, you can filter the student table to show only students
                 in Class 5A or only those who scored more than 480 marks.

                 Example with the Student Table:

                 If you filter the student table to show only students from Delhi, it will look like this:

                    Student ID             Name                 Class                City           Total Marks
                        002           Rohan Mehta                5B           Delhi                      472

                 Now, you only see students from Delhi. Filtering is useful when you want to look at

                 specific parts of the data, like seeing all the students in a certain city or only those
                 who scored above a certain number.

                 Databases in Everyday Life


                 Databases quietly power many of the services you rely on every day. Some examples
                 that might feel familiar to you are listed below:

                 œ œA school library database that stores the name, author and availability
                    of every book in the collection.

                            œ œA  hospital database that  keeps  a record  of every  patient’s  medical
                               history, medicines and test results.

                 œ œAn app like BookMyShow that tracks which cinema seats have been
                    booked and which are still available.

                            œ œA  game server that saves your progress,  high scores and unlocked

                               levels so you can continue from where you left off.




                                                                                      Good Data and Bad Data       31
   28   29   30   31   32   33   34   35   36   37   38