Sei sulla pagina 1di 30

OOPS viva questions 41. Name the operators that cannot be overloaded? Ans: sizeof, ., .*, .

->, ::, ?: 42. What is an adaptor class or Wrapper class? Ans: A class that has no functionality of its own. Its member functions hide the use of a third party software component or an object with the non-compatible interface or a non-objectoriented implementation. 43. What is a Null object? Ans: It is an object of some class whose purpose is to indicate that a real object of that class does not exist. One common use for a null object is a return value from a member function that is supposed to return an object with some specified properties but cannot find such an object. 44. What is class invariant? Ans: A class invariant is a condition that defines all valid states for an object. It is a logical condition to ensure the correct working of a class. Class invariants must hold when an object is created, and they must be preserved under all operations of the class. In particular all class invariants are both preconditions and post-conditions for all operations or member functions of the class. 45. What is a dangling pointer? Ans: A dangling pointer arises when you use the address of an object after its lifetime is over. This may occur in situations like returning addresses of the automatic variables from a function or using the address of the memory block after it is freed. Example: The following code snippet shows this: class Sample { public: int *ptr; Sample(int i) { ptr = new int(i); } ~Sample() { delete ptr; } void PrintVal() { cout << The value is << *ptr;

} }; void SomeFunc(Sample x) { cout << Say i am in someFunc << endl; } int main() { Sample s1= 10; SomeFunc(s1); s1.PrintVal(); } In the above example when PrintVal() function is called it is called by the pointer that has been freed by the destructor in SomeFunc. 46. Differentiate between the message and method? Ans: Message: Objects communicate by sending messages to each other. A message is sent to invoke a method. Method Provides response to a message and it is an implementation of an operation 47. How can we access protected and private members of a class? Ans: In the case of members protected and private, these could not be accessed from outside the same class at which they are declared. This rule can be transgressed with the use of the friend keyword in a class, so we can allow an external function to gain access to the protected and private members of a class. 48. Can you handle exception in C++? Ans: Yes we can handle exception in C++ using keyword: try, catch and throw. Program statements that we want to monitor for exceptions are contained in a try block. If an exception occurs within the try block, it is thrown (using throw).The exception is caught, using catch, and processed. 49. What is virtual function? Ans: A virtual function is a member function that is declared within a base class and redefined by a derived class .To create a virtual function, the function declaration in the base class is preceded by the keyword virtual. 50. What do you mean by early binding? Ans:Early binding refers to the events that occur at compile time. Early binding occurs when

all information needed to call a function is known at compile time. Examples of early binding include normal function calls, overloaded function calls, and overloaded operators. The advantage of early binding is efficiency. 51. What do you mean by late binding? Ans: Late binding refers to function calls that are not resolved until run time. Virtual functions are used to achieve late binding. When access is via a base pointer or reference, the virtual function actually called is determined by the type of object pointed to by the pointer.

31. What problem does the namespace feature solve? Ans: Multiple providers of libraries might use common global identifiers causing a name collision when an application tries to link with two or more such libraries. The namespace feature surrounds a librarys external declarations with a unique namespace that eliminates the potential for those collisions. This solution assumes that two library vendors dont use the same namespace identifier, of course. 32. What is the use of using declaration? Ans: A using declaration makes it possible to use a name from a namespace 33. What is a template? Ans: Templates allow us to create generic functions that admit any data type as parameters and return a value without having to overload the function with all the possible data types. Until certain point they fulfill the functionality of a macro. Its prototype is any of the two following ones: template function_declaration; template function_declaration; 34. Differentiate between a template class and class template? Ans: Template class: A generic definition or a parameterized class not instantiated until the client provides the needed information. Its jargon for plain templates. Class template: A class template specifies how individual classes can be constructed much like the way a class specifies how individual objects can be constructed. Its jargon for plain classes. 35. What is the difference between a copy constructor and an overloaded assignment operator? Ans: A copy constructor constructs a new object by using the content of the argument object. An overloaded assignment operator assigns the contents of an existing object to another

existing object of the same class. 36. What is a virtual destructor? Ans: The simple answer is that a virtual destructor is one that is declared with the virtual attribute. 37. What is an incomplete type? Ans: Incomplete type refers to pointers in which there is non availability of the implementation of the referenced location or it points to some location whose value is not available for modification. Example: int *i=0400 // i points to address 400 *i=0; //set the value of memory location pointed by i. Incomplete types are otherwise called uninitialized pointers. 38. What do you mean by Stack unwinding? Ans: It is a process during exception handling when the destructor is called for all local objects between the place where the exception was thrown and where it is caught. 39. What is a container class? What are the types of container classes? Ans: A container class is a class that is used to hold objects in memory or external storage. A container class acts as a generic holder. A container class has a predefined behavior and a wellknown interface. A container class is a supporting class whose purpose is to hide the topology used for maintaining the list of objects in memory. When a container class contains a group of mixed objects, the container is called a heterogeneous container; when the container is holding a group of objects that are all the same, the container is called a homogeneous container 40. Name some pure object oriented languages? Ans: Smalltalk, Java, Eiffel, Sather.

21 What is the difference between a NULL pointer and a void pointer? Ans: A NULL pointer is a pointer of any type whose value is zero. A void pointer is a pointer to an object of an unknown type, and is guaranteed to have enough bits to hold a pointer to any object. A void pointer is not guaranteed to have enough bits to point to a function (though in general practice it does). 22. What is difference between C++ and Java? Ans: C++ has pointers Java does not. Java is platform independent C++ is not.

Java has garbage collection C++ does not. 23. What do you mean by multiple inheritance in C++ ? Ans: Multiple inheritance is a feature in C++ by which one class can be of different types. Say class teaching Assistant is inherited from two classes say teacher and Student. 24. What do you mean by virtual methods? Ans: virtual methods are used to use the polymorphism feature in C++. Say class A is inherited from class B. If we declare say function f() as virtual in class B and override the same function in class A then at runtime appropriate method of the class will be called depending upon the type of the object. 25. What do you mean by static methods? Ans: By using the static method there is no need creating an object of that class to use that method. We can directly call that method on that class. For example, say class A has static function f(), then we can call f() function as A.f(). There is no need of creating an object of class A. 26. How many ways are there to initialize an int with a constant? Ans: Two. There are two formats for initializers in C++ as shown in the example that follows. The first format uses the traditional C notation. The second format uses constructor notation. int foo = 123; int bar (123); 27. What is a constructor? Ans: Constructor is a special member function of a class, which is invoked automatically whenever an instance of the class is created. It has the same name as its class. 28. What is destructor? Ans: Destructor is a special member function of a class, which is invoked automatically whenever an object goes out of the scope. It has the same name as its class with a tilde character prefixed. 29. What is an explicit constructor? Ans: A conversion constructor declared with the explicit keyword. The compiler does not use an explicit constructor to implement an implied conversion of types. Its purpose is reserved explicitly for construction. 30 What is the Standard Template Library? Ans: A library of container templates approved by the ANSI committee for inclusion in the standard C++ specification. A programmer who then launches into a discussion of the generic

programming model, iterators, allocators, algorithms, and such, has a higher than average understanding of the new technology that STL brings to C++ programming.

11. What is abstraction? Ans: The technique of creating user-defined data types, having the properties of built-in data types and a set of permitted operators that are well suited to the application to be programmed is known as data abstraction. Class is a construct for abstract data types (ADT). 12. What is encapsulation? Ans: It is the mechanism that wraps the data and function it manipulates into single unit and keeps it safe from external interference. 13. How variable declaration in c++ differs that in c? Ans: C requires all the variables to be declared at the beginning of a scope but in c++ we can declare variables anywhere in the scope. This makes the programmer easier to understand because the variables are declared in the context of their use. 14. What are the c++ tokens? Ans: c++ has the following tokens I. keywords II. Identifiers III. Constants IV. Strings V. operators 15. What do you mean by reference variable in c++? Ans: A reference variable provides an alias to a previously defined variable. Data type & reference-name = variable name 16. What do you mean by implicit conversion? Ans: Whenever data types are mixed in an expression then c++ performs the conversion automatically. Here smaller type is converted to wider type. Example- in case of integer and float integer is converted into float type. 17. What is the difference between method overloading and method overriding? Ans: Overloading a method (or function) in C++ is the ability for functions of the same name to be defined as long as these methods have different signatures (different set of parameters). Method overriding is the ability of the inherited class rewriting the virtual method of the base class.

18. What are the defining traits of an object-oriented language? The defining traits of an object-oriented language are: encapsulation inheritance polymorphism Ans: Polymorphism: is a feature of OOPL that at run time depending upon the type of object the appropriate method is called. Inheritance: is a feature of OOPL that represents the is a relationship between different objects (classes). Say in real life a manager is a employee. So in OOPL manger class is inherited from the employee class. Encapsulation: is a feature of OOPL that is used to hide the information. 19. What is polymorphism? Ans: Polymorphism is the idea that a base class can be inherited by several classes. A base class pointer can point to its child class and a base class array can store different child class objects. 20. What do you mean by inline function? Ans: An inline function is a function that is expanded inline when invoked.ie. the compiler replaces the function call with the corresponding function code. An inline function is a function that is expanded in line when it is invoked. That is the compiler replaces the function call with the corresponding function code (similar to macro).

OOPS viva questions 1. What is a class? Ans: The objects with the same data structure (attributes) and behavior (operations) are called class. 2. What is an object? Ans: It is an entity which may correspond to real-world entities such as students, employees, bank account. It may be concrete such as file system or conceptual such as scheduling policies in multiprocessor operating system. Every object will have data structures called attributes and behavior called operations. 3. What is the difference between an object and a class? Ans: All objects possessing similar properties are grouped into class. Example :person is a class, ram, hari are objects of person class. All have similar attributes like name, age, sex and similar operations like speak, walk. Class person { private: char name[20]; int age; char sex; public: speak(); walk(); }; 4. What is the difference between class and structure? Ans: In class the data members by default are private but in structure they are by default public 5. Define object based programming language? Ans: Object based programming language support encapsulation and object identity without supporting some important features of OOPs language. Object based language=Encapsulation + object Identity 6. Define object oriented language? Ans: Object-oriented language incorporates all the features of object based programming languages along with inheritance and polymorphism. Example: c++, java.

7. Define OOPs? Ans: OOP is a method of implementation in which programs are organized as co-operative collection of objects, each of which represents an instance of some class and whose classes are all member of a hierarchy of classes united through the property of inheritance. 8. What is public, protected, and private? Ans: These are access specifier or a visibility lebels .The class member that has been declared as private can be accessed only from within the class. Public members can be accessed from outside the class also. Within the class or from the object of a class protected access limit is same as that of private but it plays a prominent role in case of inheritance 9. What is a scope resolution operator? Ans: The scope resolution operator permits a program to reference an identifier in the global scope that has been hidden by another identifier with the same name in the local scope. 10. What do you mean by inheritance? Ans: The mechanism of deriving a new class (derived) from an old class (base class) is called inheritance. It allows the extension and reuse of existing code without having to rewrite the code from scratch. 51. What are conflict serializable schedules? Ans: A schedule S of n transactions is serializable if it is equivalent to some serial schedule of the same n transactions. 52. What is result equivalent? Ans: Two schedules are called result equivalent if they produce the same final state of the data base. 53. What are conflict equivalent schedules? Ans: Two schedules are said to be conflict equivalent if the order of any two conflicting operations is the same in both schedules. 54. What is a conflict serializable schedule? Ans: A schedule is called conflict serializable if it is conflict equivalent to some serial schedule. 55. What is view equivalence? Ans: Two schedules S and S are said to be view equivalent if the following three conditions hold : 1. Both S and S contain same set of transactions with same operations in them. 2. If any read operation read(x) reads a value written by a write operation or the original value of x the same conditions must hold in the other schedule for the same read(x) operation. 3. If an operation write1(y) is the last operation to write the value of y in schedule S then the

same operation must be the last operation in schedule S. 56. What is view serializable? Ans: A schedule is said to be view serializable if it is view equivalent with some serial schedule. 57. What are the various methods of controlling concurrency? Ans: 1. Locking 2. Time stamp Locking data item to prevent multiple transactions from accessing the item concurrently. A time stamp is a unique identifier for each transaction, generated by the system.

Dbms viva question


Ans: Redundant array of inexpensive (or independent) disks. The main goal of raid technology is to even out the widely different rates of performance improvement of disks against those in memory and microprocessor. Raid technology employs the technique of data striping to achieve higher transfer rates. 42. What is Hashing technique? Ans: This is a primary file organization technique that provides very fast access to records on certain search conditions. The search condition must be an equality condition on a single field, called hash field of the file. 1. Internal hashing 2. External hashing 3. Extendible hashing 4. Linear hashing 5. Partitioned hashing 43. What are different types of relational constraints? Ans: 1. Domain constraints 2. Key constraints 3. Entity integrity constraints 4. Referential integrity constraints Domain constraints specify that the value of each attribute must be an atomic value from the domain of the attributes. Key constraints tell that no two tuples can have the same combination of values for all their attributes. Entity integrity constraint states that no primary key value can be null. Referential integrity constraints states that a tuple in one relation that refers to another relation must refer to an existing tuple in that relation it is specified between two relations and is used to maintain the consistency among tuples of the two relations. 44. What is difference between a super key, a key, a candidate key and a primary key? Ans: A super key specifies a uniqueness constrain that no two distinct tuples in a state can have the same value for the super key. Every relation has at least one default super key. A key is a minimal super key or the subset of the super key which is obtained after removing redundancy. A relation schema may have more than one key .In this case each key is called a candidate key. One of the candidate key with minimum number of attributes is chosen as primary key. 45. What is a foreign key? Ans: A key of a relation schema is called as a foreign key if it is the primary key of

some other relation to which it is related to. 46. What is a transaction? Ans: A transaction is a logical unit of database processing that includes one or more database access operations. 47. What are the properties of transaction? Ans: 1. Atomicity 2. Consistency preservation 3. Isolation 4. Durability (permanence) 48. What are the basic data base operations? Ans: 1. Write_item(x) 2. Read_item(x) 49. What are the disadvantages of not controlling concurrency? Ans: 1. Lost update problem 2. Temporary update(Dirty read) problem 3. Incorrect summary problem 50. What are serial, non serial? Ans: A schedule S is serial if, for every transaction T participating in the schedule, all the operations of T is executed consecutively in the schedule, otherwise, the schedule is called nonserial schedule. 58. What is a lock? Ans: A lock is a variable associated with a data item that describes the status of the item with respect to the possible operations that can be applied to it. 59. What are various types of locking techniques? Ans: 1. a binary lock 2. Shared/Exclusive lock 3. Two phase locking 60. What is a binary lock? Ans: A binary lock can have two states or values: 1. locked (1)

2. unlocked(0) If locked it cannot be accessed by any other operations, else can be. 61. What is shared or exclusive lock? Ans: It implements multiple-mode lock. Allowing multiple accesses for read operations but exclusive access for write operation. 62. Explain two phase locking? Ans: All the locking operations must precede the first unlock operation in the transaction .It does have two phases: 1. expanding phase (Locks are issued) 2. Shrinking phase (Locks are released) 63. What are different types of two phase lockings (2pl)? Ans: 1. Basic 2. Conservative 3. Strict 4. Rigorous this is the basic technique of 2pl described above. Conservative 2pl requires a transaction to lock all the items it accesses before the transaction begins its execution, by pre-declaring its read-set and write-set. Strict 2pl guarantees that a transaction doesnt release any of its exclusive locks until after it commits or aborts. Rigorous guarantees that a transaction doesnt release any of its locks (including shared locks) until after it commits or aborts. 64. What is a deadlock? Ans: Dead lock occurs when each transaction T in a set of two or more transactions is waiting for some item that is locked by some other transaction T in the set. Hence each transaction is in a waiting queue, waiting for one of the other transactions to release the lock on them. 65. What are triggers? Ans: Triggers are the PL/SQL blocks definining an action the database should take when some database related event occurs. Triggers may be used to supplement declarative referential integrity, to enforce complex business rules, or to audit changes to data.
QUESTION What is database? 1:

ANSWER: A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose. QUESTION What is DBMS? ANSWER: ?Redundancyiscontrolled. ?Unauthorizeaccessisrestricted. ?Providingmultipleuserinterfaces. ?Enforcingintegrityconstraints. ? Providing backup and recovery. QUESTION What is a Database system? ANSWER: The database and DBMS software together is called as Database system. QUESTION Disadvantage in File Processing System? ANSWER: ?Dataredundancy&inconsistency. ?Difficultinaccessingdata. ?Dataisolation. ?Dataintegrity. ?Concurrentaccessisnotpossible. ? Security Problems. . QUESTION Describe the three levels of data abstraction? ANSWER: The are three levels of abstraction: ? Physical level: The lowest level of abstraction describes how data are stored. ? Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data. ? View level: The highest level of abstraction describes only part of entire database. QUESTION Define the "integrity rules" 6: 5: 4: 3: 2:

ANSWER: There are two Integrity rules. ? Entity Integrity: States that ?Primary key cannot have NULL value? ? Referential Integrity: States that ?Foreign Key can be either a NULL value or should be Primary Key value of other relation. QUESTION What is extension and intension? ANSWER: Extension -It is the number of tuples present in a table at any instance. This is time dependent. Intension It is a constant value that gives the name, structure of table and the constraints laid on it. QUESTION What is System R? What are its two major subsystems? ANSWER: System R was designed and developed over a period of 1974-79 at IBM San Jose Research Center . It is a prototype and its purpose was to demonstrate that it is possible to build a Relational System that can be used in a real life environment to solve real life problems, with performance at least comparable to that of existing system. Its two subsystems are ? Research Storage ? System Relational Data System. QUESTION How is the data structure of System R different from the relational structure? ANSWER: Unlike Relational systems in System R ? Domains are not supported ? Enforcement of candidate key uniqueness is optional ? Enforcement of entity integrity is optional ? Referential integrity is not enforced QUESTION What is Data Independence? ANSWER: Data independence means that ?the application is independent of the storage structure and access 11: 10: 8: 7:

strategy of data?. In other words, The ability to modify the schema definition in one level should not affect the schema definition in the next higher level. Two types of Data Independence:

? Physical Data Independence : Modification in physical level should not affect the logical level. ? Logical Data Independence : Modification in logical level should affect the view level. NOTE: Logical Data Independence is more difficult to achieve QUESTION What is a view? How it is related to data independence? ANSWER: A view may be thought of as a virtual table, that is, a table that does not really exist in its own right but is instead derived from one or more underlying base table. In other words, there is no stored file that direct represents the view instead a definition of view is stored in data dictionary. Growth and restructuring of base tables is not reflected in views. Thus the view can insulate users from the effects of restructuring and growth in the database. Hence accounts for logical data independence. . QUESTION What is Data Model? ANSWER: A collection of conceptual tools for describing data, data relationships data semantics and constraints. QUESTION What is E-R model? ANSWER: This data model is based on real world that consists of basic objects called entities and of relationship among these objects. Entities are described in a database by a set of attributes. QUESTION What is Object Oriented model? ANSWER: This model is based on collection of objects. An object contains values stored in instance variables with in the object. An object also contains bodies of code that operate on the object. These bodies of code are called methods. Objects that contain same types of values and the same methods are grouped together into classes. QUESTION What is an Entity? 16: 15: 14: 13: 12:

ANSWER: It is a thing in the real world with an independent existence. QUESTION What is an Entity type? ANSWER: It is a collection (set) of entities that have same attributes. QUESTION What is an Entity set? ANSWER: It is a collection of all entities of particular entity type in the database. QUESTION What is an Extension of entity type? ANSWER: The collections of entities of a particular entity type are grouped together into an entity set. QUESTION What is Weak Entity set? ANSWER: An entity set may not have sufficient attributes to form a primary key, and its primary key compromises of its partial key and primary key of its parent entity, then it is said to be Weak Entity set. QUESTION What is an attribute? ANSWER: It is a particular property, which describes the entity. QUESTION What is a Relation Schema and a Relation? ANSWER: A relation Schema denoted by R(A1, A2, ?, An) is made up of the relation name R and the list of attributes Ai that it contains. A relation is defined as a set of tuples. Let r be the relation which contains set tuples (t1, t2, t3, , tn). Each tuple is an ordered list of n-values t=(v1,v2, , vn). QUESTION What is degree of a Relation? ANSWER: It is the number of attribute of its relation schema. 23: 22: 21: 20: 19: 18: 17:

QUESTION What is Relationship? ANSWER: It is an association among two or more entities. QUESTION What is Relationship set? ANSWER: The collection (or set) of similar relationships. QUESTION What is Relationship type? ANSWER:

24:

25:

26:

Relationship type defines a set of associations or a relationship set among a given set of entity types. QUESTION What is degree of Relationship type? ANSWER: It is the number of entity type participating. QUESTION What is Data Storage Definition Language? ANSWER: The storage structures and access methods used by database system are specified by a set of definition in a special type of DDL called data storage-definition language. QUESTION What is DML (Data Manipulation Language)? ANSWER: This language that enable user to access or manipulate data as organised by appropriate data model. ? Procedural DML or Low level: DML requires a user to specify what data are needed and how to get those data. ? Non-Procedural DML or High level: DML requires a user to specify what data are needed without specifying how to get those data. QUESTION What is VDL (View Definition Language)? 30: 29: 28: 27:

ANSWER: It specifies user views and their mappings to the conceptual schema. QUESTION What is DML Compiler? ANSWER: It translates DML statements in a query language into low-level instruction that the query evaluation engine can understand. QUESTION What is Query evaluation engine? ANSWER: It executes low-level instruction generated by compiler. QUESTION What is DDL Interpreter? ANSWER: It interprets DDL statements and record them in tables containing metadata. QUESTION What is Record-at-a-time? ANSWER: The Low level or Procedural DML can specify and retrieve each record from a set of records. This retrieve of a record is said to be Record-at-a-time. QUESTION What is Set-at-a-time or Set-oriented? ANSWER: The High level or Non-procedural DML can specify and retrieve many records in a single DML statement. This retrieve of a record is said to be Set-at-a-time or Set-oriented. QUESTION What is Relational Algebra? ANSWER: It is procedural query language. It consists of a set of operations that take one or two relations as input and produce a new relation. QUESTION What is Relational Calculus? ANSWER: It is an applied predicate calculus specifically tailored for relational databases proposed by E.F. Codd. E.g. of languages based on it are DSL ALPHA, QUEL. 37: 36: 35: 34: 33: 32: 31:

QUESTION How does Tuple-oriented relational calculus differ from domain-oriented relational calculus ANSWER:

38:

The tuple-oriented calculus uses a tuple variables i.e., variable whose only permitted values are tuples of that relation. E.g. QUEL The domain-oriented calculus has domain variables i.e., variables that range over the underlying domains instead of over relation. E.g. ILL, DEDUCE. QUESTION What is normalization? ANSWER: It is a process of analysing the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the properties ? Minimizing redundancy ? Minimizing insertion, deletion and update anomalies. QUESTION What is Functional Dependency? ANSWER: A Functional dependency is denoted by X Y between two sets of attributes X and Y that are subsets of R specifies a constraint on the possible tuple that can form a relation state r of R. The constraint is for any two tuples t1 and t2 in r if t1[X] = t2[X] then they have t1[Y] = t2[Y]. This means the value of X component of a tuple uniquely determines the value of component Y. QUESTION When is a functional dependency F said to be minimal? ANSWER: ? 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. QUESTION What is Multivalued dependency? ANSWER: Multivalued dependency denoted by X Y specified on relation schema R, where X and Y are both 42: 41: 40: 39:

subsets of R, specifies the following constraint on any relation r of R: if two tuples t1 and t2 exist in r such that t1[X] = t2[X] then t3 and t4 should also exist in r with the following properties ? t3[x] = t4[X] = t1[X] = t2[X] ? t3[Y] = t1[Y] and t4[Y] = t2[Y] ? t3[Z] = t2[Z] and t4[Z] = t1[Z] where [Z = (R-(X U Y)) ] QUESTION What is Lossless join property? ANSWER: It guarantees that the spurious tuple generation does not occur with respect to relation schemas after decomposition. QUESTION What is 1 NF (Normal Form)? ANSWER: The domain of attribute must include only atomic (simple, indivisible) values. QUESTION What is Fully Functional dependency? ANSWER: It is based on concept of full functional dependency. A functional dependency X Y is full functional dependency if removal of any attribute A from X means that the dependency does not hold any more. QUESTION What is 2NF? ANSWER: A relation schema R is in 2NF if it is in 1NF and every non-prime attribute A in R is fully functionally dependent on primary key. QUESTION What is 3NF? ANSWER: A relation schema R is in 3NF if it is in 2NF and for every FD X A either of the following is true ? X is a Super-key of R. ? A is a prime attribute of R. In other words, if every non prime attribute is non-transitively dependent on primary key. 47: 46: 45: 44: 43:

QUESTION What is BCNF (Boyce-Codd Normal Form)? ANSWER:

48:

A relation schema R is in BCNF if it is in 3NF and satisfies an additional constraint that for every FD X A, X must be a candidate key. QUESTION What is 4NF? ANSWER: A relation schema R is said to be in 4NF if for every Multivalued dependency X Y that holds over R, one of following is true ? X is subset or equal to (or) XY = R. ? X is a super key. QUESTION What is 5NF? ANSWER: A Relation schema R is said to be 5NF if for every join dependency {R1, R2, , Rn} that holds R, one the following is true ? Ri = R for some i. ? The join dependency is implied by the set of FD, over R in which the left side is key of R. I will hope by going through this all questions your DBMS concepts will get strong. 50: 49:

Dcn viva question


1.What do you mean by data communication? Ans: It is the exchange of data between two devices via some form of transmission medium such as wire cable. The communicating system must be part of a communication system made up of a combination of hardware and software.The effectiveness of a data communication system depends on three fundamental characteristics: delivery, accuracy and timeliness. 2.What is simplex? Ans: It is the mode of communication between two devices in which flow of data is

unidirectional. i.e. one can transmit and other can receive. E.g. keyboard and monitor. 3.What is half-duplex? Ans: It is the mode of communication between two devices in which flow of data is bidirectional but not at the same time. ie each station can transmit and receive but not at the same time. E.g walkie-talkies are half-duplex system. 4.What is full duplex? Ans: It is the mode of communication between two devices in which flow of data is bidirectional and it occurs simultaneously. Here signals going in either direction share the capacity of the link. E.g. telephone 5.What is a network? Ans: It is a set of devices connected by communication links. A node can be a computer or any other device capable of sending and/or receiving data generated by other nodes on the network. 6.What is distributed processing? Ans: It is a strategy in which services provided by the network reside at multiple sites. 7.What is point to point connection? Ans:It provides a dedicated link between two devices. The entire capacity of the link is reserved for transmission between the two devices e.g. when we change the TV channels by remote control we establish a point to point connection between remote control and TV control system. 8.What is multipoint connection? Ans: In multipoint connection more than two specific devices share a single link. Here the capacity of the channel is shared either separately or temporally. 9.What is a topology? Ans: Topology of a network is defined as the geometric representation of the relationship of all the links and linking devices (node) to one another.Four basic topologies are star, bus, ring and mesh. Star Here each device has a dedicated point to point link only to a central controller called hub. Bus -It is multipoint. One long cable acts as a backbone to link all the devices in the network. Ring -Here each device has a dedicated point to point connection only with the two devices on either side of it.

Mesh -Here every device has a dedicated point to point link to every other device. 10.Define LAN, MAN and WAN. Ans: LAN- A local area network (LAN) is a privately owned and links the devices in a single office, building or campus. It allows resources to be shared between personal computers and work stations. MAN- A metropolitan-area network (MAN) spreads over an entire city. It may be wholly owned and operated by a private company, eg local telephone company. WAN A wide area network (WAN) provides long distance transmission of data, voice, image and video information over large geographic areas that comprise a country, a continent or even whole world.

11.Define internet? Ans: It is a network of networks. 12.What is a protocol? Ans: It is a set of rules that governs data communication. A protocol defines what is communicated, how it is communicated, and when it is communicated. The key elements of protocol are syntax, semantics and timing. 13.What is TCP/IP protocol model? Ans: It is a five layered model which provides guidelines for the development of universally compatible networking protocols. The five layers are physical, data link, network, transport and application. 14.Describe the functions of five layers? Ans: Physical- It transmits raw bits over a medium. It provides mechanical and electrical specification. Data link- It organizes bits into frames. It provides hop to hop delivery. Network-It moves the packets from source to destination.It provide internetworking. Transport-It provides reliable process to process message delivery and error recovery. Application-It allows ti access to network resources. 15.What is ISO-OSI model? Ans: Open Systems Interconnection or OSI model was designed by the International Organization for Standardization (ISO) .It is a seven layer model. It is a theoretical model designed to show how a protocol stack should be implemented. It defines two extra layers in addition to TCP/IP model. Session -It was designed to establish, maintain, and synchronize the interaction between communicating system. Presentation-It was designed to handle the syntax and semantics of the information exchanged

between the two systems. It was designed for data translation, encryption, decryption, and compression. 16. What is multiplexing? Ans: Multiplexing is the process of dividing a link, the physical medium, into logical channels for better efficiency. Here medium is not changed but it has several channels instead of one. 16.What is switching? Ans: Switching in data communication is of three types Circuit switching Packet switching Message switching 17.How data is transmitted over a medium? Ans: Data is transmitted in the form of electromagnetic signals. 18. Compare analog and digital signals? Ans: Analog signals can have an infinite number of values in a range but digital signal can have only a limited number of values. 19.Define bandwidth? Ans: The range of frequencies that a medium can pass is called bandwidth. It is the difference between the highest and lowest frequencies that the medium can satisfactorily pass. 20.What are the factors on which data rate depends? Ans: Data rate ie.how fast we can send data depends upon i) Bandwidth available ii) The levels of signals we can use iii) The quality of the channel (level of noise

DBMS viva question


21. What are different DBMS languages? Ans: 1. DDL (Data definition language) 2. SDL (Storage definition language) 3. VDL (View definition language) 4. DML (Data manipulation language) 22. What are different types of DBMS? Ans: 1. DBMS 2. RDBMS (Relational) 3. ORDBMS (Object Relational) 4. DDBMS (Distributed) 5. FDBMS (Federated) 6. HDDBMS (Homogeneous) 7. HDBMS (Hierarchical) 8. NDBMS (Networked) 23. What is an entity? Ans: An entity is a thing in the real world with an independent existence. 24. What are attributes? Ans: These are the particular properties that describe an entity. 25. What are diff. types of attributes? Ans: 1. Composite Vs simple attributes. 2. Single valued Vs multi-valued attributes. 3. Stored Vs derived attribute. 4. Null valued attributes. 5. Complex attributes.

26. What is difference between entity set and entity type? 27. What is domain value or value set of an attribute? Ans: It is the set of values that may be assigned to that attribute for each individual entities .

28. What is degree of a relationship? Ans: The no of entities participating in that relation . 29. What is recursive relationship? Ans: It is the relationship where both the participating entities belong to same entity type . 30. What are relationship constraints? Ans: 1. Cardinality ratio. 2. Participation constraints.

11. What is the job of DBA? Ans: A database administrator is a person or a group responsible for authorizing access to the database, for coordinating and monitoring its use, and for acquiring s/w and h/w resources as needed. 12. Who are db designer? Ans: Data base designers are responsible for identifying the data to be stored in the database and for choosing appropriate structure to represent and store this data . 13. What are different types of end users? Ans: 1. Casual end-users 2. Naive or parametric end users 3. Sophisticated end users 4. Stand alone users. 14. What are the advantages of using a dbms? Ans: 1. Controlling redundancy. 2. Restricting unauthorized access. 3. Providing persistent storage for program objects and data structures. 4. Permitting inferencing and actions using rules. 5. Providing multi-user interfaces. 6. Representing complex relationships among data. 7. Enforcing integrity constraints. 8. Providing backups and recovery. 15. What are the disadvantages of using a dbms?

Ans: 1. High initial investments in h/w, s/w, and training. 2. Generality that a DBMS provides for defining and processing data. 3. Overhead for providing security, concurrency control, recovery, and integrity functions. 16. What is a data model? Ans: It is a collection of concepts that can be used to describe the structure of a database. It provides necessary means to achieve this abstraction. By structure of a database we mean the data types, relations, and constraints that should hold on the data. 17. What are different categories of data models? Ans: 1. High-level or conceptual data models. 2. Representational data models. 3. Low-level or physical data models. High level data models provide the concepts that are close to the way many users perceive data. Representational data models are provide concepts that provide the concepts that may be understood by end users but that are not too far removed from organization of data in the database. Physical data models describe the details of how data is stored in the computers. 18. What is schema? Ans: The description of a data base is called the database schema , which is specified during database design and is not expected to change frequently . A displayed schema is called schema diagram .We call each object in the schema as schema construct. 19. What are types of schema? Ans: 1. internal schema. 2. Conceptual schema. 3. External schemas or user views. 20. What is Data independency? Ans: Data independency is defined as the capacity to change the conceptual schema without having to change the schema at the next higher level. We can define two types of data independence: 1. Logical data independence. 2. Physical data independence. LDI is the capacity to change the conceptual schema without having to change external schemas or application programs.

PDI is the capacity to change the internal schema without having to change conceptual (or external) schemas.

DBMS questions that can be asked in viva 1.What is a Database? Ans: A database is a collection of related data .A database is a logically coherent collection of data with some inherent meaning. 2. What is DBMS? Ans: Database Management system is a collection of programs that enables user to create and maintain a database. Thus a DBMS is a general purposed s/w system that facilitates the process of defining constructing and manipulating a database for various applications. (Defining a data base involves specifying the data types, structures and constraints for the data to be stored in the data database. Constructing a data base is the process of storing data itself on some storage medium that is controlled by DBMS. Manipulating a database includes such functions as querying the data base to retrieve specific data, updating the database to reflect the changes in the mini-world. 3. What is a Catalog? Ans: A catalog is a table that contain the information such as structure of each file , the type and storage format of each data item and various constraints on the data . The information stored in the catalog is called Metadata . Whenever a request is made to access a particular data, the DBMS s/w refers to the catalog to determine the structure of the file. 4. What is data ware housing & OLAP? Ans: Data warehousing and OLAP (online analytical processing ) systems are the techniques used in many companies to extract and analyze useful information from very large databases for decision making . 5. What is real time database technology? Ans: These are all the techniques used in controlling industrial and manufacturing processes. 6. What is program-data independence? Ans: Unlike in the traditional file sys. the structure of the data files is stored in the DBMS catalog separately from the access programs . This property is called program-data independence.i.e. We neednt to change the code of the DBMS if the structure of the data is changed .Which is not supported by traditional file sys .

7. What is ORDBMS? Ans: Object oriented RDBMS is a relational DBMS in which every thing is treated as objects. User can define operations on data as a part of the database definition. 8. What is program-operation independence? Ans: An operation is specified in two parts . 1. Interface (operation name and data types of its arguments). 2. Implementation (the code part) The implementation part can be changed without affecting the interface. This is called program-operation independence. 9. What is a view? Ans: A view may be a subset of the database or it may contain virtual data that is derived from the database files but is not explicitly stored . 10. What is OLTP? Ans: Online transaction processing is an application that involve multiple database accesses from different parts of the world . OLTP needs a multi-user DBMS s/w to ensure that concurrent transactions operate correctly.

Potrebbero piacerti anche