DMS Assignment No3
DMS Assignment No3
Q: Important Question.(Marks 2)
1. Enlist four aggregate functions.
2. Write syntax for creating synonyms with example.
3. Write syntax for creating and dropping views.
4. State the use of Avg function with example.
5. List any four string functions in SQL.
6. Describe the concept of view with example. State its purpose.
Q: Important Question.(Marks 4)
1. Explain any four string functions with example.
2. Explain joins in SQL with examples.
3. Write and explain syntax for creating view with example.
4. Explain any four aggregate functions with example.
5. Create simple and composite index. Write command to drop above index.
6. Write and Explain the syntax for creating and dropping indexes with an example.
7. State the use of group by and order by clauses
8. Write syntax for i) Create Index ii) Drop Index
Q: Important Question.(Marks 6)
1.Consider the following schema Depositor (ACC_no, Name, PAN, Balance)
I) Create a view on Depositor having attributes (ACC_no, PAN) where balance is
greater than
100000.
Ans: create view v1 as select ACC_No,PAN from Depositor where balance >
100000;
2.Create a sequence.
i) Sequence name is Seq _ 1, Start with 1, increment by 1, minimum value 1,
maximum value 20.
Ans: create sequence Seq_1 start with 1 increment by 1 minvalue 1 maxvalue 20;
ii) Use a seq_1 to insert the values into table Student (ID Number (10), Name char
(20));
Ans : insert into student values(Seq_1.nextval,’ABC’);
Unit 3: Interactive SQL and Advance SQL: SQL Performance Tuning
increment by 1
minvalue 0
maxvalue 100
cycle;