Document Details

HeavenlyLapSteelGuitar703

Uploaded by HeavenlyLapSteelGuitar703

KG Reddy College of Engineering and Technology

Tags

DBMS questions database management system database concepts computer science

Summary

This document contains viva questions related to Database Management Systems (DBMS). Topics covered include DBMS basics, advantages and disadvantages, data abstraction, integrity rules, and various data models. Useful for students studying DBMS.

Full Transcript

KG REDDY COLLEGE OF ENGINEERING & TECHNOLOGY (Approved by AICTE, New Delhi, Affiliated to JNTUH, Hyderabad) Chilkur (Village), Moinabad (Mandal), R. R Dist, TS-501504 VIVA QUESTIONS WITH ANSWERS A database is a log...

KG REDDY COLLEGE OF ENGINEERING & TECHNOLOGY (Approved by AICTE, New Delhi, Affiliated to JNTUH, Hyderabad) Chilkur (Village), Moinabad (Mandal), R. R Dist, TS-501504 VIVA QUESTIONS WITH ANSWERS 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. 1. What isDBMS? It is a collection of programs that enables user to create and maintain a database. In other words it is general-purpose software that provides the users with the processes of defining, constructing and manipulating the database for various applications. 2. What is a Databasesystem? The database and DBMS software together is called as Database system. 3. Advantages ofDBMS?  Redundancy iscontrolled.  Unauthorized access isrestricted.  Providing multiple userinterfaces.  Enforcing integrityconstraints.  Providing backup andrecovery. 4. Disadvantage in File ProcessingSystem?  Data redundancy &inconsistency.  Difficult in accessingdata.  Dataisolation.  Dataintegrity.  Concurrent access is notpossible.  SecurityProblems. 5. Describe the three levels of dataabstraction? 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. 6. Define the "integrityrules" 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. 7. What is extension andintension? 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. KG REDDY COLLEGE OF ENGINEERING & TECHNOLOGY (Approved by AICTE, New Delhi, Affiliated to JNTUH, Hyderabad) Chilkur (Village), Moinabad (Mandal), R. R Dist, TS-501504 8. What is DataIndependence? Data independence means that “The application is independent of the storage structure and access 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. 9. What is a view? How it is related to dataindependence? 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. 10. What is DataModel? A collection of conceptual tools for describing data, data relationships data semantics and constraints. 11. What is E-Rmodel? 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. 12. What is Object Orientedmodel? This model is based on collection of objects. An object contains values stored in instance variables within 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. 13. What is anEntity? It is a 'thing' in the real world with an independent existence. 14. What is an Entitytype? It is a collection (set) of entities that have same attributes. 15. What is an Entityset? It is a collection of all entities of particular entity type in the database. 16. What is an Extension of entitytype? The collections of entities of a particular entity type are grouped together into an entity set. KG REDDY COLLEGE OF ENGINEERING & TECHNOLOGY (Approved by AICTE, New Delhi, Affiliated to JNTUH, Hyderabad) Chilkur (Village), Moinabad (Mandal), R. R Dist, TS-501504 17. What is Weak Entityset? 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. 18. What is anattribute? It is a particular property, which describes the entity. 19. What is aRelation? A relation is defined as a set of tuples. 20. What is degree of aRelation? It is the number of attribute of its relation schema. 21. What isRelationship? It is an association among two or more entities. 22. What is Relationshipset? The collection (or set) of similar relationships. 23. What is Relationshiptype? Relationship type defines a set of associations or a relationship set among a given set of entity types. 24. What is degree of Relationship type? It is the number of entity type participating. 25. What is DDL (Data DefinitionLanguage)? A data base schema is specifies by a set of definitions expressed by a special language called DDL. 26. What is VDL (View DefinitionLanguage)? It specifies user views and their mappings to the conceptual schema. 27. What is DML (Data ManipulationLanguage)? This language that enable user to access or manipulate data as organized by appropriate data model. 28. What is DMLCompiler? It translates DML statements in a query language into low-level instruction that the query evaluation engine canunderstand. 29. What is Query evaluationengine? It executes low-level instruction generated by compiler. KG REDDY COLLEGE OF ENGINEERING & TECHNOLOGY (Approved by AICTE, New Delhi, Affiliated to JNTUH, Hyderabad) Chilkur (Village), Moinabad (Mandal), R. R Dist, TS-501504 30. What is DDLInterpreter? It interprets DDL statements and records them in tables containing metadata. 31. What is aquery? 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. 32. What do you mean by Correlated subquery? A correlated sub query can be easily identified if it contains any references to the parent sub querycolumns in its WHERE clause. Columns from the sub query cannot be referenced anywhere else in the parent query. 33. 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. 34. What is databaseTrigger? A database trigger is a PL/SQL block that can defined to automatically execute for insert, update, and delete statements against a table. The trigger can be defined to execute once for the entire statement or once for every row that is inserted, updated, or deleted. For any one table, there are twelve events for which you can define database triggers. A database trigger can call database procedures that are also written inPL/SQL. 35. What are stored-procedures? What are the advantages of usingthem? Stored procedures are database objects that perform a user defined operation. A stored procedure can have a set of compound SQL statements. A stored procedure executes the SQL commands and returns the result tothe client. Stored procedures are used to reduce networktraffic. 36. Define super key and give example to illustrate the superkey? Set of one or more attributes taken collectively, allowing to identify uniquely an entity in the entity set.Eg1. {SSN} and {SSN, Cust_name} of customer table are super keys.Eg2. {Branch name}and {Branch name, Branch city} of Branch table re super keys. 37. Define candidate key and give example to illustrate the candidatekey? Super keys with no proper subset are called the candidate keys. Otherwise it is called minimal super key. Candidate key is nothing but the primary key used in SQL. Eg1. {SSN} is the candidate keyfor the super keys {SSN} and {SSN, Cust_name} of customer table.Eg2. {Branch name} is the candidate key for the super keys {Branch name} and {Branch name, Branch city} of Branch table. 38. What is Primarykey? A key chosen to act as the means by which to identify tuples in a relation. KG REDDY COLLEGE OF ENGINEERING & TECHNOLOGY (Approved by AICTE, New Delhi, Affiliated to JNTUH, Hyderabad) Chilkur (Village), Moinabad (Mandal), R. R Dist, TS-501504 39. What is foreignkey? A foreign key of relation R is a set of its attributes intended to be used (by each tuple in R) for identifying/referring to a tuples in some relation S. (R is called the referencing relation and S the referenced relation.) For this to make sense, the set of attributes of R forming the foreign key should "correspond to" some superkeyofS. Indeed, by definition we require this superkeytobe the primary key of S. 40. What is a Cursor? A cursor is a pointer to this context area. PL/SQL controls the context area through a cursor. A cursor holds the rows (one or more) returned by a SQL statement. The set of rows the cursor holds is referred to as the activeset. 41. What is FunctionalDependency? 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 tuples 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]. 42. What is 1 NF (NormalForm)? The domain of attribute must include only atomic (simple, indivisible) values. 43. What is Fully Functionaldependency? It is based on concept of full functional dependency. A functional dependency X-> Y is fully functional dependency if removal of any attribute A from X means that the dependency does not hold any more. 44. What is2NF? 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. 45. What is3NF? 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. 46. What is BCNF (Boyce-Codd NormalForm)? 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. 47. What is4NF? 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 superkey. KG REDDY COLLEGE OF ENGINEERING & TECHNOLOGY (Approved by AICTE, New Delhi, Affiliated to JNTUH, Hyderabad) Chilkur (Village), Moinabad (Mandal), R. R Dist, TS-501504 48. What is5NF? 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 i) Ri = R for somei. ii) The join dependency is implied by the set of FD, over R in which the left side is key ofR. 49.What is dependencypreservation? Dependency Preservation Property enables us to enforce a constraint on the original relation from corresponding instances in the smaller relations. 50. What is Lossless joinproperty? Lossless join property enables us to find any instance of the original relation from corresponding instances in the smaller relations

Use Quizgecko on...
Browser
Browser