Introduction To DBMS Notes
Introduction To DBMS Notes
Advantages of Database
1)Organised Storage : The data in the database is stored in an organised
manner, so that retrieval of the required data is fast and accurate.
2)Data Analysis : A database helps in analysis of data based on certain criteria.
3)Reduces Data Redundancy : Database reduces data redundancy (duplication of
data)
4)Sharing of Data : In a database, the users of the database can share the
data among themselves.
5)Data Integrity : Data integrity means that the data is accurate and consistent in the
database.
6)Data Security : Database provides data security as only authorized users are
allowed to access the database and their identity are authenticated by using a
username and password.
7)Privacy : The privacy rule in a database states that only the authorized users
can access a database according to its privacy constraints.
8)Backup and Recovery : Database Management System automatically takes care
of backup and recovery.
Data Models
A structure of database that describes the manner in which data will be stored
and retrieved is known as data model.
A data model consists of components for describing the data, relationships among
them and the constraints
that hold data.
Objects of an RDBMS
An object in a database is a structure or a feature that is used to store, represent or
retrieve data. In fact a database is a collection of these objects given below
Table : – 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. 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 : – A report is the formatted result of queries which contains data required
for decision- making and analysis.
RELATIONSHIP
A relationship in a database is the connection between tables in a database.
The three main types of relationships are:
One-to-one
Each item in one table only appears once in the other table. For example, each employee has one
company car.
One-to-many
One item in one table can be related to multiple items in another table. For example, a purchase order can
have multiple products.
Many-to-many
One or more items in one table can be related to one or more items in another table. For example, an order
can have multiple products, and a product can appear on multiple orders
Referential Integrity (very important)
Referential Integrity is a data quality concept that ensures the accuracy and consistency of
relationships between tables in a database. According to the principle of referential integrity, no unmatched
foreign key values should exist in the database.
LibreOffice Base gives us following four options to choose from to maintain referential
integrity in such cases:
• 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.
SUMMARY
1. The raw facts constitutes data.
2. Information is the processed or organised form of data.
3. A database is a collection of logically related data items stored in an organised manner.
4. The software that is used to create, update and retrieve data is known as database management
system (DBMS).
5. Some of the common examples of DBMS are MS Access, Open Office or LibreOffice Base, Oracle,
Ingress, MySQL.
6. Data Model is the structure of database and it describes the manner in which data will be
stored and retrieved.
7. There are different data models, such as hierarchical data model, network data model and
relational data model.
8. In Hierarchical Data Model, the data is organised into a tree like structure. The data is stored in
the form of linked records.
9. In Network Data model, multiple records are linked to same master file.
10. The Relational data model is based on the principle of setting relationships between two or
more tables of the same database.
11. Entity is a real world object about which information is to be stored in a database.
12. The details associated with the entity are called attributes.
13. A table is a collection of logically related records. It is organised as a set of columns, and can
have any number of rows.
14. A field is the smallest entity in the database. These are individual record characteristics
and are presented as columns within a table.
15. Data values are the raw data represented in numeric, character or alphanumeric form.
16. 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.
17. A primary key is a field that uniquely identifies a row in a table.
18. This foreign key helps to build a relation between two or more tables in a database.
19. All the field values that are eligible to be the primary key are the candidate keys for that table.
20. Out of the candidate keys, one or two are made as primary keys. The others are the alternate keys.
21. An object in a database is a structure or a feature that is used to store, represent or retrieve
data. The various objects in a database are tables, forms, reports and queries.
22. A form is a feature of a database using which we can enter data in a table in an easy and user
friendly manner.
23. A query is used to retrieve the desired information from the database.
24. The output of a query may be displayed in the form of reports.