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

Unit 3_DBMS

Chapter 8 introduces Database Management Systems (DBMS), defining data, information, and various data models, including hierarchical, network, and relational models. It discusses the advantages of using DBMS, such as organized storage, data consistency, and security, as well as key terminology like primary keys and foreign keys. Subsequent chapters cover practical applications of DBMS in LibreOffice Base, including creating tables, establishing relationships between multiple tables, and utilizing queries, forms, and reports for data management.

Uploaded by

nisha.kawale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Unit 3_DBMS

Chapter 8 introduces Database Management Systems (DBMS), defining data, information, and various data models, including hierarchical, network, and relational models. It discusses the advantages of using DBMS, such as organized storage, data consistency, and security, as well as key terminology like primary keys and foreign keys. Subsequent chapters cover practical applications of DBMS in LibreOffice Base, including creating tables, establishing relationships between multiple tables, and utilizing queries, forms, and reports for data management.

Uploaded by

nisha.kawale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Ch.

8 Introduction to Database Management System

Data and Information


The raw facts constitute data.
Information is the processed or organized form of data.
Database-A database is a collection of logically related data items stored in an
organized manner.
DBMS-The software that is used to create, update and retrieve data is known as
database management system (DBMS).
Some of the common examples of DBMS are MS Access, Open Office or LibreOffice
Base, Oracle, Ingress, MySQL.
Data can be organized in two ways-
Flat file-Data is stored in a single table. Usually suitable for less amount of data.
Relational- Data is stored in multiple tables and the tables are linked using a
common field. Relational is suitable for medium to large amount of data.
advantages of DBMS:
 Organized Storage – The data in the database is stored in an organized
manner, so that retrieval of the required data is fast and accurate.
 Data Analysis – A database helps in analysis of data based on certain
criteria. 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-same data field in several tables the data field
might get repeated in number of tables. This is called as data redundancy.
This can be reduced by using DBMS tools.
 Data Consistency – By minimizing data redundancy, chances of inconsistent
data being stored is reduced.
 Increases Efficiency – Since database tables are properly organized, saving,
reading and searching data can be carried out efficiently.
 Increases accuracy-data is retrieved accurately from the database.
 Increases Validity- It increases the validity of data in a database.
 Security – Unauthorized access can be controlled by assigning passwords to
the users.

Data Models-The 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. All these records are linked to
each other at various levels, thereby forming a hierarchy.
Network Data Model- In this model, multiple records are linked to same master
file. It is also considered as an inverted tree where master is present in the bottom
of the tree and the branches contain information linked to the master.
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
Relational Database Terminology
Entity – It is a real world object about which information is to be stored in a
database.
Attribute-These details associated with the entity are called attributes. Each entity
is a collection of these attributes associated with it.
Table – A table is a collection of logically related records.
Field or Columns or attributes – A field is the smallest entity in the database.
Fields are individual record characteristics and are presented as columns within a
table.
Data Values – Data values are the raw data represented in numeric, character or
alphanumeric form.
Record or Row – The data values for all the fields related to a person or object is
called a record. It is presented as rows within a table.
Primary Key – A primary key or simply a key is a field that uniquely identifies a row
in a table.
A primary key cannot have a NULL value.
Foreign Key – If a field or a combination of fields of one table can be used to
uniquely identify records of another table, then that particular field is known as the
foreign key. This foreign key helps to build a relation between two tables.
Candidate Key – All the field values that are eligible to be the primary key are the
candidate keys for that table.
Alternate Key – Out of the candidate keys, one or two are made as primary keys.
The others are the alternate keys.

Objects of an RDBMS -An object in a database is a structure or a feature that is


used to store, represent or retrieve data
Table – As mentioned before, a table is the basic unit of any DBMS. The data is first
stored in tables in row and column format
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.
Queries – A query is used to retrieve the desired information from the database.
Reports – The output of a query may be displayed in the form of reports.

Ch.9 Starting with LibreOffice Base

Data Types -The nature of data to be entered for various fields are of different
types. A data type refers to the type of data that will be stored in the particular
field.
1. Text Data Type – The text data is a combination of letters, numbers or
special characters. No arithmetic calculations can be performed on text data.
2. 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.

3. 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.
4. 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.

5. 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.
6. Binary – The Binary data type used to store digitized images and sounds that
comes as long string of zeros and ones. It is possible to store photos of the
products or employees, or sound snippets or voice messages in Base
database.
Creating a Table
A table in LibreOffice Base can be created using a wizard or using the Design
view.

1.Creating Table in Design View


2.Creating the table using wizard :restricts us to use the same fields in the
per-designed tables.
Creating tables using Design View gives us more flexibility to do our work.
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
• 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.

Setting the Primary Key


To make a particular field as the primary key, place the mouse pointer before
the field name A pop up menu appears, Select the Primary Key option from pop
up menu appears ,Select the Primary Key option from pop up menu.

Navigating through the Table- The black pointing arrow just before the field
name is the record pointer.
The various components of Navigation Box are as follows:
• Record Selector Box – T his is the text box where the currently active
record number is displayed. We may enter the record number that we want to
see in this text box.
• Navigation Buttons – These are used to scroll vertically in the table.

Ch. 10 Working with Multiple Tables

Relationships between Tables


While working with multiple tables, you need to check the redundancy and
inconsistency of data. The record for a particular entity should neither be
repeated nor different data values should appear for a single entity in the
database. This is done by setting relationship between the tables of a database.
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.

Types of Relationships
The type of relationship between any two tables in a database is based on the
number of records that are present in the transaction table corresponding to the
master table.
Primarily three types of relationships can be set up between two tables in a
relational database These are:
(i) One-to-One
(ii) One-to-many
(iii) Many-to-Many
One-to-One relationship- In this type of relationship, one specific record of a
master table has one and only one corresponding record in the transaction
table.

One-to-Many relationship -This is one of the most common types of


relationship between the tables in a database. In this type of relationship, one
specific record of the master table has more than one corresponding records in
the related transaction table.

Many-to-Many relationship- In this type of relationship, there will be multiple


records in the master table that correspond to multiple records in the
transaction table as well.

Advantages of Relating Tables in a Database


There are various 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
synch. This is
called referential integrity.
• Creating relationships between tables restricts the user from entering invalid
data in the referenced fields.
• Any updation in the master table is automatically reflected in the transaction
tables.

Referential Integrity
The principle of referential integrity is that; no unmatched foreign key values
should exist in the database.
to maintain referential integrity libreoffice base provides 4 options
 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.
 Set NULL – This option assigns NULL value to all the related fields if the
master record is deleted or updated.
 Set default – This option assigns any fixed default value to all the
related fields if the master record is deleted or updated.

Ch.11 Queries in Base


Queries
Using a query, we can retrieve and display data from one or more tables
in a database. QuerIes A query is one of the most important feature of
any DBMS. Using a query, we can retrieve and display data from one or
more tables in a database.

Creating a Query
A query can be created in three ways. In this chapter you will learn the
first two methods to create a query.
(i) Using a Wizard
(ii) In Design View
(iii) In SQL view
Query wizard contains the Steps Pane on the left and the Query
Details Area on the right. After selecting the fields, field name will
appear in the Fields in the Query list box.
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

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

Ch.12 Forms and Reports


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. For any database, it is the front end for data entry and data
modification.
a form contains field controls arranged in a presentable and user friendly
manner.
There are two ways to create a form:
• Using a wizard
• Using the Design View

Four layouts are given in this step of the wizard to choose from:
• Columnar display with Labels on the left of the field value
• Columnar display with Labels on top of the field value
• Display as datasheet
• Block display with labels on top

Forms Control Toolbar


This toolbar contains various controls that can be added to the form.
Records Toolbar- The Records toolbar contains the navigation control
buttons in the extreme left. With the help of these buttons, we can
traverse and view the records in the file.
Adding a Tool tip A tool-tip is a small piece of text that is displayed when
the mouse pointer is placed on a particular control.

Reports
using a report we can present the retrieved data in an attractive and
customized manner. We can create a report based on a table or a query
or both.

By default the type of report is Dynamic. That means as the field values
in the base table or query change, the report will also change
automatically. If you don’t want automatic updation of the report, choose
the Static option.

You might also like