Showing posts with label Database Quizzes. Show all posts
Showing posts with label Database Quizzes. Show all posts

Friday, April 18, 2014

Database Normal Forms - Quiz 1

Normalization and Normal Forms in Database Design - Quiz 1


1. For a relation R, we are given that the domains of all attributes of R are indivisible. With this information, we can say the relation R is in
    1 NF
    2 NF
    3 NF
    BCNF

2. In a table with the schema STU(STUNO, STUNAME, ADDRESS, COURSENO, COURSENAME) and with the functional dependencies, STUNO --> STUNAME ADDRESS, COURSENO --> COURSENAME, STUNO COURSENO --> STUNAME ADDRESS COURSENAME, which of the following anomalies would present?
    Insetion Anomaly
    Deletion Anomaly
    Update Anomaly
    All of the above

3. A relation which has only atomic attributes and every non-key attribute fully functionally dependent on candidate keys is said to be in
    1 NF
    2 NF
    3 NF
    BCNF

4. Consider the schema given in question 2. Is the relation STU in 2 NF?
    YES
    NO

5. What does Atomic attribute mean?
    It is one type of attribute used in DBMS
    An attribute whose values can be divided into meaningful subparts
    An attribute whose values cannot be divided into meaningful subparts
    None of the above

6. If you have removed repeated groups of values from a relation and also removed the partial key dependencies, then we would say that the given relation is in
    1 NF
    2 NF
    3 NF
    BCNF

7. Assume a table with the schema STU(STUNO, STUNAME, ADDRESS, PINCODE) and with the functional dependencies, STUNO --> STUNAME ADDRESS PINCODE, PINCODE --> ADDRESS. Is this relation is in 2 NF?
    YES
    NO

8. A relation is said to be in 3 NF if which of the following is/are true?
    No partial key dependencies
    All attributes are atomic
    No presence of transitive dependencies
    All of the above

9. Assume a table with the schema STU(STUNO, STUNAME, ADDRESS, PINCODE) and with the functional dependencies, STUNO --> STUNAME ADDRESS PINCODE, PINCODE --> ADDRESS. Is this relation is in 3 NF?
    YES
    NO

10. Assume a table with the schema STU(STUNO, STUNAME, ADDRESS, COURSENO, COURSENAME) and with the functional dependencies, STUNO --> STUNAME ADDRESS, COURSENO --> COURSENAME, STUNO COURSENO --> STUNAME ADDRESS COURSENAME with no transitive dependency. The relation STU is in _______ NF?
    1 NF
    2 NF
    3 NF
    BCNF

Score =

Correct answers:

* You can also try other DBMS quizzes here

Sunday, April 6, 2014

Functional Dependency - Quiz 3

Relational Database Design - Functional Dependency Quiz 2


1. Which of the following of a relation schema R, fully functionally determines all attributes of R?
    Primary Key
    Candidate Key
    Both Primary and Candidate Key
    Neither Primary Key nor Candidate Key

2. Any attribute that is proper subset of a primary key of a relation schema is called as
    Descriptor attribute
    Composite attribute
    Prime attribute
    Atomic attribute

3. Two sets of Functional Dependencies F and G are considered equal if F+ = G+.
    TRUE
    FALSE

4. The words Canonical cover and Minimal cover meant the same.
    TRUE
    FALSE

5. An attribute of relation schema R, that is not a part of Primary key is always considered as Non-Prime attribute
    TRUE
    FALSE

6. Assume the candidate keys for a relation schema R(A,B,C,D,E) as {A,B}, {A,C}, {C,D}, and {A,B} is chosen as the Primary key for R. Which of the following is true?
    A is non-key attribute
    C is non-prime attribute
    E is key attribute
    None of the above

7. If DNo --> {DName, DLoc}, which of the following Armstrong's axioms allow the functional dependency DNo --> DName?
    Reflexivity rule
    Augmentation rule
    Decomposition rule
    Union rule

8. Assume that a bank relates every customer with the home branch in which the customer maintains an account. Which of the following is true?
    Branch --> Branch
    Customer --> Branch
    Customer --> Customer
    All of the above

9. A functional dependency AB --> C is said to be minimal if
    either A --> C or B --> C holds
    neither A --> C nor B --> C holds
    both A --> C and B --> C holds
    None of the above holds

10. In a relational schema R(A, B, C) with functional dependencies A --> B, B --> C, and A --> C, which of the functional dependencies is redundant?
    A --> C
    A --> B
    B --> C
    None of the above

Score =

Correct answers:

Monday, March 24, 2014

Functional Dependency - Quiz 2

RegNo
SName
Gen
PR
Phone
PManager
R1
Sundar
M
BTech
9898786756
Kumar
R2
Ram
M
MS
9897786776
Kumar
R3
Karthik
M
MCA
8798987867
Steve
R4
John
M
BSc
7898886756
Badrinath
R5
Priya
F
MS
9809780967
Kumar
R6
Ram
M
MTech
9876887909
Jagdeesh

Relational Database Design - Functional Dependency Quiz 2


1. Which of the following functional dependencies are held in the given table?
    RegNo --> SName Gen PR
    RegNo --> Phone
    PManager SName --> RegNo
    All of the above

2. {(RegNo --> SName Gen PR Phone PManager), (Phone --> RegNo SName Gen PR PManager), (PR --> PManager)}. If these are the functional dependencies of the given relation, which of the following is the Primary key?
    RegNo
    Phone
    (RegNo Phone)
    (RegNo PR)

3. Assume that (RegNo, SName), (PR, Gen), (Phone, RegNo), and (RegNo) are the super keys for a relation. Which of the following is the candidate key for this relation?
    SName
    RegNo
    PR
    Phone

4. For a table r(A, B, C, D, E), if (A, B), (A, B, E), and (C, D, E) are the candidate keys, which of the following would be the Primary key?
    ABE
    CDE
    AB
    None of the above

5. For a table ST(B, O, I, S, Q, D), if S --> D, I --> B, IS --> Q, and B --> O, then what are the keys for ST?
    IS
    IB
    BO
    SD

6. In a functional dependency with multiple attributes, which of the following is true?
    More than one attribute on LHS may be essential
    More than one attribute on RHS may be essential
    Both are essential
    None of the above

7. If A --> B, B --> C, and C --> D, then which of the following is true?
    A --> C
    B --> D
    A --> D
    All of the above

8. If A --> BC, then A --> B and _________ is Decomposition rule.
    B --> C
    B --> A
    A --> C
    All of the above

9. Union rule, Decomposition rule, and Pseudotransitivity rule can be proved using Armstrong's axioms.
    TRUE
    FALSE
    TRUE
    FALSE

10. In a relational schema R(A, B, C, D, E) with functional dependencies AC --> E, C --> D, and D --> A, which of the functional dependencies has an extraneous attribute?
    AC --> E
    C --> D
    D --> A
    None of the above

Score =

Correct answers:

Sunday, March 23, 2014

Functional Dependency Quiz 1

Relational Database Design - Functional Dependency Quiz


1. __________ refers to a attribute or group of attributes mentioned in the left hand side of the arrow in a FD.
    Discriminator
    Determinant
    Multivalued attribute
    All of the above

2. In a functional dependency X --> Y, if Y is functionally dependent on X, but not on X's proper subsets, then we would call the functional dependency as
    Full Functional Dependency
    Partial Functional Dependency
    Multivalued Functional Dependency
    None of the above

3. Which of the following is the result of bad database design?
    Repetition of Information
    Inability to represent some information
    Inconsistent database state due to some transaction
    All of the above

4. If X is {E, G, H, M} and Y is {G, M} then X --> Y is
    Augmentation Rule
    Reflexivity Rule
    Union Rule
    Pseudotransitivity Rule

5. If X --> YZ then X --> Y and X --> Z is
    Composition Rule
    Reflexivity Rule
    Union Rule
    Decomposition Rule

6. Consider F1 and F2 as two sets of functional dependencies. If every functional dependency in F2 can be inferred from the functional dependencies of F1 using inference rules, then F1 is _________ of F2
    Cover Set
    Closure Set
    Minimal Set
    None of the above

7. If X --> Y is a functional dependency and X and Y are sets of attributes, what is the relationship between X and Y?
    One-to-Many
    Many-to-One
    One-to-One
    Many-to-Many

8. For a functional dependency X --> Y, it is said to be _________ if Y is the subset or equal to X.
    Total
    Trivial
    Non-trivial
    Partial

9. To check whether X (a set of one or more attributes) is a candidate key of relation R, we need to find ______ of X.
    Canonical Cover
    Closure
    Minimal Cover
    None of the above

10. (a) If every functional dependency in F1 can be inferred from F2 on application of inference rules, and
      (b) removal of any one attribute from any functional dependency of F2 violates (a).   
Then F2 is called ______ for F1.
    Minimal Cover
    Canonical Cover
    Both Minimal and Canonical Cover
    None of the above

Score =

Correct answers:

Friday, March 21, 2014

ER Model Quiz 3

DBMS Basics and Entity-Relationship Model - Quiz 3


1. Degree of relational table is
    Number of records in the table
    Number of attributes in the table
    Number of candidate keys in the table
    Number of distinct records in the table

2. Cardinality of the relational table is
    Number of records in the table
    Number of attributes in the table
    Number of candidate keys in the table
    Number of distinct records in the table

3. Which of the following would be the appropriate term for a key which consists of more than one attribute?
    Composite Key
    Candidate Key
    Primary Key
    None of the above

4. Degree of the relationship set is
    Number of records in the relational table
    Number of attributes in the relationship set
    Number of participating entity sets in the relationship set
    Number of distinct records in the relationship set

5. Cardinality of an attribute in a relational table is
    Number of unique values in the attribute
    Number of duplicated values in the attribute
    Number of values in the attribute
    None of the above

6. A Multivalued attribute in an ER diagram
    Must be directly mapped into the base table to which it belongs
    Must be mapped into a different table
    Must not be mapped into any tables
    Must be mapped into the relationship table

7. The set of candidate keys that are not selected as the Primary key is called
    Primary Keys
    Composite Keys
    Alternate Keys
    All of the above

8. "CREATE TABLE Emp (Emp_No CHAR(5), EName VARCHAR(25), SALARY NUMBER(8))". This DDL statment will
    Create a table named Emp
    Create a table named Emp and Update data dictionary
    Show error
    Not update data dictionary as the table does not have any primary key

9. An attribute or set of attributes of one relation that matches an attribute or set of attributes of other relation is
    Primary Key
    Candidate Key
    Super Key
    Foreign Key

10. Which of the following is an Integrity constraint?
    INT datatype
    NOT NULL
    DATE datatype
    All of the above

Score =

Correct answers:

Wednesday, March 19, 2014

ER Model Quiz 2

DBMS Basics and Entity-Relationship Model - Quiz 2


1. Execution of a Data Definition Language (DDL) statement will
    Create a Table
    Update Data Dictionary
    Both Create a Table and Update Data Dictionary
    Define the User Privileges

2. ________________ need an user to specify in a query "What data are required and how to retrieve the required data?"
    Procedural DML
    Declarative DML
    Non-Procedural DML
    Transaction Control Language

3. Which of the following users interact with the database directly using Query languages?
    Naive Users
    Specialized Users
    Sophisticated Users
    Applicaton Programmers

4. Which of the following is one of the main tasks of Database Administrator (DBA)?
    Interface Program Development
    Writing DML Precompilers
    Schema Definition
    None of the above

5. The number of entity sets linked through a single relationship set is
    Degree of Relationship set
    Degree of Entity set
    Degree of Attribute set
    All of the above

6. If single record in relation R is associated with zero or more number of records in relation S, and single record in S is associated with any number of records in R, then the relationship is
    One-to-One
    One-to-Many
    Many-to-One
    Many-to-Many

7. If single record in relation R is associated with zero or more number of records in relation S, and any single record in S is associated with only one record in R, then the relationship is
    One-to-One
    One-to-Many from R to S
    Many-to-One from R to S
    Many-to-Many

8. A minimal super key (i.e, one of the super keys for which no proper subset is a super key) is called
    Super Key
    Candidate Key
    Primary Key
    Both Candidate and Primary key

9. An entity set which does not have enough attributes to form a Primary key is
    Strong Entity Set
    Weak Entity Set
    Strong Relationship Set
    Weak Relationship Set

10. In an ER Diagram, a double ellipse is used to represent
    Simple Attribute
    Composite Attribute
    Descriptive Attribute
    Multi-valued Attribute

Score =

Correct answers:

Tuesday, March 18, 2014

ER Model - Quiz 1

DBMS Basics and Entity-Relationship Model - Quiz 1


1. ER modeling is primarily used for
    Database Programming
    Organizing Databases
    Designing Databases
    None of the above

2. An Entity Set is
    a set of entities of the same type that share the same properties
    a set of entities of different type that share the same properties
    a set of entities of different type that share the different properties
    None of the above

3. The set of permitted values for an attribute is called as
    Entity Set
    Domain
    Value Set
    Both Domain and Value Set

4. An attribute which can have many values for a single entity is called as
    Composite Attribute
    Descriptive Attribute
    Derived Attribute
    Multivalued Attribute

5. If a record in table R is associated with only one record in table S, and a record in S is associated with only one record in table R, then the relationship between R and S is
    One-to-Many
    Many-to-One
    One-to-One
    Many-to-Many

6. The first step in database design is
    Physical Database Design
    Logical Database Design
    Conceptual Database Design
    Requirements Gathering and Analysis

7. A relationship is an association between
    Two or more Entities
    One or more Entities
    Entities and Attributes
    One or more Attributes

8. Which of the following is not the disadvantage of File Processing System?
    Data isolation
    Atomicity Problems
    Data Redundancy
    None of the above

9. The status of a relational table at a particular moment is called
    Logical Schema
    Metadata
    Instance
    Subschema

10. Data-Manipulation Language (DML) is a language that enables users to
    Design the Database
    Insert Data into the Database
    Control the Transactions in Database
    Define User Privileges

Score =

Correct answers:

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery