UNIT - 3 Revision Notes

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

UNIT - 3

DATA BASE MANAGEMENT SYSTEM


Revision Notes

The raw fact constitutes data.


Information is the processed or organized form of data.

A database is a collection of logically related data items stored in an organized manner.

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.
DBMS - Database Management System
RDBMS - Relational Database Management System. In RDBMS data organized into tables.

Data can be organized into two types:

Flat File: Data stored in a single table. Usually suitable for less amount of data.
Relational: Data stored in multiple tables and the tables are linked using a common field.
Relational is suitable for medium to large amount of data.
Database server:
Database servers are dedicated computers that hold the actual database and run only the
DBMS and related software. Typically databases available on the database servers are accessed
through command line or graphic user interface tools referred to as Frontend; database servers
are referred to as Back-ends. Such type of data access is referred to as a Client-server model.

Advantages of Database:
 Organized Storage
 Sharing of Data
 Reduces Data Redundancy
 Data Consistency
 Data Analysis
 Data security
 Data Integrity
 Backup and Recovery

Reduces 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 Integrity:
Data Integrity means that the data is accurate and consistent in the database. Data Integrity
is very important as there are multiple database in a DBMS. All of these databases contain data
that is visible to multiple users.

Data Model is the structure of database and it 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.

In Hierarchical Data Model, the data is organized into a tree like structure. The data is stored in
the form of linked records.

In Network Data model, multiple records are linked to same master file.

The Relational data model is based on the principle of setting relationships between two or
more tables of the same database.

Let us get familiar with some of the common terms used in RDBMS.

Entity is a real world object about which information is to be stored in a database.

The details associated with the entity are called attributes.

A table is a collection of logically related records. It is organized as a set of columns, and can
have any number of rows.

A field is the smallest entity in the database. These are individual record characteristics and are
presented as columns within a table.

Data values are the raw data represented in numeric, character or alphanumeric form.

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.

A primary key is a field that uniquely identifies a row in a table.

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.
All the field values that are eligible to be the primary key are the candidate keys for that table.
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.

The various objects in a database are tables, forms, reports and queries.

A table is the basic unit of any DBMS. The data is first stored in tables in row and column
format. A column represents a field or an attribute while a row represents a record.

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 query is used to retrieve the desired information from the database.


The output of a query may be displayed in the form of reports.

Short Answer Questions:

1. In how many ways tables can be created in Base?


Tables can be created in two ways.
1. In Design view
2. Using Wizard

2. List datatypes available in Numeric Datatype?


The different types of numeric data types are:
 Boolean Numeric
 Tinyint Decimal
 Smallint Real
 Integer Float
 Bigint Double

3. List datatypes available in Alphanumeric Data Type?


The different types of Alphanumeric Data Type are:
 Longvarchar
 Char
 Varchar
 Varchar_Ignore Case

4. Define the structure of a table.


A table is a set of data elements (values) that is organized in vertical columns and horizontal rows.
A table has a defined number of columns, but can have any number of rows.
5. Differentiate between Tuples and Attributes of a table
A row also called a Record or Tuple represents a single, data item in a table. Whereas A column is a
set of data values of a particular simple type, one for each row of the table.

6. Name different Binary data types.


The different Binary data types are:
 Longvarbinary
 Binary
 Varbinary

7. How many types of relationships can be created in Base? Explain each of them.
There are three types of relationship in LibreOffice Base.
ONE to ONE: In this relationship, both the tables must have primary key columns. Example: In the
given tables EMP and DEPT, EMP_ID in EMP table and DEPT_ID in DEPT table are the primary keys.
ONE to MANY: In this relationship, one of the table must have primary key column. It signifies that
one column of primary key table is associated with all the columns of associated table.
MANY to MANY: In this relationship, no table has the primary key column. It signifies that all the
columns of primary key table are associated with all the columns of associated table.

8. What do you mean by Sorting? In how many ways it can be done?


Sorting means arranging elements in particular sequence. It can be done in two ways.
 Increasing order
 Decreasing Order

9. What is database? Give an example. What does DBMS stand for?


A collection of related information organised as tables is known as database e.g. INGRES,
MySQL etc. DBMS stands for DataBase Management System. It is a computer-based record keeping
system.

10. What is the difference between ‘Rows’ and ‘Columns’ in a table?


In a table, rows are called records and columns are termed a fields. A row stores complete
information of a record whereas column stores only similar data values for all records.

11. What is field in database? Give an example.


A field is an area, reserved for a specific piece of data. It is also known as attribute. e.g.Customer
Name.

12. Define forms and what is the need of using them?


A form is a window or screen that contains numerous fields or spaces to enter data. Forms can be
used to view and edit your data. It is an interface in user specified layout.

13. What does RDBMS stand for?


RDBMS stands for Relational Database Management System. It is a type of DBMS that stores data
in the form of relations (tables).
14. How is data organized in a RDBMS?
A relational database is a type of database. It uses a structure that allows us to identify and access
datain relation to another piece of data in the database. Data in a relational database is organized into
tables.

15. Write the purpose of DBMS.


DBMS is used to store logically related information at a centralised location. It facilitates data
sharing among all the applications requiring it.

16. Write any two uses of database management system.


The two uses of database management system are as follows
(i) DBMS is used to store data at a centralised location.
(ii) It is used to minimise data redundancy and data inconsistency.
17. Write any two advantages of using database.
The two advantages of using database are as follows
(i) It can ensure data security.
(ii) It reduces the data redundancy.
18. Give any two disadvantages of the database.
The two disadvantages of the database are as follows
(i) A database system creates additional complexity and requirements.
(ii) A database system is a multi-user software, which is less efficient.

19. A table named School (containing data of students of the whole school) is created, where each
record consists of several fields including AdmissionNo (Admission Number), RollNo (Roll
Number), Name. Which field out of these three should be set as the primary key and why?
AdmissionNo should be set as primary key because admission numbers are unique for each and every
students of the school, which is not possible in the case with RollNo and Name.

20. Why Memo data type is preferred over Text data type for a field?
When the length of the field is more than 255 characters. Text data type is not capable to store the
project description because its length cannot be more than 255 characters so, Memo data type is
preferred over Text data type.

21. What happens when text is entered in a Number type field?


When we enter text in a Number field and press Enter or press Tab key, it displays a message that
‘‘The value you entered does not match the Number data type in this column.’’

22. List datatypes available in Numeric data type.


Datatypes available in numeric data type are TINYINT, SMALLINT, MEDIUMINT, INT and
BIGINT.

23. Write one example of data field for which you would set the Required property to Yes.
In a table, when we declare a field as a primary key, then the field’s Required property must
be set to yes because in a primary key field, we need to enter data always.

24. What is the purpose of Default Value field property?


If there is a situation when you want to enter same value for all records. Then, to avoid typing the
same thing many times, you can set as a Default Value property.

You might also like