Page 95 - Viva ICSE Computer Studies 7 : E-book
P. 95

Data Types

                    A data type declares the type of data a particular fi eld can be used for. Once the data type for
                    a fi eld is specifi ed, another type of data cannot be entered for that particular fi eld. Let’s learn
                    about a few data types.
                      •  AutoNumber: The AutoNumber fi eld creates a sequential number on creation of a new
                          record. It is mainly used as a primary key. The value in AutoNumber fi eld cannot be
                          changed.
                      •  Short Text: The Short Text data type contains values that are in the form of text or a
                          combination of text and numbers that does not require calculations with the maximum
                          length of 255 characters. This fi eld stores values like addresses and phone numbers.
                      •  Long Text: The Long Text data type contains values that are in the form of text and
                          numbers with the maximum length of 65536 characters.  This data type is used for
                          descriptive fi elds.
                      •  Number: The Number data type can store numeric values up to 16 bytes of data. The
                          numeric values are used for calculations.
                      •  Date/Time: The Date/Time data type is used to store date and time data up to 8 bytes.
                          Information like data of birth, date of joining and data of leaving can be added with this
                          data type. Calculations with respect to date and time can also be performed here.
                      •  Currency: The Currency data type stores values in a monetary format which can be used
                          for fi nancial data. This fi eld can have values up to 8 bytes.
                      •  Yes/No: The Logical data type is used when only one of the two given values is valid—
                          Yes/No,  True/False or Male/Female.
                      •  OLE Object:  The OLE Object data type is used to insert spreadsheets, documents,
                          presentations, etc. created in other Windows-based programs.
                      •  Hyperlink: The Hyperlink data type is used to store web addresses.
                      •  Attachment:  The Attachment data type is used to attach images, spreadsheets,
                          documents, charts and other types of supported fi les to the records as an attachment in
                          the database.
                      •  Calculated: The Calculated data type is used to create fi elds which calculate the values.
                      •  Lookup Wizard: The Lookup Wizard creates a fi eld whose values are chosen from the
                          values in another table, query or a list of values. It displays a list of values you can choose
                          from.

                    Setting Data Type for a Field

                    The data type for a fi eld can be set in either Design view or Datasheet view.
                    Setting Data Type in Datasheet View
                                                                                                   Step 2
                    Follow these steps to set data type in
                    Datasheet view.

                      1.  Open the table in the ‘Datasheet’ view.
                      2.  Click on the Click to Add header and
                                                                     Step 1
                           select the desired data type from the
                           drop-down menu.



                                                                                                                    83
   90   91   92   93   94   95   96   97   98   99   100