Page 62 - 2611_SmartGPT Pro V(5.0) C-8
P. 62

See the following tables:

                                                              Order Table

                                  Order_ID          Product_ID           Order_            Customer_
                                                                        Quantity             Name


                                     O001               P101                 2          Aarav Sharma
                                    O002                P102                 1          Priya Patel
                                    O003                P101                 1          Rahul Verma
                                    O004                P103                 3          Sneha Iyer

                                                             Product Table


                                Product_ID           Product_              Price              Stock_
                                                       Name                                  Quantity


                                    P101         Laptop                   50000                  20
                                    P102         Smartphone                25000                 50

                                    P103         Headphones                 1500                100
                                    P104         Mouse                      800                 200

                     Now, answer the following questions:
                     (a)  Name the primary key in the Product Table.
                     (b)  How many records or tuples exist in the Order Table.

                     (c)  Name the key that creates the relationship between the Order Table and the Product Table.








                            INTRODUCTION TO SQL

                  SQL stands for Structured Query Language. It is the standard language for managing relational

                  databases and performing various operations on the data in the tables. SQL enable us to store,
                  retrieve and manipulate data in the form of tables.


                                    High                                           Integrates
                       Easy to    Performance   Free of                Provides      with       Ensures     Enables
                        use         and         Cost        Offers       High       Various      Data      Multi-user
                                  Efficiency              Portability   Security   Platforms    Integrity    Access



                                                            Key Features of SQL




                   60   Computer Science (V5.0)-VIII
   57   58   59   60   61   62   63   64   65   66   67