Top Banner

of 37

FINALTERM EXAMINATION.doc

Apr 03, 2018

Download

Documents

hassan_m2222
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 7/28/2019 FINALTERM EXAMINATION.doc

    1/37

    FINALTERM EXAMINATION

    Spring 2010

    CS403- Database Management Systems (10 Aug 2010)

    Question No: 1 ( Marks: 1 ) - Please choose oneWhich of the following statements is true about the views? view is always a complete set of all the tables in a database View can not be used for retrieving data The results of using a view are not permanently stored inthe database. Rows can not be updated or deleted in the viewQuestion No: 2 ( Marks: 1 ) - Please choose oneWhat is the alternate name of Data Dictionary? Index Metadata Data System CatalogQuestion No: 3 ( Marks: 1 ) - Please choose oneIN function helps reduce the need to use multiple AND conditions.True FalseQuestion No: 4 ( Marks: 1 ) - Please choose oneBrowser based forms are developed in the following tools EXCEPT HTML Scripting language Front Page Web-based Forms

    Question No: 5 ( Marks: 1 ) - Please choose oneWhich of the following are the general activities, which are performedduring the development of application programs? Data input programs Editing Display All of given

  • 7/28/2019 FINALTERM EXAMINATION.doc

    2/37

    Question No: 6 ( Marks: 1 ) - Please choose oneWhich of the following is not true about De-normalization? It is the process of attempting to optimize the performance of a

    database De-normalization is a technique to move from lower tohigher normal forms of database modeling It enhances the performance of DB In de-normalization it is required to add redundant data.Physical Record and DenormalizationDenormalization is a technique to move from higher to lower normalforms ofdatabase modeling in order to speed up database access.Denormalization process isapplied for deriving a physical data model from a logical form. In

    logical data basedesign we group things logically related through same primary key. Inphysicaldatabase design fields are grouped, as they are stored physically andaccessed byDBMS. In general it may decompose one logical relation into separatephysicalrecords, combine some or do both. There is a valid reason fordenormalization that isto enhance the performance.Question No: 7 ( Marks: 1 ) - Please choose one

    Which of the following gives all the fields from employee table namedas EMP? SELECT * from EMP; SELECT emp* from EMP' SELECT emp_id where EMP; SELECT * where EMP;Question No: 8 ( Marks: 1 ) - Please choose oneWhich of the following types of partitioning reduces the chances of

    unbalanced partitions? Vertical List Hash RangeHash Partitioning:It is a type of horizontal partitioning. In this type particular algorithm is applied and

  • 7/28/2019 FINALTERM EXAMINATION.doc

    3/37

    DBMS knows that algorithm. So hash partitioning reduces the chances ofunbalanced

    Question No: 9 ( Marks: 1 ) - Please choose one

    While recovering data, which of the following files does a recoverymanager examines at first? A system file Log file Data dictionary MetadataQuestion No: 10 ( Marks: 1 ) - Please choose oneWhich of the following is NOT a feature of Indexed sequential files? Records are stored in sequence and index is maintained.

    Dense and nondense types of indexes are maintained. Track overflows and file overflow areas can not be ensured. Cylinder index increases the efficiencyIndexed Sequential Summary:Following are salient features of Indexed sequential file structure:

    Records are stored in sequence and index is maintained.Dense and nondense types of indexes are maintained.

    Track overflows and file overflow areas are ensured.

    Cylinder index increases the efficiency .

    Question No: 13 ( Marks: 1 ) - Please choose one

    ALTER TABLE examsRENAME COLUMN Q_description TO Question_Descp, Std_ID toStudent_ID.Syntax of ALTER TABLE is NOT correct. True FalseQuestion No: 14 ( Marks: 1 ) - Please choose oneWhich of the following SQL commands deletes a record of an employeewith the employee_id 12345, from a table named PERSON.

    DELETE FROM person WHERE employee_id = 12345 DELETE WHERE person FROM employee_id = 12345 DROP FROM person WHERE employee_id = 12345 DELETE WHERE person WHERE employee_id = 12345Question No: 15 ( Marks: 1 ) - Please choose oneWhich of the following is not a form of optical disk?

  • 7/28/2019 FINALTERM EXAMINATION.doc

    4/37

    CD ROM WORM Erasable Optical EEPROM

    Question No: 16 ( Marks: 1 ) - Please choose oneWhich of the following is the correct description of cache hit? When data is found in the cache When data is removed in the cache The number of times the cache is accessed directly by the processor When data is lost from the cacheQuestion No: 17 ( Marks: 1 ) - Please choose oneIn which of the following situations, Clustering is suitable: Frequently updating

    Relatively static Relatively deletion Relatively dynamicQuestion No: 18 ( Marks: 1 ) - Please choose oneWhich of the following is disadvantage of chaining technique to handlethe collisions?Unlimited Number of elements Fast re-hashingOverhead of multiple linked lists Maximum number of elements must be known

    Question No: 19 ( Marks: 1 ) - Please choose oneWhich of the following is NOT a component of a DFD? Select correctoption:DataflowDatastoreExternal entitiesRelationship between external entitiesQuestion No: 20 ( Marks: 1 ) - Please choose one

    Laser records data by burning microscopic holes in the surface of thedisk with a Hard disk RAM Optical disk Floppy disk

  • 7/28/2019 FINALTERM EXAMINATION.doc

    5/37

    Optical disks record data by burning microscopic holes in the surfaceof the disk witha laser. To read the disk, another laser beam shines on the disk anddetects the holesby changes in the reflection pattern.

    Question No: 21 ( Marks: 1 ) - Please choose oneWhich of the following concepts is applicable with respect to 3NF? Full functional dependency Any kind of dependency Transitive dependency Partial functional dependencyQuestion No: 22 ( Marks: 1 ) - Please choose oneWhich of the following is NOT a feature of a good interface?

    Consistency Process based Data structure based User friendlyQuestion No: 23 ( Marks: 2 )Give 2 similarities between Materialized views and indexes.Question No: 24 ( Marks: 2 )

    What are the forms of cache normally used in desktop computersQuestion No: 25 ( Marks: 3 )Write the properties of Sequence FileQuestion No: 26 ( Marks: 3 )What is meant by database recovery services?Question No: 27 ( Marks: 5 )

    Write four steps to recover from a deadlock between the transactionsQuestion No: 28 ( Marks: 5 )

    Consider a table named COMPANY with fields COMPANY_NAME,

  • 7/28/2019 FINALTERM EXAMINATION.doc

    6/37

  • 7/28/2019 FINALTERM EXAMINATION.doc

    7/37

    3 5 1

    Question No: 5 ( Marks: 1 ) - Please choose oneSuppose there are 4 rows and 3 columns in TABLE1 and 6 rows and 5 coulmns in TABLE2;what is the size of the cartesian product incase of CROSS JOIN between these two tables?

    24 20 18 15

    Question No: 6 ( Marks: 1 ) - Please choose oneWhich of the following is not one of the properties of Transaction?

    atomicity consistency redundancy durability

    Question No: 7 ( Marks: 1 ) - Please choose oneWhich of the following is INCORRECT about VIEWS?

    It is not possible to left out the data which is not required for a specific view .A database view displays one or more database records on the same page. Views can be used as security mechanisms Views are generally used to focus the perception each user

    has of the database.Question No: 8 ( Marks: 1 ) - Please choose oneWhich of the following gives all the fields from employee table named as EMP?

    select * from EMP; select emp* from EMP' select emp_id where EMP; select * where EMP;

    Question No: 9 ( Marks: 1 ) - Please choose one

    Consider the relation Interview(CandidateNo, InterviewDate, InterviewTime, StaffNo,RoomNo)and the following functional dependencies.FD1 : CandidateNo, InterviewDate -> InterviewTime, StaffNo, RoomNoFD2 : RoomNo, InterviewDate, InterviewTime -> StaffNo, CandidateNoFD3 : StaffNo, InterviewDate -> RoomNoWhich of the following is correct?

    The relation Interview is in 3NF The relation Interview is in BCNF. The FD3 violates 3NF. The FD2 violates 2NF.

  • 7/28/2019 FINALTERM EXAMINATION.doc

    8/37

    Question No: 10 ( Marks: 1 ) - Please choose oneWhich of the following types of partitioning reduces the chances of unbalanced partitions?

    vertical List Hash Range

    Hash Partitioning:It is a type of horizontal partitioning. In this type particular algorithm is applied andDBMS knows that algorithm. So hash partitioning reduces the chances of unbalancedpartitions to a large extent Question No: 11 ( Marks: 1 ) - Please choose oneWhich of the following is one of the purposes of using DDL commands?

    inserting records into databases updating records into databases manipulating databases creating and destroying databases

    Question No: 12 ( Marks: 1 ) - Please choose oneWhich of the following statements creates a database named COMPANY.

    CREATE DATABASE company CREATE DB company

    ADD DATABASE copmany CREATE company DATABASE

    Question No: 13 ( Marks: 1 ) - Please choose oneWhat is the impact of setting multiple indexes for the same key, in index sequential files?

    Multiple indexes for the same key can not be set It increases efficiency It decreases efficiency It will increase complexity as the access time will be increased

    New records are added to an overflow fileRecord in main file that precedes it is updated to contain a pointer tothe new recordThe overflow is merged with the main file during a batch update Multiple indexes for the

    same key field can be set up to increaseefficiencyQuestion No: 14 ( Marks: 1 ) - Please choose oneConsider a transaction which includes following operationsZ= Z + 10Write Z...Suppose that the value of Z after addition and the execution of this operation is 17. Nowagainst the write operation the entry made in the log file will beWhat does Z reflects in the above entry?

    Object being updated Identity of the transaction

    Object value Identity of the next transaction to be executed

    In the entry, Tn reflects the identity of the transaction, Z is the object being updatedand 33 is the value that has to be placed in Z.Question No: 15 ( Marks: 1 ) - Please choose oneWhich of the following is not true regarding DB transactions?

    A set of database operations that are processed partly A database transaction is a logical unit of database operationsA database transaction must be atomic

  • 7/28/2019 FINALTERM EXAMINATION.doc

    9/37

    A database transaction must contains the ACID propertyThe transaction-processing system ensures that either all operations in a transaction arecompleted without error, or none of them are. If some of the operations are completed buterrors occur when the others are attempted, the transaction-processing system rollsback allof the operations of the transaction (including the successful ones), thereby erasingall traces of the transaction and restoring the system to the consistent, known state that it

    was in before processing of the transaction began. If all operations of a transaction arecompleted successfully, the transaction is committed by the system, and all changes to thedatabase are made permanent; the transaction cannot be rolled back once this is doneQuestion No: 16 ( Marks: 1 ) - Please choose oneWhich of the following is not true about input forms?

    Provide an easy, effective, efficient way to enter data into a table Especially useful when the person entering the data is not familiar with the inner

    workings Provide different controls to add data into the tables One input forms can populate one table at a time

    Question No: 17 ( Marks: 1 ) - Please choose oneWhich of the following is an example of volatile memory?

    RAM

    ROM Flash memory CPU

    Question No: 18 ( Marks: 1 ) - Please choose oneWhich of following is NOT generally the aim of data partitioning and placement of data?

    Reduce Workload Balance Workload Merging different relations Speed up rate of useful works.

    Question No: 19 ( Marks: 1 ) - Please choose oneALTER TABLE examsRENAME COLUMN Q_description TO Question_Descp, Std_ID to Student_ID.

    Syntax of ALTER TABLE is NOT correct. True False

    Question No: 20 ( Marks: 1 ) - Please choose oneWhich of the following is Advantage ofRe-Hashing technique to handle the collisions?

    Collisions dont use primary table space Unlimited number of elements Fast access through use of main table space (page29 vuzs) Overhead of multiple linked lists

    Question No: 21 ( Marks: 1 ) - Please choose oneMaterialized views and Indexes are NOT similar by the following way(s).

    They consume storage space They must be refreshed when the data in their master tables changes.

    They can be accessed directly using a SELECT statementAll of the Given

    Unlike indexes, materialized views can be accessed directly using a SELECT statement.Question No: 22 ( Marks: 1 ) - Please choose oneSelect 'NORTH', CUSTOMER From CUST_DTLS Where REGION = 'N' OrderByCUSTOMER Union Select 'EAST', CUSTOMER From CUST_DTLS WhereREGION = 'E' Order By CUSTOMERThe above statement:

    http://en.wikipedia.org/wiki/Commit_(data_management)http://en.wikipedia.org/wiki/Commit_(data_management)
  • 7/28/2019 FINALTERM EXAMINATION.doc

    10/37

    Has an error - the string should be in double quotes. Has an error - ORDER BY clause. Does not have an error. Has an error - the string in single quotes 'NORTH' and 'SOUTH'.

    Question No: 23 ( Marks: 1 ) - Please choose oneA software package designed to store and manage databases

    Database DBMS Data model Data

    A Database Management System (DBMS) is a software package designed to store andmanage databases. Database Management SystemsQuestion No: 24 ( Marks: 1 ) - Please choose oneWho is responsible for authorizing access to the database, for coordinating and monitoringits use ?

    Database Designers Database Administrators End UsersApplication Programmers

    Question No: 25 ( Marks: 1 ) - Please choose oneA superkey that does not contain a subset of attributes that is itself a superkey is called a____.

    candidate key primary key superkey secondary key

    Question No: 26 ( Marks: 1 ) - Please choose oneA ____ entity has a primary key that is partially or totally derived from the parent entity in therelationship.

    strong weak

    business relationshipA weak entity has a primary key that is partially or totally derived from the parent entity in therelationshipQuestion No: 27 ( Marks: 2 )What is the data type?

    A data type (or datatype) In programming, a classification identifying one of various types ofdata, as floating-point, integer, or Boolean, stating the possible values for that type, theoperations that can be done on that type, and the way the values of that type are stored.Question No: 28 ( Marks: 2 )Which DML statement changes the values of one or more columns based on someconditions.Update command

    Question No: 29 ( Marks: 2 )Name the two types of caching that are commonly used in personal computers?Two types of caching are commonly used in personal computers: memorycaching and disk cachingQuestion No: 30 ( Marks: 2 )What is Serial Execution?Serial execution is an execution where transactions are executed in a sequential order,that is, one after another. A transaction may consist of many operations. Serialexecution means that all the operations of one transaction are executer first, followed

  • 7/28/2019 FINALTERM EXAMINATION.doc

    11/37

    by all the operations of the next transaction and like that.Question No: 31 ( Marks: 3 )Write three benefits of using VIEWS.1. They work as table and, provide security from unauthorized access.

    2. updated automatically when some changes occurs in original table

    3. views give a group of users access to just the information they are allowed to

    Question No: 32 ( Marks: 3 )Shortly explain BYTE data field?Some of more frequently supported numeric data types include Byte, Integer, and LongInteger. Each of these types supports different range of numeric values and takes 1, 4 or 8bytes to store. Now, if we declare the age attribute as Long Integer, it will definitely serve thepurpose, but we will be allocating unnecessarily large space for each attribute. A Byte typewould have been sufficient for this purpose since you wont find students or employees ofage more than 255, the upper limit supported by Byte data type.Question No: 33 ( Marks: 3 )

    State the main purpose of index in relation with the queries executions.It will help searching the required data by directly accessing it via index.Question No: 34 ( Marks: 5 )Differentiate between the cluster index and non cluster index ?1 A cluster index is a form of tables which consist of column and rows.2 Cluster index exists on the physical level3 It sorts the data at physical level4 It works for the complete table5 There is a whole table in form of sorted data6 A table can contain only one cluster indexNon Cluster Index1 A non cluster index is in the form of a report about the tables.2 They are not created on the physical level but at the logical level

    3 It does not sort the data at physical level4 A table has 255 non clustered indexes5 A table has many non clustered indexes.6 Itwork on the order of dataQuestion No: 35 ( Marks: 5 )Consider the two relations,Department (Dept_Code, Dep_Name,Dept_Head) andEmployee(Emp_ID,Emp_Name, Designation, DoB, Dept).Write SQL statement to drop the primary key of Department relation? The fields inEmployee should reflect the removal in Department table.

    Answer:If you wanted to drop any Primary key column you first have to drop the primary keyconstraints and then you can drop the primary key column. (vuzs)

    ALTER TABLE Department DROP CONSTRAINT Pkzxyx;ALTER TABLE Department DROP COLUMN Dept_code;Question No: 36 ( Marks: 5 )

    Briefly explain rollback and rollforward

    http://www.blurtit.com/q280446.htmlhttp://www.blurtit.com/q6084595.htmlhttp://www.blurtit.com/q280446.htmlhttp://www.blurtit.com/q280446.htmlhttp://www.blurtit.com/q280446.htmlhttp://www.blurtit.com/q6084595.htmlhttp://www.blurtit.com/q280446.html
  • 7/28/2019 FINALTERM EXAMINATION.doc

    12/37

    FINALTERM EXAMINATION

    Spring 2010

    CS403- Database Management Systems

    Time: 90 min

    Marks: 58

    Question No: 1 ( Marks: 1 ) - Please choose one

    Which feature of database provides conversion from inconsistent state of DB toa consistent state ensuring minimum data loss?

    User accessible catalog

    Data processing

    Authorization service

    Recovery service

    .

    Question No: 2 ( Marks: 1 ) - Please choose one

    Which of the following statements is true about the views?

    view is always a complete set of all the tables in a database

    View can not be used for retrieving data

    The results of using a view are not permanently stored in the database.

    Rows can not be updated or deleted in the view

    Question No: 3 ( Marks: 1 ) - Please choose one

    Which of the following is true about TRUNCATE?

    Can be Rolled back.

    http://vuzs.net/http://vuzs.net/
  • 7/28/2019 FINALTERM EXAMINATION.doc

    13/37

    Activates Triggers.

    is DML Command.

    Resets identity of the table.

    1. TRUNCATE is faster and uses fewer system and transaction log resources thanDELETE.

    2. TRUNCATE removes the data by deallocating the data pages used to store the

    table's data, and only the page deallocations are recorded in the transaction log.

    3. TRUNCATE removes all rows from a table, but the table structure, its columns,

    constraints, indexes and so on, remains. The counter used by an identity for new rows isreset to the seed for the column.

    4. You cannot use TRUNCATE TABLE on a table referenced by a FOREIGN KEYconstraint. Because TRUNCATE TABLE is not logged, it cannot activate a trigger.

    5. TRUNCATE cannot be rolled back.

    6. TRUNCATE is DDL Command.

    7. TRUNCATE Resets identity of the table

    Question No: 4 ( Marks: 1 ) - Please choose one

    Which of the following is the correct way to find out the size of cartesian productincase of CROSS JOIN?

    the number of columns in the first table multiplied by the number of columns in thesecond table.

    the number of columns in the first table multiplied by the number of rows in the secondtable.

    the number of rows in the first table multiplied by the number of columns in the first table.

    the number of rows in the first table multiplied by the number of rows in thesecond table.

    Question No: 5 ( Marks: 1 ) - Please choose one

    Suppose there are 8 rows and 4 columns in TABLE1 and 3 rows and 4 coulmnsin TABLE2; what is the size of the cartesian product incase of CROSS JOINbetween these two tables?

    24

  • 7/28/2019 FINALTERM EXAMINATION.doc

    14/37

    32

    12

    16

    Question No: 6 ( Marks: 1 ) - Please choose one

    Which of the following is not one of the properties of Transaction?

    atomicity

    consistency

    redundancy

    durability

    .

    Question No: 7 ( Marks: 1 ) - Please choose one

    Which of the following is INCORRECT about VIEWS?

    It is not possible to left out the data which is not required for aspecific view.

    A database view displays one or more database records on the samepage.

    Views can be used as security mechanisms

    Views are generally used to focus the perception each user

    has of the database.

    Question No: 8 ( Marks: 1 ) - Please choose one

    Each course section is assigned a particular faculty member, and each coursesection corresponds to a particular course. Conceptually, what is the relationship

    between faculty and course (not course section).

    1:1

    1:M

    http://vuzs.net/http://vuzs.net/
  • 7/28/2019 FINALTERM EXAMINATION.doc

    15/37

    M:M

    Ternary

    Question No: 9 ( Marks: 1 ) - Please choose one

    Which of the following is used to add or drop columns in an existing table?

    ALTER

    HAVING

    SELECT

    THEN

    Question No: 10 ( Marks: 1 ) - Please choose one

    Which of the following is a correct way of selecting all the columns from a tablecalled PERSONS?

    SELECT FROM * Persons

    SELECT * FROM Persons

    SELECT * WHERE Persons

    SELECT WHERE * Persons

    .

    Question No: 11 ( Marks: 1 ) - Please choose one

    Which of the following is NOT a feature of Indexed sequential files?

    Records are stored in sequence and index is maintained.

    Dense and nondense types of indexes are maintained.

    Track overflows and file overflow areas can not be ensured.

    Cylinder index increases the efficiency

    Indexed Sequential Summary:

    Following are salient features of Indexed sequential file structure:

    http://vuzs.net/http://vuzs.net/
  • 7/28/2019 FINALTERM EXAMINATION.doc

    16/37

    Records are stored in sequence and index is maintained.

    Dense and nondense types of indexes are maintained.

    Track overflows and file overflow areas are ensured.

    Cylinder index increases the efficiency .

    Question No: 12 ( Marks: 1 ) - Please choose one

    Consider the given relations Studentand Instructoras given below. Please note that

    Fname and Lname also denote the First Name and Last Name respectively.

    Which of the following statements is correct with respect to the two relations given above?

    The two relations are not union-compatible since their attribute names differ.

    The two relations are union-compatible since they have the same type of tuples.

    The set operations such as CARTESIAN PRODUCT and DIVISION can bepplied on these two relations.

    To find out the students who are not instructors, it is necessary to perform theoperation Student Instructor.

    .

    Question No: 13 ( Marks: 1 ) - Please choose one

    Which of the following serves as a milestone or reference point in the log file?

    http://vuzs.net/http://vuzs.net/
  • 7/28/2019 FINALTERM EXAMINATION.doc

    17/37

    Constraints

    Relations

    Check points

    Transactions identities

    Checkpoint:

    Checkpoint is also a record or an entry in the log file. It serves as a milestone or

    reference point in the log file. At certain point in time the DBMS enters a log

    entry/record in the log file and also performs certain operations listed below:

    Question No: 14 ( Marks: 1 ) - Please choose one

    Which of the following is not true regarding DB transactions?

    A set of database operations that are processed partly

    A database transaction is a logical unit of database operations

    A database transaction must be atomic

    A database transaction must contains the ACID property

    .

    Question No: 15 ( Marks: 1 ) - Please choose one

    Which of the following are the general activities, which are performed during thedevelopment of application programs?

    Data input programs

    Editing

    Display

    All of given

    .

    Question No: 16 ( Marks: 1 ) - Please choose one

    Browser based forms are developed in the following tools EXCEPT

    http://vuzs.net/http://vuzs.net/http://vuzs.net/http://vuzs.net/
  • 7/28/2019 FINALTERM EXAMINATION.doc

    18/37

    HTML

    Scripting language

    Front Page

    Web-based Forms

    Browser Based

    These are web-based forms. They are developed in HTML, scripting language or

    Front Page.

    Question No: 17 ( Marks: 1 ) - Please choose one

    Which of the following is not a form of optical disk?

    CD ROM

    WORM

    Erasable Optical

    EEPROM

    Optical disks come in three basic forms:

    CD-ROM: Most optical disks are read-only. When you purchase them, they are

    already filled with data. You can read the data from a CD-ROM, but you cannot

    modify, delete, or write new data.

    WORM: Stands for write-once, read-many. WORM disks can be written on once and

    then read any number of times; however, you need a special WORM disk drive to

    write data onto a WORM disk.

    Erasable optical (EO): EO disks can be read to, written to, and erased just like

    magnetic disks.

    Question No: 18 ( Marks: 1 ) - Please choose one

    Which of the following is the correct description ofcache hit?

    When data is found in the cache

  • 7/28/2019 FINALTERM EXAMINATION.doc

    19/37

    When data is removed in the cache

    The number of times the cache is accessed directly by the processor

    When data is lost from the cache

    When data is found in the cache, it is called a cache hit, and the effectiveness of a

    cache is judged by its hit rate.

    Question No: 19 ( Marks: 1 ) - Please choose one

    In which of the following situations, Clustering is suitable:

    Frequently updating

    Relatively static

    Relatively deletion

    Relatively dynamic

    Question No: 20 ( Marks: 1 ) - Please choose one

    Only one type of constraint can be enforced in any table by CREATE command

    True

    False

    Question No: 21 ( Marks: 1 ) - Please choose one

    Which of the following is disadvantage ofchaining technique to handle thecollisions?

    Unlimited Number of elements

    Fast re-hashing

    Overhead of multiple linked lists (vuzs, Pg269)

    Maximum number of elements must be known

    Question No: 22 ( Marks: 1 ) - Please choose one

  • 7/28/2019 FINALTERM EXAMINATION.doc

    20/37

    Consider the following relation R and its sample data. (Consider that these are the onlytuples for the given relation)

    Which of the following statements is NOT correct?

    .

    The functional dependency ProjNo -> DeptNo holds over R.

    The functional dependency (EmpNo, ProjNo) -> DeptNo holds over R.

    The functional dependency DeptNo -> ProjNo holds over R.

    The functional dependency EmpNo -> DeptNo holds over R.

    This example illustrates the concept of functional dependency. The situation

    modeled is that of college students visiting one or several lectures in each which

    they are assigned a teaching assistant (TA). Let's further assume that every student

    is in some semester and is identified by an unique integer ID.

    StudentID Semester Lecture TA

    1234 6 Numerical Methods John

    1200 4 Numerical Methods Peter

    1234 6 Visual Computing Thomas

    1201 4 Numerical Methods Peter

    1201 4 Physics II Simone

    http://vuzs.net/http://vuzs.net/
  • 7/28/2019 FINALTERM EXAMINATION.doc

    21/37

    We notice that whenever two rows in this table feature the same StudentID, they

    also necessarily have the same Semester values. This basic fact can be expressed

    by a functional dependency:

    StudentID Semester.

    Other nontrivial functional dependencies can be identified, for example:

    {StudentID, Lecture} TA

    {StudentID, Lecture} {TA, Semester}

    The latter expresses the fact that the set {StudentID, Lecture} is a superkey of the

    relation.

    Question No: 23 ( Marks: 1 ) - Please choose one

    An entity type is

    defined when the database is actually constructed

    a specific type such as an integer, text, date, logical etc

    a coherent set of similar objects that we want to store data on (e.g.STUDENT, COURSE, CAR)

    defined by the database designer

    Entity Type

    The entity type can be defined as a name/label assigned to items/objects that exist in an

    environment and that have similar properties.

    Question No: 24 ( Marks: 1 ) - Please choose one

    An entity can be logically connected to another by defining a ____.

    hyperlink

    common attribute

    primary key

    superkey

    Question No: 25 ( Marks: 1 ) - Please choose one

  • 7/28/2019 FINALTERM EXAMINATION.doc

    22/37

    You cant modify more than one table at a time through a view.

    True

    False

    You cant modify more than one table at a time through a view.

    If your view is based on aggregate functions, you cant use it to modify data.

    If your view is based on a table that contains fields that dont allow null values yet yourview doesnt display those fields, then you wont be able to insert new data.

    Question No: 26 ( Marks: 1 ) - Please choose one

    Which of the following is one of the purposes of using DML commands?

    Creating databases

    Destroying databases

    Inserting data in tables

    Non of the above

    vuZs Querying , deleting, inserting and updating of records are the part ofDML

    Question No: 27 ( Marks: 2 )

    ?

    Question No: 28 ( Marks: 2 )

    Define domain of an attribute.

    Ans:

    Domain is the set of possible values that an attribute can have, that is, we specify a set ofvalues either in the form of a range or some discrete values, and then attribute can have

    value out of those values. Domain is a form of a check or a constraint on attribute that it

    cannot have a value outside this set.

    Question No: 29 ( Marks: 2 )

  • 7/28/2019 FINALTERM EXAMINATION.doc

    23/37

    Write the main feature ofvolatile storage media?

    Computer storage that is lost when the power is turned offis called as volatile storage. Forexample RAM

    Question No: 30 ( Marks: 2 )

    Suppose you want to delete a table row by row and record an entry in the transactionlog for each deleted row. Which DML command will you use?

    DELETE FROM ;

    Question No: 31 ( Marks: 3 )

    Write three benefits of using VIEWS.

    Views are generally used to focus, simplify, and customize the perception

    each user has of the database. Views can be used as security mechanisms

    by allowing users to access data through the view, without granting theusers

    permissions to directly access the underlying base tables of theview.Views allow users to focus on specific data that interests them andon the specific tasks for which they are responsible. Unnecessary data canbe left out of the view. This also increases the security of the databecause users

    Question No: 32 ( Marks: 3 )

    SELECT * FROM Persons

    WHERE FirstName LIKE '%da%';

    what does the above statement return?

    Ans: It will select all fields from the table from persons table where in the first name

    carry character da at any position

    Question No: 33 ( Marks: 3 )

    What is the difference between a primary key and a unique key with reference to clustered andnonclustered indexes?

    1. Primary key does not allow null value but unique key allows null

    values

  • 7/28/2019 FINALTERM EXAMINATION.doc

    24/37

    2. We can declare only one primary key in a table but a table can

    have multiple unique key

    3. Primary key has a cluster index so one table can have only one

    cluster index

    4. non-clustered index can be create on any key so a table can

    have multiple non-clusted key

    .

    Question No: 34 ( Marks: 5 )

    Consider a table named COMPANY with fields COMPANY_NAME,

    DESCRIPTION, ORDER_NUMBER. Write an SQL statement to display company namesin reverse alphabetical order.

    SELECT COMPANY_NAME FROM COMPANY ORDER BY COMPANY_NAMEDESC;

    Question No: 35 ( Marks: 5 )

    Name the five main components of Database management systems software.

    DBMS Engine accepts logical request from the various other DBMS

    subsystems, converts them into physical equivalents, and actually accesses the database

    and data dictionary as they exist on a storage device.

    Data Definition Subsystem helps user to create and maintain the data

    dictionary and define the structure of the files in a database.

    Data Manipulation Subsystem helps user to add, change, and delete

    information in a database and query it for valuable information. Software tools within the data

    manipulation subsystem are most often the primary interface between user and the

    information contained in a database. It allows user to specify its logical information

    requirements.

    http://vuzs.net/http://vuzs.net/
  • 7/28/2019 FINALTERM EXAMINATION.doc

    25/37

    Application Generation Subsystem contains facilities to help users to

    develop transaction-intensive applications. It usually requires that user perform a detailed

    series of tasks to process a transaction. It facilitates easy-to-use data entry screens,

    programming languages, and interfaces.

    Data Administration Subsystem helps users to manage the overall database

    environment by providing facilities for backup and recovery, security management, query

    optimization, concurrency control, and change management.

    Question No: 36 ( Marks: 5 )

    Give 4 similarities between Materialized views and indexes.

    1. They consume storage space.

    2. They must be refreshed when the data in their master tables changes.

    3. They improve the performance of SQL execution when they are used for query

    rewrites.

    4. Their existence is transparent to SQL applications and users.

    FINALTERM EXAMINATION

    Fall 2008

    CS403- Database Management Systems (Session - 3)

    Ref No:

    Time: 120 min

    Marks: 75

  • 7/28/2019 FINALTERM EXAMINATION.doc

    26/37

    Question No: 1 ( Marks: 1 ) - Please choose one

    _______Records data by burning microscopic holes in the surface of the disk with a

    laser.

    Hard disk

    RAM

    Optical disk

    Floppy disk

    Question No: 2 ( Marks: 1 ) - Please choose one

    ______ is a control that presents a set of choices from which a user can select one ormore items; items can be text, graphics, or both.

    Text input

    Report

    Button

    List box

    Question No: 3 ( Marks: 1 ) - Please choose one

    _______is a control that enables users to select one option from an associated list;

    users can also type an option.

    Combo box

    Button

    Text box

    Static area

  • 7/28/2019 FINALTERM EXAMINATION.doc

    27/37

    Question No: 4 ( Marks: 1 ) - Please choose one

    _______ is a control that users click to perform an action, set or toggle a state, or set

    an option.

    Button

    Text box

    Input form

    Report

    Question No: 5 ( Marks: 1 ) - Please choose one

    Which of the following is not true about input forms?

    Provide an easy, effective, efficient way to enter data into a table

    Especially useful when the person entering the data is not familiar with theinner workings

    Provide different controls to add data into the tables

    One input forms can populate one table at a time

    Question No: 6 ( Marks: 1 ) - Please choose one

    Browser based forms are developed in the following tools EXCEPT

    HTML

    Scripting language

    Front Page

    Web-based Forms

    Question No: 7 ( Marks: 1 ) - Please choose one

  • 7/28/2019 FINALTERM EXAMINATION.doc

    28/37

    Which of the following are the general activities, which are performed during the

    development of application programs?

    Data input programs

    Editing

    Display

    All of given

    Question No: 8 ( Marks: 1 ) - Please choose one

    Which of the following should not be a property of a database transaction?

    Atomicity

    Isolation

    Durability

    Divergence

    Question No: 9 ( Marks: 1 ) - Please choose one

    The main memory of a computer system is also known as

    ROM

    RAM

    PROM

    Hard disk

    Question No: 10 ( Marks: 1 ) - Please choose one

    While recovering data, which of the following files does a recovery manager

    examines at first?

  • 7/28/2019 FINALTERM EXAMINATION.doc

    29/37

    A system file

    Log file

    Data dictionary

    Metadata

    Question No: 11 ( Marks: 1 ) - Please choose one

    Which of the following is the correct way of removing the Index calledbranchNoIndex?

    DROP INDEX branchNoIndex;

    APPEND INDEX branchNoIndex;

    REMOVE INDEX branchNoIndex;

    DEL INDEX branchNoIndex;

    Question No: 12 ( Marks: 1 ) - Please choose one

    What is the alternate name of Data Dictionary?

    Index

    Metadata

    Data

    System Catalog

    Question No: 13 ( Marks: 1 ) - Please choose one

    The information regarding views and Integrity constraints are found in

    System Catalog

    Data Dictionary

  • 7/28/2019 FINALTERM EXAMINATION.doc

    30/37

    Indexes

    Both Data Dictionary and System Catalog

    Question No: 14 ( Marks: 1 ) - Please choose one

    Identify the correct statement.

    Referential integrity constraints check whether the primary key values are unique.

    Referential integrity constraints check whether an attribute value lies in the givenrange.

    Referential integrity constraints are specified between entities having recursiverelationships.

    When Referential integrity rules are enforced, a tuple in one relation that refers toanother

    relation must refer to an existing tuple.

    Question No: 15 ( Marks: 1 ) - Please choose one

    Select the correct statement among the following on proper naming of schema constructs:

    Entity type name applies to all the entities belonging to that entity type and therefore aplural name is selected for entity type.

    In the narrative description of the database requirements, verbs tend to indicate thenames of

    relationship types.

    The nouns arising from a database requirement description can be considered as namesof attributes.

    Additional nouns which are appearing in the narrative description of the database

    requirements represent the weak entity type names.

    Question No: 16 ( Marks: 1 ) - Please choose one

  • 7/28/2019 FINALTERM EXAMINATION.doc

    31/37

    Consider the following diagram depicting a kind of a relationship type where X and Z are

    entities and Y is a relationship type:

    Select the correct statement among the following on the above diagram.

    The relationship type Y is of cardinality ratio 1 : N.

    The diagram depicts existence dependencies.

    The participation of X in the Y relationship type is total.

    The participation of Z in the Y relationship type is partial.

    Question No: 17 ( Marks: 1 ) - Please choose one

    Identify the correct statement about ANSI/SPARC architecture.

    The external level is not concerned with individual user perceptions

    The internal level, in a database system, will always be relational

    Any given database has exactly one conceptual schema and one physical schema, but itmay have several external schemas.

    A data definition language is used to define the internal schema.

    Question No: 18 ( Marks: 1 ) - Please choose one

    Which of the following SQL commands deletes a record of an employee with the

    employee_id 12345, from a table named PERSON.

  • 7/28/2019 FINALTERM EXAMINATION.doc

    32/37

    DELETE FROM person

    WHERE employee_id = 12345

    DELETE WHERE person

    FROM employee_id = 12345

    DROP FROM person

    WHERE employee_id = 12345

    DELETE WHERE person

    WHERE employee_id = 12345

    Question No: 19 ( Marks: 1 ) - Please choose one

    Which of the following is NOT a feature of a good interface?

    consistency

    process based

    data structure based

    user friendly

    Question No: 20 ( Marks: 1 ) - Please choose one

    Identify the correct statement with respect to normalization.

    Normalization is a formal technique that can be used only at the starting phase of thedatabase design.

    Normalization can be used as a top-down standalone database design technique.

    The process of normalization through decomposition must achieve the losslessjoin

    property at any cost whereas the dependency reservation property is sometimes

    sacrificed.

  • 7/28/2019 FINALTERM EXAMINATION.doc

    33/37

    The process of normalization through decomposition must achieve thedependency

    reservation property at any cost whereas the lossless join property is sometimes

    sacrificed.

    Question No: 21 ( Marks: 1 ) - Please choose one

    Which of the following concept is applicable with respect to 2NF?

    Non-transitive dependency

    Full functional dependency

    Partial dependency

    Transitive dependency

    Question No: 22 ( Marks: 1 ) - Please choose one

    Suppose there are 4 fields in a table named CUST (customer_id, first_name,last_name, phone). Which of the following gives all the information of the customers

    in the table whose last name is ALI?

    SELECT * FROM CUST WHERE last_name='ALI';

    SELECT * FROM CUST WHERE last_name=ALI;

    SELECT * FROM CUSTOMER WHERE name=ALI;

    SELECT * FROM CUSTOMER WHERE last_name=ALI;

    Question No: 23 ( Marks: 1 ) - Please choose one

    Which of the following is INCORRECT about VIEWS?

    It is not possible to left out the data which is not required for a specific view.

    A database view displays one or more database records on the same page.

  • 7/28/2019 FINALTERM EXAMINATION.doc

    34/37

    Views can be used as security mechanisms

    Views are generally used to focus the perception each user

    has of the database.

    Question No: 24 ( Marks: 1 ) - Please choose one

    Identify the advantage of DELETE command over TRUNCATE.

    Can be Rolled back.

    is DDL Command.

    cannot activate a trigger.

    faster and uses fewer system

    Question No: 25 ( Marks: 1 ) - Please choose one

    Which of the following is true about TRUNCATE?

    Can be Rolled back.

    Activates Triggers.

    is DML Command.

    Resets identity of the table.

    Question No: 26 ( Marks: 1 ) - Please choose one

    Which of the following statements is true about the views?

    view is always a complete set of all the tables in a database

    View can not be used for retrieving data

    The results of using a view are not permanently stored in the database.

  • 7/28/2019 FINALTERM EXAMINATION.doc

    35/37

    Rows can not be updated or deleted in the view

    Question No: 27 ( Marks: 1 ) - Please choose one

    Which of the following statements are Data Definition Language command?

    INSERT

    UPDATE

    GRANT

    TRUNCATE

    Question No: 28 ( Marks: 1 ) - Please choose one

    Which of the following statements are Data Manipulation Language command?

    INSERT

    GRANT

    TRUNCATE

    CREATE

    Question No: 29 ( Marks: 1 ) - Please choose one

    GRANT SELECT, UPDATE(Designation) ON Employee TO Amali,Hiruni WITH GRANT

    OPTION;

    What does this SQL statement do?

    Grant permission to Amali,only to retrieve data from Employee table and grantpermission to

    Hiruni, only to update the designation from Employee table.

    Grant permission to Amali & Hiruni to retrieve data from Employee table.

    Grant permission to Hiruni in order to grant, select and update permission to Amali.

    Grant permission to Amali and Hiruni to update all data except designation inEmployee

  • 7/28/2019 FINALTERM EXAMINATION.doc

    36/37

    table

    Question No: 30 ( Marks: 1 ) - Please choose one

    Making a change to the conceptual schema of a database but not affecting the existing external

    schemas is an example of

    Physical data independence.

    Concurrency control.

    Logical data independence.

    Functional dependency

    Question No: 31 ( Marks: 1 )

    What is Ordering field?

    Question No: 32 ( Marks: 1 )

    Which clause is used to sort the records in the result set?

    Question No: 33 ( Marks: 2 )

    What is the major benefit of HASH paritioning?

    Question No: 34 ( Marks: 2 )

    How can we prevent deadlocks for concurrent Transactions?

    Question No: 35 ( Marks: 3 )

    State the major disadvantage of creating and using index.

  • 7/28/2019 FINALTERM EXAMINATION.doc

    37/37

    Question No: 36 ( Marks: 3 )

    Write any three factors which we consider while defining key in designing an

    indexed sequential file?

    Question No: 37 ( Marks: 3 )

    How do you select all records from the table using SQL statements? Write the

    syntax.

    Question No: 38 ( Marks: 5 )

    How can a VIEW be used for security measures?

    Question No: 39 ( Marks: 5 )

    In which situtation do you prefer DELETE command to delete a table instead of

    using DROP command?

    Question No: 40 ( Marks: 10 )

    Write four advantages and four disadvantages of De-normalization.

    Question No: 41 ( Marks: 10 )

    Explain and differentiate the two types of application users:

    Intermediate

    Expert