IT2301 Database Management Systems [email_address] PREPARING FOR THE BIT  Preparing for BIT 09/08/2001
Instructions for providing answers Use black or blue ink  ball point pens  OR. Use a good quality  HB2 pencil . Announceme...
Exam Admission Cards and Model Papers were posted. Few Corrections were made to some model papers and the corrections publ...
IT2301 Model Question Paper Last Time (Q) 9-18 Today (Q) 19-25
19) Which of the following characteristic(s) is (are)  not  suitable for use as the  primary key  of an employee? (a) Empl...
Primary Key Uniqueness property, Fixed Length, Small  in size if used to link tables (a) Employee identity no. (b) Date of...
20) Which of the following statement(s) is (are)  true  with respect to  data types ? (a) FLOAT data type can store twice ...
Data Types (a) FLOAT data type can store twice as many digits as SMALLFLOAT. Refers to Precision and Not Large in Number F...
Data Types (b) INTEGER data type can store  decimal numbers exceeding that number 32,767 INTEGER can store whole numbers N...
Data Types (c) VARCHAR data type often reduces disk storage wastage when compared to CHAR data type. CHAR  fixed  length o...
Data Types (d) BLOB data is streams of bytes of fixed length. Binary Large Object (BLOB) is a streams of bytes of  arbitra...
Data Types (e) BYTE data type cannot store any type of binary data. BYTE is a type of BLOB Stores non-character-based info...
21) Which of the following may happen during the process of  normalization ? (a) creation of new tables, (b) splitting of ...
Normalisation (a) creation of new tables functional dependencies on part of key and transitive dependencies are removed by...
Normalisation (c) merging of several tables into one table merging of tables is required only to  denormalised  relations ...
22) Which  set of operators  represent the complete set for  relational algebra ? (a) Union, Difference, Projection, Selec...
Relational Algebra Set Operators Union, Difference (Minus), Intersection Relational Operators Projection, Selection (Restr...
23) Which of the following are supported by  Entry-level   SQL-92 standard ? (a) Embedded SQL (b) Integrity enhancement (c...
Entry Level SQL-92 <ul><li>SQL Standards: knowledge of features supported at various levels is required </li></ul><ul><li>...
Full SQL89  <ul><li>SQL89 is a revision of the original 1986 standard.  The full SQL89 standard includes an integrity enha...
Entry Level SQL92 <ul><li>Entry level SQL92 includes  </li></ul><ul><li>All of SQL89 plus the integrity enhancement </li><...
Intermediate  Level SQL92 <ul><li>Intermediate level SQL92 includes  </li></ul><ul><li>Entry level SQL92, plus: </li></ul>...
Full  Level SQL92 <ul><li>Full level SQL92 includes  </li></ul><ul><li>Intermediate level SQL92, plus: </li></ul><ul><ul><...
SQL3 <ul><li>SQL3 includes  </li></ul><ul><li>Full level SQL92, plus: </li></ul><ul><ul><li>Triggers and stored procedures...
24) Which set of key words  cannot  be used with  SQL INSERT  statement to enter data? (a) Insert, Select, Into, Set, Wher...
SQL INSERT <ul><li>INSERT INTO  table-name  ( column-name, ) , </li></ul><ul><ul><li>| VALUES  ([ constant,  NULL],)   or ...
25) Select the statement(s) that is (are)  correct  with respect to the use of  JOIN (a) A table can join to itself creati...
JOIN (a) A table can join to itself creating a self-referencing join called a SELF-JOIN. Employee( empno , name, superviso...
JOIN (b) An EQUI-JOIN between two tables in a SELECT statement returns only the rows that have matching values in the join...
JOIN (c) In an OUTER-JOIN, all of the rows of the dominant table are retrieved regardless of whether there are correspondi...
JOIN (d) In an OUTER-JOIN, a join condition does not need to have the WHERE clause. SELECT  e.empno, e.name, d.name FROM  ...
JOIN (e) OUTER-JOIN cannot be used to join 3 tables.
Contact <ul><li>External Degree Unit (EDU) of the Institute of Computer Technology </li></ul><ul><li>No. 221/2A, Dharmapal...
Upcoming SlideShare
Loading in …5
×

Preparing for BIT – IT2301 Database Management Systems 2001f

656 views

Published on

Preparing for BIT – IT2301 Database Management Systems, on Rupavahini, 09th August 2001, 2200-2230 hrs & 20th August 2001, 1600-1630 hrs.

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
656
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Preparing for BIT – IT2301 Database Management Systems 2001f

  1. 1. IT2301 Database Management Systems [email_address] PREPARING FOR THE BIT Preparing for BIT 09/08/2001
  2. 2. Instructions for providing answers Use black or blue ink ball point pens OR. Use a good quality HB2 pencil . Announcements b a c d  e 
  3. 3. Exam Admission Cards and Model Papers were posted. Few Corrections were made to some model papers and the corrections published on the web. There were OS questions using C , these would be changed to Java . Students need not know C as a programming language for this module Announcements
  4. 4. IT2301 Model Question Paper Last Time (Q) 9-18 Today (Q) 19-25
  5. 5. 19) Which of the following characteristic(s) is (are) not suitable for use as the primary key of an employee? (a) Employee identity no. (b) Date of birth (c) Address of employee (d) Full name of employee (e) Photograph of employee
  6. 6. Primary Key Uniqueness property, Fixed Length, Small in size if used to link tables (a) Employee identity no. (b) Date of birth (c) Address of employee (d) Full name of employee (e) Photograph of employee
  7. 7. 20) Which of the following statement(s) is (are) true with respect to data types ? (a) FLOAT data type can store twice as many digits as SMALLFLOAT. (b) INTEGER data type can store decimal numbers exceeding that number 32,767 (c) VARCHAR data type often reduces disk storage wastage when compared to CHAR data type. (d) BLOB data is streams of bytes of fixed length. (e) BYTE data type cannot store any type of binary data.
  8. 8. Data Types (a) FLOAT data type can store twice as many digits as SMALLFLOAT. Refers to Precision and Not Large in Number FLOAT (DOUBLE PRECISION) Double Precision 14-16 significant digits SMALLFLOAT (REAL) Single Precision 7-8 significant digits
  9. 9. Data Types (b) INTEGER data type can store decimal numbers exceeding that number 32,767 INTEGER can store whole numbers Not Decimals
  10. 10. Data Types (c) VARCHAR data type often reduces disk storage wastage when compared to CHAR data type. CHAR fixed length of specified value VARCHAR variable length up to specified maximum
  11. 11. Data Types (d) BLOB data is streams of bytes of fixed length. Binary Large Object (BLOB) is a streams of bytes of arbitrary value and length. A BLOB might be a digitised image or sound
  12. 12. Data Types (e) BYTE data type cannot store any type of binary data. BYTE is a type of BLOB Stores non-character-based information such as digitised images, sound Therefore, can store binary data.
  13. 13. 21) Which of the following may happen during the process of normalization ? (a) creation of new tables, (b) splitting of a table into several tables, (c) merging of several tables into one table, (d) removing some relationships among existing relations of the scheme, (e) removing existing constraints.
  14. 14. Normalisation (a) creation of new tables functional dependencies on part of key and transitive dependencies are removed by putting these attributes in separate tables. Thus we create new tables. As well as split existing tables. (b) splitting of a table into several tables
  15. 15. Normalisation (c) merging of several tables into one table merging of tables is required only to denormalised relations (d) removing some relationships among existing relations of the scheme, (e) removing existing constraints last two options has nothing to do with normalisation process.
  16. 16. 22) Which set of operators represent the complete set for relational algebra ? (a) Union, Difference, Projection, Selection, Cartesian Product (b) Selection, Cartesian Product, Projection, Union, Intersection (c) Cartesian Product, Projection, Selection, Difference, Intersection (d) Join, Union, Projection, Selection, Difference (e) Difference, Projection, Selection, Join, Intersection
  17. 17. Relational Algebra Set Operators Union, Difference (Minus), Intersection Relational Operators Projection, Selection (Restrict), Cartesian Product, Join, Natural Join, Divide The complete set is sufficient to reconstruct any other operator. E.g. Intersection, Join etc may be reconstructed using this set. (a) Union, Difference, Projection, Selection, Cartesian Product
  18. 18. 23) Which of the following are supported by Entry-level SQL-92 standard ? (a) Embedded SQL (b) Integrity enhancement (c) System catalogs (d) Triggers and stored procedures (e) Outer Join
  19. 19. Entry Level SQL-92 <ul><li>SQL Standards: knowledge of features supported at various levels is required </li></ul><ul><li>The SQL92 (also called SQL2) standard has three levels of definition with a long list of features. </li></ul><ul><li>Entry level SQL92 </li></ul><ul><li>Intermediate level SQL92 </li></ul><ul><li>Full SQL92 </li></ul>
  20. 20. Full SQL89 <ul><li>SQL89 is a revision of the original 1986 standard. The full SQL89 standard includes an integrity enhancement which includes: </li></ul><ul><li>Primary key specification </li></ul><ul><li>Referential integrity constraints (foreign key referencing a primary key) </li></ul><ul><li>Default value for a column </li></ul><ul><li>Check constraints (validation options for a column) </li></ul>
  21. 21. Entry Level SQL92 <ul><li>Entry level SQL92 includes </li></ul><ul><li>All of SQL89 plus the integrity enhancement </li></ul><ul><li>Embedded SQL </li></ul><ul><li>(a) Embedded SQL </li></ul><ul><li>(b) Integrity enhancement </li></ul>
  22. 22. Intermediate Level SQL92 <ul><li>Intermediate level SQL92 includes </li></ul><ul><li>Entry level SQL92, plus: </li></ul><ul><ul><li>Dynamic SQL </li></ul></ul><ul><ul><li>Drop and alter table statements </li></ul></ul><ul><ul><li>System catalog (c) </li></ul></ul><ul><ul><li>Date/time data types </li></ul></ul><ul><ul><li>Referential actions -- cascade delete </li></ul></ul><ul><ul><li>Outer join operator (e) </li></ul></ul>
  23. 23. Full Level SQL92 <ul><li>Full level SQL92 includes </li></ul><ul><li>Intermediate level SQL92, plus: </li></ul><ul><ul><li>Bit string (BLOB) data type </li></ul></ul><ul><ul><li>Referential actions -- cascade update </li></ul></ul>
  24. 24. SQL3 <ul><li>SQL3 includes </li></ul><ul><li>Full level SQL92, plus: </li></ul><ul><ul><li>Triggers and stored procedures (d) </li></ul></ul><ul><ul><li>Object-oriented capabilities such as user defined data types and class hierarchies </li></ul></ul>
  25. 25. 24) Which set of key words cannot be used with SQL INSERT statement to enter data? (a) Insert, Select, Into, Set, Where (b) Insert, Into, Values, Copy (c) Select, Into, From, Where, Having (d) Into, Insert, Values, Null (e) From, Distinct, To, Insert, Having
  26. 26. SQL INSERT <ul><li>INSERT INTO table-name ( column-name, ) , </li></ul><ul><ul><li>| VALUES ([ constant, NULL],) or </li></ul></ul><ul><ul><li>| SELECT retrieval condition </li></ul></ul><ul><li>(a) Insert, Select, Into, Set , Where </li></ul><ul><li>(b) Insert, Into, Values, Copy </li></ul><ul><li>(c) Select, Into, From, Where, Having </li></ul><ul><li>(d) Into, Insert, Values, Null </li></ul><ul><li>(e) From, Distinct, To , Insert, Having </li></ul>
  27. 27. 25) Select the statement(s) that is (are) correct with respect to the use of JOIN (a) A table can join to itself creating a self-referencing join called a SELF-JOIN. (b) An EQUI-JOIN between two tables in a SELECT statement returns only the rows that have matching values in the join columns. (c) In an OUTER-JOIN, all of the rows of the dominant table are retrieved regardless of whether there are corresponding rows in the other table. (d) In an OUTER-JOIN, a join condition does not need to have the WHERE clause. (e) OUTER-JOIN cannot be used to join 3 tables.
  28. 28. JOIN (a) A table can join to itself creating a self-referencing join called a SELF-JOIN. Employee( empno , name, supervisor, deptno) SELECT e.empno, e.name, s.name FROM Employee e, Employee s WHERE e.empno=s.supervisor
  29. 29. JOIN (b) An EQUI-JOIN between two tables in a SELECT statement returns only the rows that have matching values in the join columns. Employee( empno , name, supervisor, deptno) Department( deptno , name) SELECT e.empno, e.name, d.name FROM Employee e, Department d WHERE e.deptno=d.deptno
  30. 30. JOIN (c) In an OUTER-JOIN, all of the rows of the dominant table are retrieved regardless of whether there are corresponding rows in the other table. SELECT e.empno, e.name, d.name FROM Employee e, OUTER JOIN Department d WHERE e.deptno=d.deptno Retrieve all employee data regardless of match. Use NULL for those not matched.
  31. 31. JOIN (d) In an OUTER-JOIN, a join condition does not need to have the WHERE clause. SELECT e.empno, e.name, d.name FROM Employee e, OUTER JOIN Department d WHERE e.deptno=d.deptno OR SELECT e.empno, e.name, d.name FROM (Employee AS e OUTER JOIN Department AS d ON e.deptno=d.deptno)
  32. 32. JOIN (e) OUTER-JOIN cannot be used to join 3 tables.
  33. 33. Contact <ul><li>External Degree Unit (EDU) of the Institute of Computer Technology </li></ul><ul><li>No. 221/2A, Dharmapala Mawatha, </li></ul><ul><li>Colombo 7. </li></ul><ul><li>Phone : 074-720511 </li></ul><ul><li>Fax : 074-720512 </li></ul><ul><li>Email : bit@ict.cmb.ac.lk </li></ul><ul><li>http://www.ict.cmb.ac.lk/bit.htm </li></ul>

×