Class 10 Creating and Using Tables in Open Office Base Notes

Class 10 Creating and Using Tables in Open Office Base Notes by J.D Sir


How to create a database using Open Office

  • Step 1 : Click on Start > Programs > OpenOffice > OpenOffice Base
  • Step 2 : Click on Create a new database
  • Step 3 : In the Database Wizard, Click on Finish
  • Step 4 : Specify a the Name of database and click on Save

How to create a table in Database

The database’s tables are used to store data. In the database, In OpenOffice Base the tables can be created in two different ways.

  1. Create Table in Design View
  2. Use Wizard to Create Table
  1. Create Table in Design View

    • Step 1 : Click on Create Table in Design View
    • Step 2 : Select Field name and suitable datatype
    • Step 3 : Set the Primary Key
    • Step 4 : Change the table name
    • Step 5 : Save the table
  2. Use Wizard to Create Table

    • Step 1 : Click on Table > Use Wizard to Create table 
    • Step 2 : Click the Select Fields > Choose Category > Select the table > Click on Next Button
    • Step 3 : Select data types from the given field
    • Step 4 : Set the Primary Key 
    • Step 5 : Rename the table and Click on Finish

Class 10 Creating and Using Tables in Open Office Base Notes by J.D Sir


Data Types

The type of data (value) that will be stored in the database is defined by its datatype. Important to know the different types of data helps to ensure that each property’s value is as expected and that data is collected in the correct format.

Data types in OpenOffice base are broadly classified into five categories listed below.

  1. Numbers – It stores numeric values having integers and fractional numbers.
  2. Alphanumeric Types (Text) – It holds the textual data with the combination of numbers and digits and special characters.
  3. Date-Time – The date-time data type is used to save the dates into a database field.
  4. Binary – Binary types stores large types of data such as images, audio or video files.
  5. Other Variable – Other variable types can have data of other remaining objects.

In the next section of Data types in Base Class 10 IT 402 let’s talk about details about above numeric types.

Numbers

Open Office Base Provides following different types of Numeric data types:

  1. BOOLEAN: Boolean is a data type which can store Yes/No type values in the form of 0 or 1 in OO base table. You can also represent values such as True or False using this data type.
  2. TINYINT: It is used to store the numbers ranging from 0 to 255
  3. SMALLINT: It is used to store the number ranging from -32768 to 32767
  4. INTEGER: It is used to store the number ranging from -2147483648 to 2147483647
  5. BIGINT: It is used to store the number ranging from -9223372036854780000 to 922337203685479999
  6. NUMERIC: It stores a number with maximum precision of e(+/)-231
  7. DECIMAL: Its stores a decimal number with maximum precision of e(+/)-231
  8. REAL, FLOAT, DOUBLE: It is used to store a number from 2-1074 to (2-2-52*21023)

Class 10 Creating and Using Tables in Open Office Base Notes by J.D Sir


Text

Open Office Base provides following types of Text data types:

  1. LONGVARCHAR: It is a memo data type that allows long text into a field. It accepts UTF 8 pattern characters and the maximum length of the text is 2,14,74,83,647 characters.
  2. CHAR: It allows fixed-length character text into a column. It accepts UTF-8 pattern characters having 17 characters length by default. It pads with trailing spaces for short strings.
  3. VARCHAR: It stores text up to a specified length of characters. It doesn’t allow any type of padding. OO base accepts 20 characters length by default.
  4. VARCHAR_IGNORECASE: It little bit similar to varchar with one difference that it will ignore a specific case like capital or small as you type.

Binary Types:

Open Office Base provides following types of binary data types:

  1. LONGVARBINARY: This type will store a specific image with array of bytes i.e. images, sound files etc. without validation.
  2. BINARY(fix)/Binary: This is also used to store data into binary form.

Date/Time

Sometimes you need to store dates like date of admission, date of joining, date of birth, date of event, date of transaction with a specific time or without time. The date/time data types is used to store such dates in Open Office base tables.

Open Office Base provides following types of Date/Time data types:

  1. DATE: It stores a date in common format like month, day and year i.e. 1/1/99. The date ranges are 1/1/99 to 1/1/9999
  2. TIME: It stores a particular time in hour, minute and seconds format. The seconds since 1/1/1970.
  3. TIMESTAMP: It stores the value with and time together in the table field.

Class 10 Creating and Using Tables in Open Office Base Notes by J.D Sir


Other Data Types

In these types of data type, you can store any serialized objects of java like connector or specific script through objects. It is mostly used for the coding purpose only.

So here we have covered Data types in Base Class 10 IT 402. I hope you enjoyed this article.