Monday, March 24, 2014

DBMS

11. What is the use of group by clause? 
Group by clause is used to apply aggregate functions to a set of tuples.The  attributes given in the group by clause are used to form groups.Tuples with the  same value on all attributes in the group by clause are placed in one group. 

12. What is the use of sub queries? 
A sub query is a select-from-where expression that is nested with in another query. A common use of sub queries is to perform tests for set membership, make setcomparisions, and determine set cardinality. 

13. What is view in SQL? How is it defined? 
Any relation that is not part of the logical model, but is made visible to a user as a  virtual relation is called a view. 
We define view in SQL by using the create view command. The form of the create view command is 
Create view v as <query expression> 

14. What is the use of with clause in SQL? 
The with clause provides a way of defining a temporary view whose definition is available only to the query in which the with clause occurs. 

15. List the table modification commands in SQL? 
. Deletion 
. Insertion 
. Updates 
. Update of a view 

16. List out the statements associated with a database transaction? 
.Commit work 
.Rollback work 

17. What is transaction? 
Transaction is a unit of program execution that accesses and possibly updated 
various data items. 

18. List the SQL domain Types? 
SQL supports the following domain types. 
1) Char(n) 2) varchar(n) 3) int 4) numeric(p,d) 
5) float(n) 6) date. 


19. What is the use of integrity constraints? 
Integrity constraints ensure that changes made to the database by authorized users do not result in a loss of data consistency. Thus integrity constraints guard against accidental damage to the database. 

20. Mention the 2 forms of integrity constraints in ER model? 
. Key declarations 
. Form of a relationship 



21. What is trigger? 
Triggers are statements that are executed automatically by the system as the side effect of a modification to the database. 

22. What are domain constraints? 
A domain is a set of values that may be assigned to an attribute .all values that appear in a column of a relation must be taken from the same domain. 

23. What are referential integrity constraints? 
A value that appears in one relation for a given set of attributes also appears for a certain set of attributes in another relation. 

24. What is assertion? Mention the forms available. 
An assertion is a predicate expressing a condition that we wish the database always to satisfy. 
.Domain integrity constraints. 
.Referential integrity constraints 

25. Give the syntax of assertion? 
Create assertion <assertion name>check<predicate> 

26. What is the need for triggers? 
Triggers are useful mechanisms for alerting humans or for starting certain tasks automatically when certain conditions are met.

27. List the requirements needed to design a trigger. 
The requirements are . 
Specifying when a trigger is to be executed. 
Specify the actions to be taken when the trigger executes. 

28. Give the forms of triggers? 
The triggering event can be insert or delete. 
For updated the trigger can specify columns. 
The referencing old row as clause 
The referencing new row as clause 
The triggers can be initiated before the event or after the event. 

29. What does database security refer to? 
Database security refers to the protection from unauthorized access and malicious destruction or alteration. 

30. List some security violations (or) name any forms of malicious access. 
Unauthorized reading of data . 
Unauthorized modification of data 
.Unauthorized destruction of data. 

No comments:

Post a Comment