Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 74 - Modular_V2.0_SQL_Flipbook
P. 74

    Project 5                                                                        21 st  Century   #Critical Thinking
                                                                                                       Skills  #Initiative
                  Create a table named COMMODITY with the following structure:

                                                           Table-COMMODITY

                              Name                   Data Type                           Description
                     Commodity_id              INT(10)                  Commodity number (Primary Key)

                     Comm_name                 VARCHAR(20)              Name of the commodity
                                                                        Category  to which the commodity  belongs
                     Category_id               INT(10)
                                                                        (Foreign Key)
                     Price                     INT(10)                  Price of commodity
                     Quantity                  INT(10)                  Number of items left in stock

                     Discount                  INT(3)                   Discount available of the commodity

                     Brand                     VARCHAR(20)              Brand of the commodity
                     Color                     VARCHAR(20)              Color of the Commodity

                     Size                      VARCHAR(20)              Size of the Commodity
                     Seller_id                 INT(10)                  Seller of the Commodity (Foreign Key)

                     Description               VARCHAR(20)              Description of Commodity
                     Write the query to insert 10 records in the above table.

                     Write the query to display all the records from the table.
                     Write the query to update the quantity by 20% where the price is less than 500.

                  Project 6                                                                         21 st  Century   #Critical Thinking
                                                                                                        Skills
                                                                                                            #Initiative
                  Create a database named IndianFoods. Create a table named Foods with the following structure:

                               Name                   Data Type                            Description

                      Food_name                 VARCHAR(20)              Name of the food
                                                                         Name of the state from which  the  food
                      State                     VARCHAR(20)
                                                                         belongs
                      Price                     INT(10)                  Price of the food

                     Write the query to insert any 10 records.
                     Write the query to increase the price of the food by 50 rupees where the state is Delhi.
                     Write the query to delete all records from the table.

                    72
                          Touchpad MODULAR (Ver. 2.0)

| 69 70 71 72 73 74 75 76 77 78 79 |