IT unit 3
IT unit 3
To create table using Design View, in main Database window, click on the
option Create Table in Design View in the Tasks Pane and Table Design Window
will be opened.
The screen is broadly divided into two sections or horizontal panes. The upper
half consists of a grid structure with three columns Field Name, Field Type and
Description.
• Field Name – It is the name of the field assigned at the time of creation of table.
• Field Type – It allows to assign a data type to the field.
• Description – It allows to describe the purpose of the field. It is not the part of database table,
but it is meant for the user to understand the purpose of the field. We may or may not enter
field description.
Setting the Primary Key
• every table must have a primary key that uniquely identifies a record
in the table. To make a particular field as the primary key, place the
mouse pointer before the field name, say Event Id in our above
example and right click. A pop up menu appears. 2023-24 166
Domestic Data entry operator – class X Select the Primary Key option
from pop up menu as shown in Fig. 9.16. A key icon appears before
the field name indicating that it is a primary key
Saving a Table
• After creating the table you need to save it on the disk. To save the
table click on the save button or follow menu option File > Save As. A
Save As dialog box is displayed as shown in Fig. 9.17. Enter the name
of table and click on OK button
Tip: Press Ctrl + S to save the table or click Save icon from
the toolbar. If the table is being saved after making some
changes, simply select File-> Save option.
• Sorting Data in the Table Data in a table can be arranged in ascending
or descending order. This process of arranging the records in
particular order on any filed is called as sorting.
• Closing LibreOffice Base To close the application window of
LibreOffice Base, click on the File > Close or click on the cross (x)
button of the LibreOffice Base window.
Working with Multiple Tables
Editing and Deleting Tables
It is possible to copy, rename, edit and delete the table of database by right clicking
on the table name and using the appropriate option from the pop up menu.
Editing a table involves the task such as adding a new field or removing any field in
a table or to alter any of the field properties. To edit a table, open the Database
User Interface window. Selecting the Table object in Database Pane, the list of
tables will be displayed in the Table Area. Right click on the table name and select
Edit option from the pop menu.
Similarly to delete a table, right click on the table to be deleted. A confirmation box
to confirm for deletion of the table will be displayed. Click on Yes button to finally
delete the table.
To rename a table, right click on the table name in the Table Area and select
Rename.. option from the pop up menu. A cursor will appear. Type the new name
and press the Enter key.
Relationships between Tables
• The most important prerequisite for setting a relationship is that
there must be a common field(s) between the two tables to create a
relationship.