Page 274 - Trackpad 402_Class-X_Final
P. 274

Set primary key: In this step you have a choice of either creating a new Primary key or using an existing field as a        The list of the field properties available for Numeric Data types are:
        Primary key.                                                                                                                  •  AutoValue: Its auto increment numeric unique value that is automatically inserted in the field when a new record is
        Step 8:  In our example, we choose BookID – an existing field as a Primary key.                                                 added into a table. In most of the cases it's the primary key of the table. The user cannot enter data in the field that
        Step 9:  Click on Next> button to move to the next step.                                                                        is assigned as AutoValue. It has the drop-down that contains “Yes”.
                                                                                                                                      •  Length: It defines the maximum length a field can have to hold a value. This option is not allowed to modify when
                                                                                                                                        the Auto Value property is set to “Yes”. For example, the field “Section” should be only single alphabet, the Length
                                                                                                                                        of the field can be “1”.
                                                                                                                                      •  Default Value: It’s the default value that can be assigned in the field. While data entry user can make a change in it.
                                                                                                                                        For Example the field “Marks”, can be assigned a default value 30. This option will not be available, when the Auto
                                                                                                                                        Value property is “Yes”.
                                                                                                                                      •  Decimal Places: It specify the number of decimal places in a numeric field. For example, if you fix decimal places as
                                                                                                                                        2 for salary then you are allowed to enter salary as 3456.78.
                                                                                                                                      •  Format Example: It allows the user to change how the data in a field will be displayed in the Table Data View.
                                                                                                                                      The list of the field properties available for Character Data types are:
        Create table: This is the final step of creating table.                                                                       •  Length: It defines the maximum length a field can have to hold a value. For example, the field “Section” should be

        Step 10: Give the name of your choice Books issued and select any of the three options:                                         only single alphabet, the Length of the field can be “1”.
                •  Insert data immediately                                                                                            •  Entry Required: The field with Entry Required as “Yes” means that the field cannot be left blank. The user needs to
                •  Modify the table design                                                                                              enter data in this field. It contains a drop-down “Yes”/“No”. The default value for this property is “NO” which means
                •  Create a form based on this table                                                                                    the field if left blank will contain a NULL(empty/nothing) value.
        Step 11:  Select Insert data immediately and click on Finish button to end the process of creating a table through a          •  Default Value: It's the default value that can be assigned in the field. This value gets automatically added in a field
                wizard.                                                                                                                 at the time of adding a record in a table. The user if want can make a change in it. For example the field “Title”, can
                                                                                                                                        be assigned a default value “Ms”.
                  As we have selected Insert data immediately so the given window Table Data View will be displayed where             •  Format Example: It allows the user to change how the data in a field will be displayed in the Table Data View.
                you start the process of adding new records in the newly created table Books Issued.


                                                                                                                                              DATA TYPES IN DATABASE

                                                                                                                                      Data types help you define the type of the data that can be stored in a field/ column. Data types in OpenOffice Base
                                                                                                                                      are broadly classified into five main categories, which are as follows:

                                                                                                                                      Numeric Types

                                                                                                                                      The numeric data types are used to store data in the form of numbers which can be integers or numbers with decimals.
                                                                                                                                      Arithmetic operations can be performed on numeric data.
                                                                                                                                      We can use these data types for creating fields like RollNo, Phone number, Marks, Year of Joining, Salary, Cost, Amount
                                                                                                                                      or any other numeric value.

                                                                                                                                      The list of available numeric types is:
        Field Properties
                                                                                                                                                  Data Type               Name                              Description
        Field properties provide extra functionality to the fields created in a table. You can set the field properties using the
        given different methods:                                                                                                            Yes/No                 BOOLEAN               Values as 0 or 1. Example: True or False, Yes or No.
        At the time of designing the structure of the table in the design view you can side by side change the field properties.            Tiny Integer           TINYINT               Store integer range between 0 to 255
        OR                                                                                                                                  Small Integer          SMALLINT              Store integer range between -2  to + 2 -1
                                                                                                                                                                                                                     15
                                                                                                                                                                                                                            15
        Step 1:  Select the table
                                                                                                                                                                                                                     31
                                                                                                                                                                                                                            31
        Step 2:  Right-click on table. The context menu will open.                                                                          Integer                INTEGER               Store integer range between -2  to + 2 -1
        Step 3:  Select Edit option from the menu.                                                                                          Big Integer            BIGINT                Range between -2  to + 2 -1
                                                                                                                                                                                                         63
                                                                                                                                                                                                                 63
                The table Design View window will open. You can edit the structure along with the field properties.
          274   Trackpad Information Technology-X
   269   270   271   272   273   274   275   276   277   278   279