Page 26 - Modular_V2.0_SQL_Flipbook
P. 26

Periodic Assessment-1

                                                       (Based on chapters 1 & 2)


              A.    Identify the correct command used for the given operations.
                    1.  To create a new table in the database.                                            ……………………

                    2.  To modify the structure of an existing table.                                     ……………………

                    3.  To retrieve data from a table.                                                    ……………………
                    4.  To update existing records in a table.                                            ……………………

                    5.  To grant user privileges on a database.                                           ……………………

                    6.  To save changes made in a transaction.                                            ……………………
                    7.  To remove a table and its data.                                                   ……………………

                    8.  To delete specific records from a table.                                          ……………………

              B.    Choose the most appropriate data type in MySQL for each case.

                    1.  You need to store a product's price, such as 15.99.                               ……………………

                    2.  You need to store the full name of an employee, but the length of the name
                        can vary.                                                                         ……………………
                    3.  You need to store a user's birthdate in the format YYYY/MM/DD.                    ……………………

                    4.  You are creating a database to store the exact time a meeting starts, such as
                        14:30:00.                                                                         ……………………

                    5.  You need to store a person's age, which is a whole number (e.g., 25).             ……………………

              C.    Define the following terms:

                    1.  NULL Constraint

                        …………………………………………………………………………………………………………………………………………………………
                    2.  NOT NULL Constraint

                        …………………………………………………………………………………………………………………………………………………………

                    3.  Primary Key Constraint

                        …………………………………………………………………………………………………………………………………………………………
                    4.  Composite Primary Key

                        …………………………………………………………………………………………………………………………………………………………

                    5.  Unique Constraint
                        …………………………………………………………………………………………………………………………………………………………






                24
                      Touchpad MODULAR (Ver. 2.0)
   21   22   23   24   25   26   27   28   29   30   31