Pageviews

Thursday, 8 August 2019

+2] 8. Database Management System - Previous Questions chapter wise




                     PLUS TWO COMPUTER APPLICATION

 (+2 Computer Application / Computer Science , 
Previous Questions Chapter wise ..


                                         Chapter  8. Database Management System



1...................... level describes only a part of a database

(a) View

(b) Physical 

(c) Logical 

(d) None of these                                                                        

2. What is relational algebra ?Explain any three relational algebra operations

 Once the database is designed and data is stored, the required information is to be retrieved. A variety of operations are provided by RDBMS. The collection of operations that is used to manipulate the entire relations of a database is known as relational algebra.

1.Selection operation

SELECT operation is used to select rows from a relation that satisfies a given predicate. The predicate is a user defined condition to select rows of user's choice. This operation is denoted using lower case letter sigma (σ ). The general format of select is as follows:

 σ condition (Relation)
 The result of SELECT operation is another relation containing all the rows satisfying the given predicate (or conditions).

2.Project operation

The PROJECT operation selects certain attributes from the table and forms a new relation. If the user is interested in selecting the values of a few attributes, rather than all the attributes of the relation, then use PROJECT operation. It is denoted by lower case letter π . The general format of project operation is as follows:

 π A1, A2,…., An (Relation)
 Here A1, A2, . . . ., An refer to the various attributes that would make up the relation specified. 

3.Union operation

 UNION operation is a binary operation and it returns a relation containing all tuples appearing in either or both of the two specified relations. It is denoted by ∪ . The two relations must be union-compatible, and the schema of the result is defined to be identical to the schema of the first relation. If two relations are union-compatible, then they have the same number of attributes, and corresponding attributes, taken in order from left to right, have the same domain. Note that attribute names are not used in defining union-compatibility.

3. The number of attributes in a relation is called ………… 

(a) tuple 

(b) degree 

(c) cardinality

 (d) domain 

Ans. b

4.  Explain the components of DBMS

DBMS have several components, each performing very significant tasks in its environment. The components are 
• Hardware • Software • Data • Users • Procedures

Hardware: The hardware is the actual computer system used for storage and retrieval of the database. This includes computers (PCs, workstations, servers and supercomputers), storage devices (hard disks, magnetic tapes), network devices (hubs, switches, routers) and other supporting devices for keeping and retrieval of data.

 Software: The software part consists of the actual DBMS, application programs and utilities. DBMS acts as a bridge between the user and the database. In other words, DBMS is the software that interacts with the users, application programs, and databases. All requests from users for access to the database are handled by the DBMS

Data: It is the most important component of DBMS environment from the end users point of view. The database contains operational data and the meta-data (data about data). The database should contain all the data needed by the organization. The major feature of databases is that the actual data and the programs that uses the data are separated from each other. For effective storage and retrieval of information, data is organized as fields, records and files.

Fields: A field is the smallest unit of stored data. Each field consists of data of a specific type

Record: A record is a collection of related fields.

File: A file is a collection of all occurrences of same type of records.

Users: There are a number of users who can access data on demand using application programs. The users of a database system can be classified depending on the mode of their interactions with DBMS. The different categories of users are Database Administrator (DBA), Application Programmers, Sophisticated users and Naive Users.

 Procedures: Procedures refer to .the instructions and rules that govern the design and use of the database. The users of the system and the person that manages the database require documented procedures on how to use or run the system.

5. A candidate key that is not a primary key is called -----------------

Ans. Alternate key

6. Define the term

   a. Degree

    b. Cardinality

 Ans. The number of attributes in a relation determines the degree of a relation.

        The number of rows or tuples in a relation is called cardinality of the relation.

6. Define data abstraction and explain any two levels of abstraction

    For the system to be usable, it must retrieve data efficiently. The need for efficiency has led designers to use complex data structures to represent data in the database. Since many database system users are not computer trained, developers hide the complexity from users through several levels of abstraction. The data in a DBMS is described at three levels of abstraction.

  a. Physical level

  The lowest level of abstraction describes how data is actually stored on secondary storage devices such as disks and tapes. The physical level describes complex lowlevel data structures in detail. We must decide what file organisations are to be used to store the relations and create auxiliary data structures, called indexes, to speed up data retrieval operations.

b. Logical level

  The next-higher level of abstraction describes what data is stored in the database, and what relationships exist among those data. The logical level thus describes the entire database in terms of a small number of relatively simple structures.Although mplementation of the simple structures at the logical level may involve complex physical-level structures, the user of the logical level does not need to be aware of this complexity. Database administrators, who must decide what information to keep in the database, use the logical level of abstraction. Logical level is also referred as conceptual level.

7. Define the terms

  1. Fields

   2. Record.

Ans.  Fields: A field is the smallest unit of stored data. Each field consists of data of a specific type

            Record: A record is a collection of related fields.

8. In RDBMS contain 10 rows and 5 columns.what is the degree of the relation ?

 Ans.  5

9.Is it possible SELECT and PROJECT operations of relational algebra in single statement?Explain     with example?

  Not possible SELECT and PROJECT operations of relational algebra in single statement.

Select Operation : This operation is used to select rows from a table (relation) that specifies a given logic, which is called as a predicate. The predicate is a user defined condition to select rows of user's choice.

Project Operation : If the user is interested in selecting the values of a few attributes, rather than selection all attributes of the Table (Relation), then one should go for PROJECT Operation.

Example  in SELECT operation

σ sales > 50000 (Customers)
Output - Selects tuples from Customers where sales is greater than 50000

Example in PROJECT operation

CustomerIDCustomerNameStatus
1GoogleActive
2AmazonActive
3AppleInactive
4AlibabaActive
Here, the projection of CustomerName and status will give
Π CustomerName, Status (Customers)
CustomerNameStatus
GoogleActive
AmazonActive
AppleInactive
AlibabaActive