Database Management System Using LibreOffice Base

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Database Management System

using LibreOffice Base


• Introduction to Database
Management System
• Starting with LibreOffice Base
• Working with Multiple Tables
• Queries in Base
• Forms and Reports
Data and Information

• The raw facts constitutes data.


• The facts may be related to any person, place, activity or things.
• It may be stored in the form of text, graphics, audio or video.
• Information is the processed or organized form of data.
• If data is not correct or accurate, the information obtained by
processing such data may not be correct.
• forms of information are pay-slips, schedules, worksheet, bar
charts, invoices, account returns etc
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.
• 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.
The advantages of DBMS
• Organised Storage – The data in the database is stored in an organised
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.
• Data Sharing – If the same data set is required for different applications then
the database can be shared with other applications.
• Minimal Data Redundancy – In the event of requiring the 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 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.
Continue…………..
• we can set a relation between the two tables using a DBMS, any change in one
table is automatically reflected in all the related tables.
• Increases Efficiency.
• Increases Accuracy
• Increases Validity- valid data is being entered can be checked at the data entry
stage. This increases the validity of the database.
• 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 .
• 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, in figure, the data of a company is stored using a hierarchical
data model.
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(RDBMS):-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 Relational Database Model was proposed in 1970 by E. F. Codd. Relational


database model is the most common type of 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 – A relational database is a collection of related tables.
RDBMS Illustration:-
Relational Database System(RDBMS)
Terminology
• Entity – It is a real world object about which information is to be stored in a database.
• Table – A table is a collection of logically related records. It is organised as a set of
columns, and can have any number of rows.
• Field or Columns or attributes – Field or Columns are the individual piece of data stored
within a table. Each field has a datatype associated with it, such as text, number, date
etc.
• Data Values – Data values are the raw data represented in numeric, character or
alphanumeric form.
• Record or Row -A record holds the data values of all the fields for a single person or
object in a table.
• Key- A key is a field or combination of field that uniquely identify a record in a table.
Keys are essential for data integrity and for establishing relationships between tables in a
RDBMS.
Continued………

• Constraints:- they are rules that enforce data entigrity within


database. They defines the conditions that must be met for data
to beinserted, updated, or deleted in a table.
• Queries:- Queries are commands or statements used to retrieve,
manipulate, or analyse data within a database.
• Degree:- This referes to the number of attributes or columns in a
table.
• Cardinality:- This refers to the number of tuples or rows in a
table.
Primary Key –

A primary key uniquely identifies each record


(row) in a table.
It must contain unique values and cannot contain
NULL values (empty/nothing). At any time, no
two rows in a table can either have some values
for the primary key nor can data value for such
field be left blank.
We can have only one primary key in a table.
Foreign Key –
• It is an attribute or a set of attributes whose values math the
primarykey of another table. A primary key of one table when
used in another table is called foreign key. This foreign key helps
to build a relation between two tables. Consider the example
given below
Candidate Key –

• All the field values that are eligible to be the primary key are the
candidate keys for that table. Such fields can neither be left blank
nor can have duplicate values. So in the table Student Marks,
Enrollment Number and Roll Number both are candidate keys.
Alternate Key –

• A remaining candidate key which is not


selected as a Primary Key is called an
alternate key. Hence, if Roll Number is
made as the primary key, Admission
Number is the Alternate key.
Objects of an RDBMS
• Table
• 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, labels, radio buttons, list boxes, check boxes etc.
that give a user friendly interface for entering data. The data
entered through the forms is stored in tables.
• Queries – A query is used to retrieve the desired information from
the database. In simple terms, it is a question asked from the
database.
• Reports – The output of a query may be displayed in the form of
reports. The usual result of the query is in the form of rows and
columns.
Let’s Practice

You might also like