Warning: include_once(../../../headder.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/computer_science/chapter7_b.php on line 16

Warning: include_once(): Failed opening '../../../headder.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/computer_science/chapter7_b.php on line 16

CBSE eBooks

CBSE Guess > eBooks > Class XII > Computer Science By . Mr. MRK

Chapter – 7. DATA BASE CONCEPTS

Previous Index Next


Warning: include(../../../ads_330x250_middle.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/computer_science/chapter7_b.php on line 26

Warning: include(): Failed opening '../../../ads_330x250_middle.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/computer_science/chapter7_b.php on line 26

2002

5.a. Differentiate between data definition language and data manipulation language.

Ans. The SQL DDL(Data Definition Language) provides commands for defining relation schemas, deleting relations, creating indexes and modifying relation schemas. The SQL DML (Data Manipulation Language) includes a query language to insert, delete and modify tuples in the database. DML is used to put values and manipulate them in tables and other database objects and DDL is used to create tables and other database objects.

2001

5.c. Explain Cartesian product of two relations.

Ans: The Cartesian product is a binary operation and is denoted by a cross(x). The Cartesian product of two relations A and B is written as AXB. The Cartesian product yields a new relation which has a degree (number of attributes) equal to the sum of the degrees of the two relations operated upon. The number of typles (cardinality) of the new relation is the product of the number of tuples of the two relations operated upon. The Cartesian product of two relations yields a relation with all possible combinations of the tuples of the two relations operated upon. All tuples of first relation are concatenated with all the tuples of second realtion to form the tuples of the new relation.
Eg: There are two relations as follows:
Relation 1: Student
StudentNumber StudentName Hosteler
1 Ravi Y
2 Robert N
3 Raheem Y

Relation 2: Instructor
InstructorName Subject
K.Suman Computer Science
P.Pavan Electronics

The Cartesian product of these two relations,
Student X Instructor, will yield a relation that have a degree of 5(3+2:sum of degrees of Student and Instructor) and a cardinality 6 (3 X 2: Product of cardinalities of two relations).

The resulting relation is as follows:

Student Number Student Name Hosteler Instructor Subject Name
1 Ravi Y K.Suman Computer Science
1 Ravi Y P.Pavan Electronics
2 Robert N K.Suman Computer Science
2 Robert N P.Pavan Electronics
3 Raheem Y K.Suman Computer Science
3 Raheem Y P.Pavan Electronics

The resulting relation contains all possible combinations of tuples of the two relations.

1998

5.a. What is a relation? What is the difference between a tuple and an attribute?

Ans. In relational data model, the data is organized into table (rows and columns). These tables are called relations. A row in a table represents a relationship among a set of values.
Rows of the relations are called as tuples and columns of the relations are called as attributes.

Previous Index Next


Warning: include(../../../120_60_others.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/computer_science/chapter7_b.php on line 101

Warning: include(): Failed opening '../../../120_60_others.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/computer_science/chapter7_b.php on line 101