Professional Documents
Culture Documents
Tosh Ibs Ir Te Am: Computer/ It
Tosh Ibs Ir Te Am: Computer/ It
a m Unit - 2
ir Te
ib S
s h
To
• Computer - Relational Data Model
---------------------------------
Fundamentals of RDBMS - Record , fields, data types, tables and database
Concept of RDBMS
E.F.CODD's rule for RDBMS
Key Concept - candidate key, Primary key, foreign key
Normalization - 1NF, 2NF, 3NF
Structured Query Language
DDL - CREATE, ALTER, DROP, TRUNCATE, DESC, RENAME
DML - INSERT, UPDATE, DELETE
DCL - COMMIT, ROLLBACK, SAVEPOINT, GRANT, REVOKE
DQL - SQL
Data Integrity Constraint
I/O - Primary Key, Foreign Key, Unique Key
a m
Te
Business rule constraint - Null, Not Null and Check constraint
ir
SQL Operators
Arithmetic
ib S
h
Comparison
Logical
Set Operators
Range Searching Operators - Between To s
Pattern matching operations – Like
a m
Te
• What is the method of specifying a primary key in a schema description?
ir
a) By writing it in bold letters
b) By underlining it using a dashed line
c) By writing it in capital letters
ib S
d) By underlining it using a bold line
s h
• Statement 1: A tuple is a row in a relation To
Statement 2: Existence of multiple foreign keys in a same relation is possible
a) Both the statements are true
b) Statement 1 is correct but Statement 2 is false
c) Statement 1 is false but Statement 2 is correct
d) Both the statements are false
• The process of making a normalized schema unnormalized is called as _________
a) Unnormalization
b) Denormalization
c) Renormalization
d) Annormalization
• Which of the following data types does the SQL standard not support?
a) char(n)
b) String(n)
c) varchar(n)
d) float(n)
ir Te
S
b) create relation( , …)
ib
c) new table( , …)
d) new relation( , …)
s h
• To
What is the syntax to load data into the database? (Consider D as the database and a, b, c as data)
a) enter into D (a, b, c);
b) insert into D values (a, b, c);
c) insert into D (a, b, c);
d) insert (a, b, c) values into D;
• Which of the following commands do we use to delete all the tuples from a relation (R)?
a) delete table R
b) drop table R
c) delete from R
d) drop from R
• Which of the following commands do we use to delete a relation (R) from a database?
a) drop table R
b) drop relation R
c) delete table R
d) delete from R
s h
To
• Which of the following syntax of the basic query is correct?
a) select <relation> from <attribute>
b) select <attribute> from <relation>
c) select <tuple> from <relation>
d) select <tuple> from <attribute>
• Which of the following logical connectives is not included in SQL?
a) and
b) or
c) nor
d) not
• State true or false: Multiple conditions in the where clause are separated by a “,”
a) True
b) False
m
b) It combines the results of two different queries which have the same set of attributes in the select clause
a
Te
c) It combines the results of two different queries which have the same condition in the where clause
ir
d) It gives the Cartesian product of the results of any 2 queries
ib S
h
• What is the function of the intersect operation?
To s
a) It returns the intersection of the results of the results of any two different queries
b) It returns the intersection of the results of two different queries which have the same set of attributes in the select clause
c) It returns the intersection of the results of two different queries which have the same condition in the where clause
d) None of the mentioned
• Using the _______ clause retains only one copy of identical tuples
a) distinct
b) is not null
c) no repeat
d) from
• Which of the following correctly describes the between predicate in the where clause?
a) It is used to check whether a value is in between two specified values
b) It is used to check whether a value is exactly in the center of the relation alphabetically
c) It is used to check whether a value is in between any two other values in the database
d) None of the mentioned
ir
b) Association
c) Set
ib S
h
d) Combination
•
To s
State true or false: We cannot specify keys in the Entity-Relationship model
a) True
b) False
• State true or false: Multiple attributes combined together can be primary keys
a) True
b) False
ir Te
S
B. Value Set
ib
C. Domain
D. B and C
s h
• To
An attribute takes ___ value when an entity does not have a value for it
Zero
blank
Null
NA
• In Relational Model, set of indivisible values is called?
Attribute
Domain
Tuple
Relation
•
a m
Te
The given Query can be replaced with ____________:
ir
SELECT name
FROM instructor1
WHERE salary <= 100000 AND salary >= 90000;
ib S
s h
a.
SELECT name
FROM instructor1
To
WHERE salary BETWEEN 100000 AND 90000
b.
SELECT name
FROM instructor1
WHERE salary BETWEEN 90000 AND 100000;
• To which of the following the term "DBA" referred?
Data Bank Administrator
Database Administrator
Data Administrator
None of the above
•
a m
Te
In the relational table, which of the following can also be represented by the term "attribute"?
ir
Entity
Row
Column
ib S
Both B &C
s h
• To
Which of the following commands is used to save any transaction permanently into the database?
Commit
Rollback
Savepoint
None of the above
• Choose the correct statement regarding superkeys
a) A superkey is an attribute or a group of multiple attributes that can uniquely identify a tuple
b) A superkey is a tuple or a set of multiple tuples that can uniquely identify an attribute
c) Every superkey is a candidate key
d) A superkey is an attribute or a set of attributes that distinguish the relation from other relations
• State true or false: Multiple attributes combined together can be primary key
a m
a) True
ir Te
S
b) False
•
s h ib
State true or false: Redundancy is desired in a relational schema
To
a) True
b) False