Page 458 - Computer_Science_F5
P. 458

FOR ONLINE READING ONLY














                        Figure 8.13: Selection and Projection operations in a relational database  Chapter Eight: Databases and Database Management Systems



                    Activity 8.4:
                                                         “Select  Fname,  job,  hiredate,  sal
                Applying selection and projection        From emp Where deptno=30” based
                Operations                               on Figure 8.13. Visualise and interpret
               Aim:                                      the resulting  dataset  in a structured
               To practice  and understand database      format similar to the referenced figure.
               query operations  such as selection       Step 1: Understanding Selection and
               and  projection through practical                 Projection
               application  and analysis of SQL                  Familiarize  yourself with
               queries on a specified dataset.                   the concepts of selection

               Materials:                                        (filtering rows) and projection
               1.  Computer with database                        (selecting  specific  columns)
                   management system (DBMS)                      in database queries.
                   software (e.g.,        MySQL,         Step 2: Analysing the query
                   PostgreSQL)                                   Study the SQL query “Select
               2.  Access to the “emp” table or                  Fname, job, hiredate,  sal
                   relevant dataset used in Figure 8.13          From emp Where deptno=30”
               3.  Pen and paper or digital tools for            and its components. Identify
                   documenting query results                     the columns being selected

               Instructions:                                     (projection) and the condition
               Implement  the  concepts  of selection            for filtering rows (selection).
               and projection by analyzing the query


                                                    449
               Student’s Book  Form Five



     Computer Science Form 5.indd   449                                                     23/07/2024   12:34
   453   454   455   456   457   458   459   460   461   462   463