Friday, August 28, 2015

DBMS Questions(81-90)


81. Which date function is used to find the difference between two dates?
datediff
for Eg: select datediff (dd,'2-06-2007','7-06-2007') output is 5
82..What are the different phases of transaction?
Different phases are
Analysisphase
RedoPhase
Undophase
83. What do you mean by flat file database?
It is a database in which there are no programs or user access languages. It has no cross-filed capabilities but is user-friendly and provides user-interface management.
84... What is a query?
A query with respect to DBMS relates to user commands that are used to interact with a data base. The query language can be classified into data definition language and data manipulation language.
85. What do you mean by Correlated subquery?
Sub queries, or nested queries, are used to bring back a set of rows to be used by the parent query. Depending on how the subquery is written, it can be executed once for the parent query or it can be executed once for each row returned by the parent query. If the subquery is executed for each row of the parent, this is called a correlated subquery. A correlated subquery can be easily identified if it contains any references to the parent
subquery columns in its WHERE clause. Columns from the subquery cannot be referenced anywhere else in the parent query. The following example demonstrates a non-correlated subquery.
E.g. Select * From CUST Where '10/03/1990' IN (Select ODATE From ORDER Where CUST.CNUM = ORDER.CNUM)
86. What are the primitive operations common to all record management systems?
Addition,
deletion
modification.
87. Name the buffer in which all the commands that are typed in are stored
‘Edit’ Buffer
88. What are the unary operations in Relational Algebra?
PROJECTION
SELECTION.
89. Are the resulting relations of PRODUCT and JOIN operation the same?
No.
PRODUCT: Concatenation of every row in one relation with every row in another.
JOIN: Concatenation of rows from one relation and related rows from another.
90.What is RDBMS KERNEL?
Two important pieces of RDBMS architecture are the kernel, which is the software, and the data dictionary, which consists of the system-level data structures used by the kernel to manage the database You might think of an RDBMS as an operating system (or set of subsystems), designed specifically for controlling data access; its primary functions are storing, retrieving, and securing data. An RDBMS maintains its own list of authorized users and their associated privileges; manages memory caches and paging; controls locking for concurrent resource usage; dispatches and schedules user requests; and manages space usage within its table-space structures

Thursday, August 27, 2015

DBMS Questions(71-80)


71.What is the difference between SQL and SQL Server ?
SQLServer is an RDBMS just like oracle,DB2 from Microsoft whereas Structured Query Language (SQL), pronounced "sequel", is a language that provides an interface to relational database systems. It was developed by IBM in the 1970s for use in System R. SQL is a de facto standard, as well as an ISO and ANSI standard.
SQL is used to perform various operations on RDBMS.
72.What is difference between Co-related sub query and nested sub query?
Correlated sub query runs once for each row selected by the outer query. It contains a reference to a value from the row selected by the outer query. Nested sub query runs only once for the entire nesting (outer) query. It does not contain any reference to the outer query row. For example,
Correlated Sub query:
select e1.empname, e1.basicsal, e1.deptno from emp e1 where e1.basicsal = (select max(basicsal) from emp e2 where e2.deptno = e1.deptno)
Nested Sub query:
select empname, basicsal, deptno from emp where (deptno, basicsal) in (select deptno, max(basicsal) from emp group by deptno)
73.WHAT OPERATOR PERFORMS PATTERN MATCHING?
Pattern matching operator is LIKE and it has to used with two attributes
1. % and
2. _ ( underscore )
% means matches zero or more characters and under score means mathing exactly one character
74)What is difference between Oracle and MS Access?
Oracle's features for distributed transactions, materialized views and replication are not available with MS Access. These features enable Oracle to efficiently store data for multinational companies across the globe. Also these features increase scalability of applications based on Oracle
75) What are disadvantages in Oracle and MS Access?
Oracle's features for distributed transactions, materialized views and replication are not available with MS Access. These features enable Oracle to efficiently store data for multinational companies across the globe. Also these features increase scalability of applications based on Oracle
76) What are features & advantages in Oracle and MS Access?
Oracle's features for distributed transactions, materialized views and replication are not available with MS Access. These features enable Oracle to efficiently store data for multinational companies across the globe. Also these features increase scalability of applications based on Oracle.
77.What is cluster. Cluster index and non cluster index ?
Clustered Index:- A Clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table may have only one clustered index. on-Clustered Index:- A Non-Clustered index is a special type of index in which the logical order of the index does not match the physical stored order of the rows in the disk. The leaf nodes of a non-clustered index does not consists of the data pages. instead the leaf node contains index rows.
78.How can i hide a particular table name of our schema?
you can hide the table name by creating synonyms. e.g) you can create a synonym y for table x create synonym y for x;
79.What is difference between DBMS and RDBMS?
The main difference of DBMS & RDBMS is
RDBMS have Normalization. Normalization means to refining the redundant and maintain the stabilization.
the DBMS hasn't normalization concept.
80.What are the advantages and disadvantages of primary key and foreign key in SQL?
Primary key Advantages
1) It is a unique key on which all the other candidate keys are functionally dependent
Disadvantage
1) There can be more than one keys on which all the other attributes are dependent on.
Foreign Key Advantage
1)It allows referencing another table using the primary key for the other table

Wednesday, August 26, 2015

Objective Questions(101-110)

101. Which logic family dissipates the minimum power ?
(A) DTL (B) TTL
(C) ECL
(D) CMOS
102. If a packet arrive with an M-bit value is ‘l’ and a fragmentation offset value ‘0’, then it is ______ fragment.
(A) First
(B) Middle
(C) Last
(D) All of the above
M-bit flag value is 1 which indicates fragments are there and and here offset value is 0 which indicated its a first segment.
if M-bit flag value is 1 and fragment offset is non zero then its a middle fragment.

and if M bit flag value is 0 then its a last fragment.
103. The minimum number of nodes in a binary tree of depth d (root is at level 0) is
(A) 2d – 1 (B) 2d + 1 – 1
(C) d + 1 (D) d

104. Which normal form is considered as adequate for usual database design ?

(A) 2NF
(B) 3NF
(C) 4NF
(D) 5NF
105. Any binary relation is in
A. 1NF
B. 4NF
C. 3NF
D. BCNF
106. Consider a fuzzy set A defined on the interval X = [0, 10] of integers by the membership Junction
µA(x) =x/x+2
Then thn α cut corresponding to
α = 0.5 will be
(A) {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
(B) {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
(C) {2, 3, 4, 5, 6, 7, 8, 9, 10}
(D) { }
For numbers 2, µA(x)=2/(2+2)=0.5, for all numbers from 2 to 10, µA(x)>=0.5
107. Which one of the following is not an
informed search technique ?
(A) Hill climbing search
(B) Best first search
(C) A* search
(D) Depth first search
hill climbing ,A* ,best first search are informed search technique.....
depth first search and breadth first search are uninformed search technique
so ans is d
UNINFORMED SEARCH :- they are given no information about the problem other than it's definition

INFORMED SEARCh :- one that have some idead about where to look for solution
108. The string containing certain required formatting information is called
a) argument
b)character array
c)character string
d)control string
109. IN LR(k) grammar handle is
a. A string of variables and terminals
b. string of variables
c. string of terminals
d. None of the above
110. The regular sets are closed under. . ??
1) union
2) concatenation
3) kleenes closure
4) all
 

 

Monday, August 24, 2015

DBMS Questions(61-70)

61.When is a functional dependency F said to be minimal?
Every dependency in F has a single attribute for its right hand side. We cannot replace any dependency X A in F with a dependency Y A where Y is a proper subset of X and still have a set of dependency that is equivalent to F. We cannot remove any dependency from F and still have set of dependency that is equivalent to F.
62.What is the difference between oracle, sql and sql server ?
Oracle is based on RDBMS.
SQL is Structured Query Language.
SQL Server is another tool for RDBMS provided by Microsoft.
63.why you need indexing ? where that is stored and what you mean by schema object? For what purpose we are using view?
We cant create an Index on Index.. Index is stored in user_index table. Every object that has been created on Schema is Schema Object like Table, View etc.If we want to share the particular data to various users we have to use the virtual table for the Base table...So tht is a view. indexing is used for faster search or to retrieve data faster from various table. Schema containing set of tables, basically schema means logical separation of the database.View is crated for faster retrieval of data. It's customized virtual table. we can create a single view of multiple tables. Only the drawback is..view needs to be get refreshed for retrieving updated data.
64.Difference between Store Procedure and Trigger?
we can call stored procedure explicitly. but trigger is automatically invoked when the action defined in trigger is done. ex: create trigger after Insert on this trigger invoked after we insert something on that table. Stored procedure can't be inactive but trigger can be Inactive. Triggers are used to initiate a particular activity after fulfilling certain condition. It need to define and can be enable and disable according to need.
65.What is the advantage to use trigger in your PL?
Triggers are fired implicitly on the tables/views on which they are created. There are various advantages of using a trigger. Some of them are:
Suppose we need to validate a DML statement(insert/Update/Delete) that modifies a table then we can write a trigger on the table that gets fired implicitly whenever DML statement is executed on that table.
Another reason of using triggers can be for automatic pupation of one or more tables whenever a DML/DDL statement is executed for the table on which the trigger is created.
Triggers can be used to enforce constraints. For eg : Any insert/update/ Delete statements should not be allowed on a particular table after office hours. For enforcing this constraint Triggers should be used.
Triggers can be used to publish information about database events to subscribers.Database event can be a system event like Database startup or shutdown or it can be a user even like User login in or user logoff.
66.What the difference between UNION and UNIONALL?
Union will remove the duplicate rows from the result set while Union all doesn’t.
67.What is the difference between TRUNCATE and DELETE commands?
Both will result in deleting all the rows in the table .TRUNCATE call cannot be rolled back as it is a DDL command and all memory space for that table is released back to the server. TRUNCATE is much faster. Whereas DELETE call is an DML command and can be rolled back.
68.Which system table contains information on constraints on all the tables created?
USER_CONSTRAINTS, system table contains information on constraints on all the tables created
69.Explain Normalization?
Normalization means refining the redundancy and maintain stabilization. there are four types of normalization :
first normal forms, second normal forms, third normal forms and fourth Normal forms.
70.How to find out the database name from SQL*PLUS command prompt?
Select * from global_name; This will give the database name which u r currently connected to.....

Sunday, August 23, 2015

Objective Questions(91-100)



91. A UNIX file system has 1 KB block size and 4-byte disk addresses. What is the maximum file size if the inode contains ten direct block entries, one single indirect block entry, one double indirect block entry and one triple indirect block entry ?
(A) 30 GB (B) 64 GB
(C) 16 GB (D) 1 GB
Each block size=1 kb=1024 bytes Disk address=4 byte Therefore each disk block contains=1024/4=256 addresses Size due to 10 direct blocks=10 * 1 KB=10 KB Size due to 1 single indirect block=256 * 1 KB=256 KB Size '' '' 1 double indirect block=256 * 256 * 1 KB=65536 KB Size " " 1 triple " " =256 * 256 * 256 * 1 KB=16777216 KB So,maximum file size= 10 + 256 + 65536 + 16777216=16843018 KB =16 GB
92. {a^nb^n:n>=1} recognize by
a. DPDA
b. NDPDA
c. Both
d. None
93. Classes of similar logical unit is called
a) Lexemes
b) Token
c) Pattern
d) None
94. Linked Lists are not suitable for_____.
(A) Binary Search
(B) Polynomial Manipulation
(C) Insertion
(D) Radix Sort
polynomial manipulation is application of linked list.
insertion sort is good for linked list.
radix sort internally uses queue which can be easily implimented by linked list.
binary search required mid point calculation which is difficult to find and its also linear thats y binary search is not suitable for linked list.
95. If the data unit is 111111 and the divisor is 1010. In CRC method, what is the dividend at the transmission before division ?
(A) 1111110000 (B) 1111111010
(C) 111111000 (D) 111111
1010 here n=4 so n-1 = 3 so add 3 zeros at the end of dataunit means 111111 so111111000
96. Consider an undirected graph G with 100 nodes. The maximum no. Of edges to be included in G so that the graph is not connected is?
A)2451
B)4950
C)4851
D)9900
(99 * 98)/2=4851
maximum number of edge in undirected graph is given by
(n * (n-1))/2
now we have to obtain the maximum number of edge in such a way that the graph is not connected...
this is possible .when we connect all node except one node..... i.e., maximum number of edge in an undirected graph with 99 node
97. (a+a*)* is equivanlent to
a. a(a*)*
b. a*
c. aa*
d. None
a+a* =>a ..lowest value of a* is null =>a+null => a .. thus putting in place of a+a* u will get a* ..
98. What is the maximum length of CAT-5 UTP cable in Fast Ethernet network ?
(A) 100 meters (B) 200 meters
(C) 1000 meters (D) 2000 meters
99. Which one of the following set of gates is best suited for ‘parity’ checking and ‘parity’ generation ?
(A) AND, OR, NOT
(B) NAND, NOR
(
C) EX-OR, EX-NOR
(D) None of the above
100. Which of the following electronic component is not found in IC’s ?
(A) Diode (B) Resistor
(C) Transistor
(D) Inductor