Page 509 - Computer_Science_F5
P. 509

Computer Science  DROP: Delete a database, table,  Deliverables:
           index, or view
                                                       Prepare a brief report tha includes the
           In the context of the farming database
                                                      following:
           example,  assume you want to use the
                                                      (a) Documentation: Detailed
           DROP statement  to delete an index in
          FOR ONLINE READING ONLY
                                                         documentation of  the  process
           the “crops” table.
                                                         involved in dropping an index from
                                                         the “crops” table in the farming
                 Activity 8.26:                          database.

                                                      (b) Screenshots: Screenshots or output
             Deleting an Index from a SQL
             database                                    from the SQL client or online SQL
                                                         editor showing the execution and

            Aim:                                         successful dropping of the index.
            Understanding how to delete an index      (c) Reflection: A brief reflection on
            from a database table using the DROP         the significance of using the DROP
            statement.                                   statement in database management,

                                                         discussing potential benefits and
            Materials:                                   considerations when modifying
            Computer with Internet access;               database structures.
            MySQL client  or command-line
            interface (such as MySQL Workbench,       Finally, document all your workings
            phpMyAdmin) or access to an online        in a portifolio.
            SQL editor (Such as, W3Schools)

                                                     PHP Fundamentals
            Instructions:
            Step 1: Open your SQL client  or         PHP (Hypertext Preprocessor) is widely
                    online SQL editor.               used for developing dynamic websites
            Step 2: Use the following SQL            and interacting with databases. By
                    command  to drop an index        understanding  PHP,  you  can  create
                    from the “crops” table.          dynamic web pages, handle user input,
                    Codes look as:                   and manipulate data stored in databases

             DROP INDEX idx_crops_name ON            more effectively. This is done effectively
             crops;                                  with earlier covered basic understanding
                                                     of HTML which is the markup language
            Step 3:  Verify that the index has
                    been dropped by checking         used for creating website structure, CSS
                    the structure  of the “crops”    which  is responsible  for styling  web
                    table. Codes look as:            pages, and databases which stores and
                                                     organises  data  efficiently  for  different
              SHOW INDEX FROM crops;
                                                     applications.

                                                 500
                                                                for Advanced Secondary Schools



     Computer Science Form 5.indd   500                                                     23/07/2024   12:35
   504   505   506   507   508   509   510   511   512   513   514