NOTE!
Click on MENU to Browse between Subjects...17CS53 - DATABASE MANAGEMENT SYSTEM
Answer Script for Module 3
Solved Previous Year Question Paper
CBCS SCHEME
DATABASE MANAGEMENT SYSTEM
DBMS
[As per Choice Based Credit System (CBCS) scheme]
(Effective from the academic year 2019 -2020)
SEMESTER - V
Subject Code 17CS53
IA Marks 40
Number of Lecture Hours/Week 04
Exam Marks 60
These Questions are being framed for helping the students in the "FINAL Exams" Only
(Remember for Internals the Question Paper is set by your respective teachers).
Questions may be repeated, just to show students how VTU can frame Questions.
- ADMIN
INSERT COMMAND:
The INSERT INTO statement of SQL is used to insert a new row in a table. There are two ways of using INSERT INTO statement for inserting rows:
1. Only values:
First method is to specify only the value
of data to be inserted without the column names.
INSERT INTO table_name VALUES (value1, value2, value3,…);
table_name
: name of the table.
value1, value2,..
: value of first column, second column,… for the new record
2. Column names and values both:
In the second method we
will specify both the columns which we want to fill and their corresponding
values as shown below:
INSERT INTO table_name (column1, column2, column3,..) VALUES (
value1, value2, value3,..);
table_name
: name of the table.
column1
: name of first column, second column …
value1, value2, value3
: value of first column, second column,… for the new record


Refer 12th Question & Answer.
Triggers Refer 4th (iii) Question & Answer.
Assertions:
In SQL, users can specify general constraints. declarative assertions, using the CREATE ASSERTION statement. Each assertion is given a constraint name and is specified via a condition similar to the WHERE clause of an SQL query. For example, to specify the constraint that the salary of an employee must not be greater than the salary of the manager of the department that the employee works for in SQL, we can write the following assertion:

The constraint name SALARY_CONSTRAINT is followed by the keyword CHECK,
which is followed by a condition
in parentheses that must
hold true on every database state for the assertion to be satisfied. The
constraint name can be used later to disable the constraint or to modify or
drop it. The DBMS is responsible for ensuring that the condition is not
violated. Any WHERE clause condition can be used, but many constraints can
be specified using the EXISTS and NOT EXISTS style of SQL conditions.
Whenever some tuples in the database cause the condition of an ASSERTION
statement to evaluate to FALSE, the constraint is violated
. The constraint is satisfied
by a database state if no
combination of tuples in that database state violates the constraint.
The basic technique for writing such assertions is to specify a query that selects any tuples that violate the desired condition. By including this query inside a NOT EXISTS clause, the assertion will specify that the result of this query must be empty so that the condition will always be TRUE. Thus, the assertion is violated if the result of the query is not empty. In the preceding example, the query selects all employees whose salaries are greater than the salary of the manager of their department. If the result of the query is not empty, the assertion is violated.
Note that the CHECK clause and constraint condition can also be used to specify constraints on individual attributes and domains (see Section 6.2.1) and on individual tuples. A major difference between CREATE ASSERTION and the individual domain constraints and tuple constraints is that the CHECK clauses on individual attributes, domains, and tuples are checked in SQL only when tuples are inserted or updated in a specific table. Hence, constraint checking can be implemented more efficiently by the DBMS in these cases. The schema designer should use CHECK on attributes, domains, and tuples only when he or she is sure that the constraint can only be violated by insertion or updating of tuples. On the other hand, the schema designer should use CREATE ASSERTION only in cases where it is not possible to use CHECK on attributes, domains, or tuples, so that simple checks are implemented more efficiently by the DBMS.
Below Page NAVIGATION Links are Provided...
All the Questions on Question Bank Is SOLVED
Follow our Instagram Page:
FutureVisionBIE
https://www.instagram.com/futurevisionbie/
Message: I'm Unable to Reply to all your Emails
so, You can DM me on the Instagram Page & any other Queries.