0% found this document useful (0 votes)
5 views

Dbms Notes

The document provides an overview of Database Management Systems (DBMS) using LibreOffice Base, explaining the difference between data and information, the structure and advantages of databases, and various data models. It details key concepts such as tables, fields, keys, and data types, along with instructions for creating and managing databases and tables within LibreOffice Base. Additionally, it covers data entry, editing, sorting, and navigating through tables, ensuring users can effectively utilize the software for database management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Dbms Notes

The document provides an overview of Database Management Systems (DBMS) using LibreOffice Base, explaining the difference between data and information, the structure and advantages of databases, and various data models. It details key concepts such as tables, fields, keys, and data types, along with instructions for creating and managing databases and tables within LibreOffice Base. Additionally, it covers data entry, editing, sorting, and navigating through tables, ensuring users can effectively utilize the software for database management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

Database Management System

Using LibreOffice Base


Data and Information
Data are raw, unprocessed facts and figures that have no specific
meaning on their own.
Example: "25, 30, 45, Ayush, January, 85%"
Information is processed, organized, or structured data that has meaning
and is useful for decision-making.
Example: "Ayush scored 85% in January, and his average score is 45."

DATA INFORMATION
Raw, unprocessed Processed, meaningful
Databases and DBMS
A database is a collection of logically related data items stored in an
organised manner. The information being stored in a database can be added,
modified, deleted or displayed according to the requirements of the user.
OR
A database is an organized collection of data that is stored and managed
electronically. It allows users to easily store, retrieve, and modify
information. Examples: Storing library records.

DBMS
The software that is used to create, update and retrieve data from a
database is known as database management system (DBMS).
It facilitates planning and maintenance of the database for the user.
For Example: MS Access, LibreOffice Base, Oracle, MySQL.
Advantages of DBMS:
Organised Storage – The data in the database is stored in an organised
manner, so the retrieval of required data is fast and accurate.

Data Analysis – A database helps in analysis of data. It is easy to find


out maximum or minimum value, average or mean using a database.

Data Sharing – If the same data set is required for different


applications then the database can be shared with other applications.

Minimal Data Redundancy – DBMS stores each piece of data only once,
reducing unnecessary duplication and inconsistencies.

Data Consistency – By minimising data redundancy, chances of


inconsistent data being stored is reduced. For example, it should not
happen that the name of the student is changed in one table and not
in another. Such inconsistency is reduced by using a DBMS.
Increases Efficiency – Since database tables are properly organised,
saving, reading and searching data can be carried out efficiently.

Increases Accuracy – Since data redundancy and inconsistency can be


minimised in a database, the data is retrieved accurately from the
database.

Increases Validity – Properties of different data fields can be assigned


when a database is planned. So whether or not valid data is being
entered can be checked at the data entry stage. This increases the
validity of the database. For example age > 0.

Security – Unauthorised access can be controlled by assigning


passwords to the users. The data might be translated in such a manner
that unauthorised users are not able to read it. This is known as
encryption. Both these measures increase the security of the database.
Data Models
A database can be designed in different ways depending on the data being
stored. This structure of database is known as data model that describes
the manner in which data will be stored and retrieved. There are different
data models such as hierarchical data model, network data model and
relational data model.

Hierarchical Data Model


In this model the data is organized into a
tree like structure. The data is stored in the
form of records. A record is a collection of
fields and its data values. All these records
are linked to each other at various levels,
thereby forming a hierarchy.
For example, the data of a company is
stored using a hierarchical data model.
Network Data Model
The Network Model in DBMS is a database model that organizes data in a
way that records are connected to one another through relationships
represented as links. These links allow for complex many-to-many
relationships between records, making the model more flexible compared
to other models like the hierarchical model. In this model, data is structured
as a graph or network, where nodes represent records (entities) and edges
represent relationships between them.
Relational Data Model
This data model is based on the principle of setting relationships between
two or more tables of the same database. It is the most commonly used
database model.

The data elements are stored in different


tables made up of rows and columns.
The data in different tables are related
through the use of common fields.
So relations are set between tables
based on common fields. That is why this
model is termed as relational database
model.
Relational Database Terminology
Entity It is a real world object about which information is to be stored in a
database. Each entity is a collection of these attributes associated with it.
For example, if we want to store information about an entity Student in a
school, then we need to have his admission number, roll number, name,
father’s name, date of birth, etc. These details associated with the entity
are called attributes.

Table It is a collection of related data stored in a structured format,


consisting of rows and columns.
For example, the Employee table can have columns, namely name,
designation, department and have records or rows having data of 100
employees.
Field or Columns or Attributes
A field is the smallest entity in the database. A collection of fields make a
record, a collection of records make a table and a collection of tables
make a database. A field holds the data values of one type of data.
For example, in the Employee table the field “Emp Name” will hold the
names of employees of an organisation.

Data Values
Data values are the raw data represented in numeric, character or
alphanumeric form. Examples of data values are ‘Saurabh Bhatt’, ‘21’
‘readers venue’, “Uttarakhand”, “03-01-2024”, etc.

Record or Row
A record holds the data values of all the fields for a single person or object
in a table. It is presented as rows within a table.
Super Key
A super key is a column or a combination of columns that can uniquely
identify each row in a table.

Candidate Key
A candidate key is a minimal super key, meaning that it is a set of
columns that uniquely identifies each row in a table and cannot be
reduced further without losing its uniqueness property.

Primary Key
A primary key is a column or a set of columns in a database table that
uniquely identifies each row. It ensures that no two rows have the same
value in the primary key column(s), and it cannot contain null values.
In a table we use more than one fields to identify a record, it is known as a
composite key.
Super key mei vo saare attribute aa
jayenge jo har ek row ko uniquely identify kar
sake ( jaise aadhar card + pancard + name +
SUPER KEY phone no. + address.. in sab ka combo).
CANDIDATE
KEY
Ab super key mein extra attributes bhi hai
unko hata ke dekhe toh shirf aadhar card ya
pan card bhi toh ek insaan identify kar skta
Primary Key
hai baaki attribute ki kya jarurat.

Toh candidate key 1 - Aadhar card,


2 - pancard.

Out of all candidate keys ek ko primary key


choose kiya jaata hai.

Candidate keys mein se jinhe as a primary


key nahi choose kiya unhe alternate keys
kehte hai.
Key differences:
A super key can be any set of columns that uniquely identifies each
row, whereas a candidate key is a minimal super key.

A primary key is a chosen candidate key that is designated as the main


identifier for each row.

A table can have multiple candidate keys, but only one primary key.

Alternate Keys
It is a candidate key that is not chosen as the primary key, but can still be
used to uniquely identify each row.

Foreign Key
A foreign key is a field (or a combination of fields) in one table that refers
to the primary key in another table. It establishes a relationship between
two tables, ensuring data integrity by linking the records.
Objects of RDBMS
In DBMS, objects are the structures or components used to store and
manage data. They help organize, retrieve, and manipulate data efficiently.

Some key database objects:


Table It is the primary object used to store data in rows and columns.
Forms A form is a feature of a database using which we can enter data in
a table in an easy and user friendly manner. A form consists of text
boxes, checkboxes etc. The data entered through the forms is
stored in tables.
Queries A query is used to retrieve, update, or manipulate data stored in a
database. For example - SELECT * FROM Students.

Reports These are formatted and organized representations of data


retrieved from the database. Reports are used to extract and
display specific data in a meaningful and useful way, often for
decision-making, analysis, or informational purposes.
Starting with LibreOffice Base
Data Types
A data type refers to the type of data that will be stored in that particular
field. The memory size of a field varies according to its data type.

For example, names are stored in the form of text, age in numbers, fees
in decimal numbers, date of birth in date format and so on.

Text Data Type


The text data is a combination of letters, numbers or special characters.
No arithmetic calculations can be performed on text data. Examples of
text data type is PAN Card Number, Name, Marks, etc.
Numeric Data Type
Numeric data types consists of numbers. The numbers can be integer
or real numbers on which any type of arithmetic calculations can be
performed. For example, 10, -34.8, 90.6789 , -86 are of numeric data type.
Currency Data Type
The currency data type indicates the monetary values and can be stored
using currencies of various countries. For example $100, £ 500 or Rs. 25.50.

Date Data Type


This data type is used to indicate dates and time. For example 12/25/2019,
08:45 AM. The data and time can be stored in various formats.
Boolean
In boolean data type there can be only two values- True or False. This also
can be given in multiple formats like Yes/No, True/False, On/Off.

Binary
The Binary data type used to store digitized images and sounds that
comes as long string of zeros and ones.

Now let’s start using LibreOffice Base...


Follow the following steps to create the database.
1. Search for LibreOffice Base application and open it.
2. A Database Wizard open, it allows you to create a new database or open
an existing database.
3. Click Create a new database radio button or select Open an Existing
Database option to select the existing database to be opened. Then click
Next button.
4. Here, If we register the database, then our database is made public and
hence can be accessed by other people. This step also asks whether
you want to open the database for editing or want to create a table using
the wizard.
5. Click Finish button, the Save As dialog box appears. Browse for the drive
and folder where you want to store your database. Type the name in the
File name text box. Then, Click Save button. The database in Base is saved
with an extension .odb. If no name is given to the database, then it is
saved with a default name as NewDatabse.odb.
User Interface of LibreOffice Base
Title Bar – The title bar displays the name of a database and an application
in which it is made. The windows buttons to maximize, minimize or close
the window are located on the right corner of the title bar.
Menu Bar – The menu bar appears below the title bar. It consists of seven
menu items – File, Edit, View, Insert, Tools, Window and Help.
Standard Toolbar – It is located below the menu bar. It is used to access
frequently used tools.
Status Bar – It is located at the bottom of the interface window. It displays
information about the type of view of the object in the database.
Database Pane – The database pane is located on the left side of the
window. Depending on the object that is selected, the respective Task
Pane and Object Area displaying the created object appears.

THIS IS NOT IMPORTANT


Opening a Database
To open an already created database, click File > Open.
The Open dialogue box appears. Select the desired database and click on
Open button.
Use the keyboard shortcut key Ctrl+O to open an already existing
database.
Creating a Table using a Wizard
Choose "Create tables using the table wizard" when creating a new
database or select "Use Wizard to create a table" from the Tasks Pane.
In the Table Wizard, choose a table template from the Sample tables list
(e.g. "Customer") in the drop-down menu.
Move desired fields from Available Fields to Selected Fields using the >
button. To add all fields, use the >> button.
Click Next to configure data types and formats for each field as required.
Click Next, and specify the primary key for your table (e.g. set
"CustomerID" as the primary key).
Click Next, review the settings, and ensure "Insert data immediately" is
selected to start entering data after table creation.
Click the Finish button to complete the process. The datasheet view will
open, allowing you to input data into the newly created table.
Creating a Table in Design View
Click on Create Table in Design View option in the Tasks Pane and Table
Design Window will be opened
A grid structure with three columns will appear :
• 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 meant for
the user to understand the purpose of the field (not part of databse table).
Step 1: Type the first field name
Step 2: The Field Type column contains a list box. We can select the
desired data type from the list box.
Step 3: In the Field Properties Pane, set desired properties for the entered field.
Step 4: Press Tab key to move to the next column. Add any description if
you want in the third column.
Step 5: Repeat the process for adding all fields in the table.
Setting the Primary Key
To make a particular field as the primary key, place the mouse pointer
before the field name, and right click. A pop up menu appears. Select the
Primary Key option from pop up menu. A key icon appears before the field
name indicating that it is a primary key.
To set a composite key, i.e. a primary key consisting of two fields, keep
the Ctrl key pressed and then click on multiple fields to select them.
Thereafter right click on selected fields and choose Primary Key option
from the pop up menu.

Saving a Table
To save the table click on the save button or follow menu option File >
Save As. Enter the name of table in the dialog box and click on OK button.
Shortcut Key: Press Ctrl + S to save the table.
Entering Data in a Table
Step 1: Double-click or right-click and select "Open" on the desired table.
Step 2: The table opens in datasheet view with field names in the top row.
Step 3: Place the cursor in the first blank field of the second row and type data.
Step 4: Use the Tab key to move to the next field in the row.
Step 5: After filling all fields, the cursor moves to the next record (row).
Step 6: Use the horizontal scroll bar to access hidden fields if there are many.
Step 7: Continue adding records, and verify data before saving.

Navigating Through the Table


The black pointing arrow before a field name indicates the current record. To move
through table records, use the Navigation Box at the bottom of the datasheet window.
Components of the Navigation Box:
Record Selector Box: This is the text box displaying the current record number.
You can type a record number here to jump to that record.
Navigation Buttons: Used to move through records in the table.
Editing Data
Place the cursor on the field, make the changes, and enter the new value.
The Edit icon appears next to the record being edited and stays visible
until changes are saved.
Press Esc to cancel changes and restore the original data.

To delete a record:
1. Select the record.
2. Use one of the following methods:
Press the Del key.
Select Delete Record from the Edit menu.
Right-click the record and choose Delete Rows.
3. A confirmation box will appear:
Click Yes to delete the record. OR Click No to cancel.
Sorting Data in a Table
Sorting arranges table records in ascending or descending order based on a
selected field.
Steps to Sort:
1. Open the table and select the field to sort.
2. From the toolbar:
Click Sort Ascending (A-Z icon) for ascending order.
Click Sort Descending (Z-A icon) for descending order.
The table will sort accordingly.
3. For Multi-Field Sorting:
Click the Sort icon to open the Sort Order dialog.
Select fields, choose ascending or descending order, and click OK to apply.

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.
Editing and Deleting Tables
To edit a table, open the Database User Interface window.
Right click on the table name and select Edit option from the pop menu.
To delete a table, right click on the table to be deleted, and select the Delete
option from the pop up menu.
A confirmation box will be displayed, click on Yes button 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. Type the new name & 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.

PRIMARY KEY MASTER TABLE

MASTER Record

Transaction table
PRIMARY KEY

Transaction
Record
Foreign Key
Types of Relationships

One specific record of a master table has one and only


One-to-One one corresponding record in the transaction table.
Types of Relationships

One specific record of the master table has more than one
One-to-Many corresponding records in the related transaction table.
Types of Relationships

There are multiple records in the master table that


Many-to-Many correspond to multiple records in the transaction table.
Advantages of Relating Tables in a Database
A relationship can help prevent data redundancy.
It helps prevent missing data by keeping deleted data from getting out of sync.
Creating relationships between tables restrictsthe user from entering invalid
data in the referenced fields.
Any updation in the master table is automatically reflected in the transaction tables.
Creating Relationships between Tables
Step 1: From main menu, click on Tools > Relationships
Step 2: The Relationship Design screen will appear.
In the middle of the screen there is Add Tables dialog box. Events

Step 3: Add Events table and EventCategory table to


the Relationship Area.
Step 4: Close the Add Tables dialog box. The tables
Events and EventCategory table will added to the
Relationship Area along with all its field. EventCategory
Step 5: Drag the common field CategoryID from the
Events table and drop it in EventCategory table.
A line connecting both the tables with the common
field (CategoryID) appears on the screen.
Master Table & Transaction Table
Primary Key
EventCategory

Referenced
table

Foreign Key
Primary Key
Event

Referencing
table
Referential Integrity
According to the principle of referential integrity, no unmatched foreign key
values should exist in the database. If a record is removed from the parent table,
the corresponding records in the child table must also be updated or deleted.

LibreOffice Base gives us 4 options to maintain referential integrity:

No action This is the default option. This option states that a user should
not be allowed to update or delete any record in the master
table if any related record exists in the transaction table.

Update cascade This option allows the user to delete or update the
referenced field but along with it all the related records in
any of the transaction tables will also be deleted or updated.
This option assigns NULL value to all the related fields if the master
Set NULL
record is deleted or updated.
This option assigns any fixed default value to all the related fields
Set default
if the master record is deleted or updated.
To set the relationship properties double click on the relation line joining
the two tables. A Relations dialog box will open.
By default the radio button with No action option will be selected.
Choose any of the desired option and click OK to set the referential integrity
between the two tables.
Queries
Using a query, we can retrieve and display data from one or more tables in a
database.
Using a query, we can specify the fields that we want to display and also the
criterion based on which the records to be filtered.
The result of the query is displayed in tabular form.

Creating a Query
A query can be created in three ways.
1. Using a Wizard
2. In Design View
3. In SQL view
Creating a Query Using a Wizard
To execute query, we wil use two tables- Events and EventCategory.
We will create a query that will display the Event Name and Winner for each
event with CategoryID as C001.

Step 1 In the Database Design window, click on Queries button present in the
Database Pane on the left.
Step 2 In the Tasks Area, click on Use Wizard to Create Query Option.
The Query Wizard window will appear. It contains the Steps Pane on the
left and the Query Details Area on the right.
Step 3 The first step of the wizard is to select fields from the respective tables.
Select Events table from the Tables list box.
Step 4 Select Event Name, Winner and CategoryID field from the list box and click
the right arrow (>) button to move all fields to Fields in the Query box.
Step 5 Clicking on the Next button will display the screen to select the sorting
order. The result of the query can be displayed in ascending or
descending order of any particular field of the table.
If we do not want any particular order, we can directly click on Next.
Step 6 The next step is to set the search conditions or the criteria on the basis of
which records will be filtered from the table.
Step 7 Select CategoryID field from Fields drop down list, is equal to from
Condition drop down list and type the value as C001. Click Next.
[Three search conditions can be given at the most in the wizard.]
Step 8 If we want to display a different name instead of the original column
name, we can set it here.
Step 9 The last step of the Query wizard displays the entire overview of the
query. It displays the overall structure of the query.
Name of the Query - By default, the name of the query is Query_Events
by default. If desired, type the new name in the text box.
The action to be performed after the wizard finishes- By default
Display Query option will be selected.
Click and select the Modify Query radio button if the query has to be
edited in the Design view.

Step 10 Click on Finish button. The records with CategoryID as C001 will be
displayed on the screen.
Creating a Query in Design View
We will create a query to display records of Athletics category. For this query,
records have to be filtered from both Events and EventCategory tables.
Step 1 Click Queries icon on the Database Pane in the Database Window.
Step 2 Click Create Query in Design View… icon in the Tasks Pane. The Query
Design Window appears. In the middle of the window the Add Table or
Query dialog box is displayed.
Step 3 Click on the Event table to be used in the query and then click on Add
button. Alternatively double click on the Events table. The Event table
will be added to the Tables Pane.
Step 4 Similarly add the EventCategory table.
Step 5 Click Close button in the Add Table or Query dialog box to close it.
Step 6 Next step is to select the fields. For our query we want to display Event
Name and Winner from the Events table and Category Name from the
EventCategory table.
So in the list box of Events table, double click on EventName and Winner
field, and they will be displayed in the Design grid.

Note:-Observe that the Visible Check Box is selected by default. This means
that all these three fields will be visible when you run the query.
If you do not want the data values for the particular field to be
displayed, click to deselect the respective check box.
Step 7 Next we will set Alias names for the columns that will be displayed in the
output. For example, to change Winner -> Winner Name, type Winner
Name in the Alias text box under Winner column.
Step 8 To sort the records in either ascending or descending order of a
particular field, use the Sort row given in the grid.
Step 9 To display records of Athletics category only, type ‘Athletics’ in the
Criterion row under the Category Name column.

Step 10 Once the query is designed, click Run Query ( ) button on the toolbar or
press F5 key. The query result will be displayed in the Tables Pane area.

Step 11 Click on Save button to save the query. The Save As dialog box will be
displayed. By default, the Query Name as Query1 will be displayed. Type
a different name if required. Click on OK button to save the query.
Editing a Query
Step 1 Right click on the Query Name in the Objects Area of the Database
window.
Step 2 Select Edit option from the popup menu.
Step 3 Make the desired changes and click the Save button.
Note:- We can use the Criterion row to apply multiple conditions. We can apply
all relational operators like <, >, <=, >=, != and = for all conditions that can
be given in Criterion row.
For example, if you want to see only those records where points scored
are more than 10, then add Points field to the grid and then set the
Criterion for it as >10.
Working with Numerical Data
Till now, we have been displaying data from tables in the query.
We can even use certain mathematical functions to find the count, sum,
minimum, maximum or average of data values.

Step 1 Click Create Query in Design View. Add Events and EventsCategory
tables.
Step 2 Add Category Name field from EventCategory table and Points field
from Events table.
Step 3 Under the Category Name field, in the Function row, select Group option
from the drop down list.
Step 4 Similarly, under the Points column, select the Average function from the
drop down list.
Step 5 Press F5 to run the query. The query result depicting average points in
all the categories will be displayed.
Forms And Reports

Both are considered as objects of the database and are present in the
Database Pane of the LibreOffice Base User Interface.

Forms : A form is an object of the database that has a user friendly


interface where data can be entered and seen in an
attractive and easy-to-read format.
Labels : A label is a piece of text that specifies the data that should be
entered in the field value text box.
Field value It stores the data and it is linked to the respective field in
text box : the table.
Creating a Form Using a Wizard
Step 1: Click the Form icon on the Database Pane and click on use Wizard to
Create Form on the Tasks Pane.
Step 2: Select the tables or queries for which the form has to be created.
Step 3: After selecting the table, all fields from the table will appear in the
Available Fields list.
Step 4: Move all fields from the Available Fields list to the Fields in the Form
list using the > button. Click on Next button to move forward
Step 5: The second step is setting up a subform. Since no subform is
needed, click Next to proceed.
Step 6: By default, all controls are left-aligned. To align them to the right, select
the "Right Align" radio button. Click Next button.
Step 7: The wizard asks if the form is for displaying, entering, or both. We
proceed with the default settings and click "Next."
Step 8: Here, we can apply styles to the form. After that click on Next button
Step 9: In this step, we name the form, which defaults to the table name.
The "Work with the form" option is selected by default, but we can
choose "Modify the form" to edit it after the wizard finishes.
Step 10: Click "Finish" to display the form in a separate window.

Form Design window interface:


On the left of the Form Design window is the Forms Control toolbar and at the
bottom is the Records toolbar.
Forms Control Toolbar : This toolbar contains various controls that can be
added to the form.
Records Toolbar : This toolbar contains various controls that can be added to
the form ,these buttons allow us to navigate and view records in the file.
Modifying a Form
Changing the background color
Step 1: In LibreOffice Base, click the "Forms" icon in the Database Pane
to see the saved form in the Objects Area.
Step 2: Right click on the form name then click on Edit option. A
separate Form Design View will open.
Step 3: To change the form's background color, right-click on the form
and select Page Style from the pop-up menu.

Step 4: Select Area tab and choose the desired color from the palette
Step 5: Click on OK button. The selected color will be applied on the form
Modifying a Form
Editing the labels
Step 1: Place the mouse pointer over the label to change it.
Step 2: Press Ctrl + Click to select the label, displaying position boxes around it.
Step 3: Right click on the selected label > Control Properties
Step 4:The Properties: Label Field dialog box appears, allowing you to update
the label caption and modify properties like width, height, alignment,
font style, and size.
Step 5: After making changes, close the Properties dialog box by clicking ‘X’
button. The changes will apply to the selected text.
Modifying a Form

Moving a control :
Click on it to select both the label and text box with position handlers.

To move only one of these , press Ctrl while clicking.

Click and drag the control to the desired location.

Changing the size of the textbox control :


Press Ctrl and click on the textbox to select it with position handlers.

Hover over a handler until the cursor changes to a double-sided arrow.

Click and drag the handler to adjust the size as needed.


Modifying a Form
Adding a Tool tip :
A tool-tip is a small text that appears when the mouse pointer hovers over a
control.
Step 1: Press Ctrl button and click on text box.
Step 2: Right click > Control Properties.
The Properties: Text Box dialog box will appear.
Step 3: Scroll down till Help Text property appears.
Step 4: Type desired tool tip text in the text box.
Step 5: Close the dialog box by clicking on cross (X) button.
Forms Controls Toolbar
Adding a calendar for the date field
Step 1: Place the mouse pointer over the Date text box and press Ctrl + Click
to select it.
Step 2: Right click > Control Properties.

Step 3: In the Properties: Date Field dialog box, scroll down to the Date Format
property. The default format is Standard (short).
Step 4: Click to open the list box and select Standard (long) format.
Step 5: Scroll to the DropDown property and change its value from No to Yes.
Step 6: Close the dialog box. The date text box will change to a list box with an
arrow on the right.
Forms Controls Toolbar

Adding text to the form

Step 1: Click the Label tool on the Form Controls tool box

Step 2: On the form, click and drag to create a label field box.

Step 3: Double click on box to open the Properties: Label Field dialog box.

Step 4: Type your desired title in the Label property,

Step 5: Click the Font button under Font property to open the Character dialog
box. Select the desired font, style, and size, then click OK.

Step 6: Close the Properties: Label Field dialog box to display the formatted title on the form.
Forms Controls Toolbar

Adding a new record using a form

Click Design Mode on the Forms Controls toolbar to switch to Form View.
The Form View window opens, showing the first record.
To add a new record, click New Record icon on the Records toolbar.
A blank form appears with the cursor in the first text box .
Enter data and click Save Record icon on the Records toolbar to store it.
To delete a record, navigate to it using the record number box or
navigation buttons, then click Delete on the Records toolbar.
Toggle between Design View and Form View using the Design Mode button.
Reports
A report in a DBMS presents retrieved data in an organized and customized
format, enhancing visualization compared to a simple row-and-column
query display.

Creating a report
Step 1: In LibreOffice Base, click the Reports icon in the Database Pane.
Step 2: From the Tasks Pane, click Use Wizard to Create Report option.
Step 3: The Report Wizard opens along with the Report Builder window and the
Add Field dialog box.
Step 4: In the report wizard, select the table and then fields for the report.
Step 5: The Available Fields list displays all fields from the table. Click > button
to add them to the Fields in Report list.
Step 6: Click Next to label fields. Column headers are used as default labels,
but you can replace them with more descriptive names if needed.
Step 7: Click Next to proceed. This step allows grouping data by a field, but
since no grouping is needed, click Next again.
Step 8: Set Sort Options by selecting a field and choosing ascending or
descending order for data arrangement in the report.
Step 9: Click on the Next button to move on to the next step in which the layout
of the report will be selected.
Step 10: Select a layout and set the header & footer layout . Choose the orientation
as Landscape or Portrait, keeping Landscape selected by default.
Step 11: Click Next , Enter the report name . By default, the report is Dynamic,
updating automatically with table changes. To prevent updates,
select Static. Choose to modify or create the report, keeping the
default setting to create it.
Step 12: Click on Finish button to display the report.
Inserting other controls in the report

Inserting Titles and Headings


Step 1: Right-click on the Report name, and click on Edit option from
pop up menu. The Report builder window will appear.
Step 2: Click on the Label tool on the Report Controls toolbar.
Step 3: Bring the mouse pointer on the report. Click and drag to insert the
label textbox.
Step 4: Double-click to open the Properties dialog box. Enter the title in the
Label property text box, and adjust the font style ,size under the Font
property.
Step 5: Close the Properties dialog box. Double-click the report in the Reports
of Database pane to view it with formatting applied.
Inserting other controls in the report

Inserting Date and Time


Step 1: Right click on the report name and then select edit option from
popup menu
Step 2: Click in the Page Header area to make it active.
Step 3: From the main menu Click Insert > Date and Time.
Step 4: The Date and Time dialog box appears. Select the desired format and click OK.
Step 5: The date is inserted in the Page Header (top left). Click and drag to
reposition it as needed.

You might also like