Computer Awareness - SPLessons

Database Basics

Chapter 16

SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

Database Basics

Data Base Basics

shape Introduction

A database is a set of data that has a regular structure and that is organized in such a way that a computer can easily find the desired information. Data is a collection of distinct pieces of information, particularly information that has been organized in some specific way for use in analysis or making decisions.

  • In simple terms, database is a collection of records, each record contains one or more fields about some object, such as a person, organization, city, product, work of art, recipe, chemical, or sequence of DNA.

  • For example, the fields for a database about people who work in a company includes the name, employee identification number, address, telephone number, date employment started, position and salary for each worker.

  • The data is represented in any format like text, numbers, graphical images or sound.
    Eg: A student’s test score.

shape Concepts

Types of database management systems:

Hierarchical Databases
It is very fast and simple. In a hierarchical database, records contain information about their groups of parent/child relationships, just like as a tree structure. It is like >your folder structure on the laptop. Every folder can contain sub-folder and each sub-folder can still hold more sub-folders. Finally, in some folders we will store files.

In the above diagram the Root node is the main folder and children nodes are the subfolders.


  • Hierarchical database can be accessed and updated quickly .Because the paths are predefined.


  • It is Difficult to manage.

  • It has Complex implementation.

Network Databases
A network databases are mainly used on a large digital computer. In the network model, entities are organized in a graph, in which some entities can be accessed through several paths. In this children are called members and parents are called occupier.

In the network database the relationships among the data in the database is many-to-many.


  • Easily accessed because of the linkage between the information.

  • Easier to navigate and search for information because of its flexibility.


  • Difficult for first time users.

  • Users feel risky while searching the data first time.

Relational Databases
In this data is stored in the form of tables. The relationship between the data files is relational. Data in relational databases is stored in different access control tables, each having a key field that mainly identifies each row.

Database Management System
Components of a database
A database includes several components like object, tables, queries, and reports. An object can be anything in the real world.

Tables: These are the basic building blocks of any relational database. A table is a collection of rows and columns.

  • The data can be stored in a table. Rows are called as records and columns are called as fields. Tables are used for storing and retrieving the data.

Field: It is a column of the table, which stores the specific information like customer address, and student address.

Record: It is a collection of data items of all the columns. It stores the information about one entity like a person and company. It is also known as tuples and the number of tuples in a relation is called as the cardinality of the relation.

Queries: A query refers to a question about the data and is used to retrieve the information.

  • A query includes the information about fields and records.

Forms: These are used to view and edit the data.

Elements of Database: A database includes various elements like,

Entity: Entity is an object that exists in the real world and is represented by rectangles. It Includes the entire information of the data.

Examples: customer buy goods, in this customer and goods are the entities.

Entity set: It is a collection of similar entities, which can share the same properties.
Example: Student is an entity set of all student entities.

Attributes: These are the properties of the entity that can be represented in an elliptical shape. These can be represented by columns in a table.

Examples: ITEM entity properties like code, and prize.

Relationship: A relationship is a union among various entities. In this, entities are related to each other. It is represented in a diamond shape. The relationship can be divided as One to one, one to many, and many to many.

E-R Diagram: It is the representation of entities and relationship between them.

Architecture of database
Data Abstraction: It hides certain details about the data. This is also known as data model, which is a collection of conceptual tools for describing the data and that is divided into three levels.

  1. Physical level: This is the low level of data abstraction. In this, it explains the physical representation of data and describes how the data is actually stored on the computer. This is also known as internal level.

  2. Logical level: This is a high level data model, which can view the complete representation of the database. It can describe what type of data can be stored in the database. This is also known as conceptual database.

  3. View level: This is the highest level of the data abstraction and explains the intercommunication between the user and the system. In this, a specific data can be seen by various users in various ways at the same time.

Advantages of DBMS

  • Data Redundancy: It refers to the data repetition, also known as duplication of data. The DBMS contains unique information and cannot make duplicate copies of the data.

  • Data security: DBMS provides security tools like username and password. It permits the users to access the database through the authorized channels.

  • Data Integrity: DBMS maintains the data integrity and protects the correct data of database. In this, data can be used by many users at a time, which makes it easy to retrieve the data.

  • Data Inconsistency: The data inconsistency can be avoided in a centralized system. Inconsistent database can result in incorrect and clashing data.

  • The data inconsistency occurs at the time of data duplication, which means the inconsistency is result of data redundancy. If data redundancy is removed, then inconsistent data is also removed.

Disadvantage of DBMS

  • Cost of Hardware and Software: A processor needs high speed of data processing and memory to access the DBMS software. It needs to upgrade the hardware and software, which means the database may need to purchase additional storage space. The hardware and software are very costly.

  • Complexity: The database designers, developers, database administrators and end-users can understand the functionality and creates additional complexity and requirements. The database is quite costly and demanding.

  • Performance: The performance of the DBMS is very high, but the DBMS provides server for some applications so a few applications may not keep running as fast.

  • Database failure: In this, data is integrated with a centralized database. If the database is interrupted for any reason, then the valuable data may be lost or the entire system will collapse.

Uses of DBMS

  • Banking: It utilizes the DBMS to store the customer information, accounts, loans, and other banking transactions.

  • Airlines: In this, the DBMS can be used for reservation and schedule the information about airlines.

  • Universities: In universities, student details including the course, registration, grades are stored in the DBMS.

  • Telecommunication: In this, DBMS is used for keeping records of calls and generating mobile bills.

  • Human Resources: The DBMS is used for recording information about employees, salaries, designations, tax, and benefits.

  • Sales: In this, DBMS is used for customer, product and purchase information.

shape Questions

1. The primary key must be ______.

  1. Numeric
  2. Unique
  3. Related
  4. Object

Answer: B

2. Database is collection of _____.

  1. Data
  2. Modules
  3. Programs
  4. Images

Answer: A

3. Which of the following is considered as DBMS?

  1. Access
  2. Foxpro
  3. Oracle
  4. Java

Answer: C

4. Arrange according to the size__________.

  1. Record, field, byte, bit
  2. Bit, field, byte, record,
  3. Field, byte, record, bit
  4. Byte, bit, record, field

Answer: A

5. The DBMS acts as an interface between what two components of an enterprise-class database system?

  1. Database application and the database
  2. Data and the database
  3. The user and the database application
  4. Database application and SQL

Answer: A

6. SQL stands for ________.

  1. Structured Query Language
  2. Sequential Query Language
  3. Structured Question Language
  4. Sequential Question Language

Answer: A

7. The following are functions of a DBMS except ________.

  1. administrating databases
  2. creating databases
  3. processing data
  4. creating and processing forms

Answer: D

8. DBMS help to achieve _______.

  1. Data independence
  2. Selection of data
  3. Centralized control data
  4. Both A & C

Answer: D

9. A set of related files is called a___.

  1. Character
  2. Data
  3. Information
  4. Records

Answer: D

10. Which of the following is not a logical data-base structure?

  1. Tree
  2. Relational
  3. Network
  4. Chain

Answer: D

11. What is the language used by the most of the DBMS for helping their uses to access the data?

  1. High llevel language
  2. Query language
  3. SQL
  4. 4GL

Answer: B

12. Periodically adding, changing and deleting file records is called file ________.

  1. Updating
  2. Upgrading
  3. restructuring
  4. renewing

Answer: A

13. Which of the following hardware components is the most important to the operation of a database management system?

  1. High-resolution video display
  2. printer
  3. high speed and large capacity disk
  4. plotter

Answer: C

14. In a _____ parent record type can be linked to one or more “child” record types, but a child record type can have only one parent.

  1. Network database
  2. Relational database
  3. Distributed database
  4. Hierarchical database

Answer: D

15. The logical data structure with a one-to-many relationship is a ______.

  1. Network
  2. Tree
  3. Chain
  4. Relational

Answer: B

16. A number of related records that are treated as a unit is called__________.

  1. Field
  2. Data
  3. File
  4. Batch

Answer: C

17. SQL is ________.

  1. a programming language
  2. an operating system
  3. a data sub language
  4. a DBMS

Answer: C

18. SQL can be used to_______.

  1. Create database structures only.
  2. Query database data only.
  3. Modify data only.
  4. All of the above

Answer: D

19. Which of the following option is used retrieval of data.

  1. Stack
  2. Data structure.
  3. Linkde list
  4. Query

Answer: D

20. ____________ is a classical approach to database design ?

  1. Left-Right approach
  2. Right-Left approach
  3. Top-Bottom approach
  4. Bottom-Top approach

Answer: C