DBMS Assignment 01
DBMS Assignment 01
Q1. What do you mean by DBMS? Explain some application areas of DBMS.
Q2. Illustrate Data model. With an example explain the various types of data models.
Q3. What do you understand by E-R model? Explain the following term with respect to this model.
(Hint--- You can take any suitable E-R model with degree 2 to explain the following)
(a) Entity (b) Attribute (c) Relationship (d) Degree of a relationship (e) Total participation
(f) Partial participation (g) Entity type (h) Entity set (i) Schema (j) Cardinality ratio- Max and Min
Q4. Define various types of attributes used in E-R model. Also illustrate how these attributes can be
converted into relation (table). [Hint- You need to take meaningful/suitable example to show the
conversion of each attribute into relation]
(a) For the above schema, set the data types along with constraints as per the following.
1- For Roll_No field, set the data types Integer.
2- For Sname field, set the data types VARCHAR(20) with NOT NULL Constraint.
3- For Gender field, set the data type VARCHAR(10) with NOT NULL Constraint.
4- For Per (percentage) and Branch fields, set the data type FLOAT and VARCHAR respectively.
5- For Age field, set the data type INT with CHECK Constraints by allowing only positive value.
(b) By using the above schema perform the following SQL Queries.
1. Write a SQL query to find the number of students gender-wise.
2. Write a SQL query to find the number of students branch-wise.
3. Write a SQL query to find the average percentage of male and female students.
4. Write a SQL query to find the maximum percentage from male and female students.
5. Write a SQL query to find the minimum percentage form male and female students.
6. Write a SQL query to find the maximum percentage from branch-wise.
7. Write a SQL query to find the average age of male and female students.
8. Write a SQL query to find the branches having only one student.
9. Write a SQL query to find the branches in which students are more than one.
10. Write a SQL query to find the branches in which students having minimum percentage is
greater than 75.
Q6. Construct an E-R model for Library management system. [Hint—Firstly, Identify the various
types of entities used in such system. Then you need to define the types of attributes each entity
has. At the last, you need to define the relationship between each of them accordingly]
Q7. Differentiate between SUPER KEY, CANDIDATE KEY and PRIMARY KEY.
Q8. With neat sketch discuss the overall structure of DBMS. Also explain the classification of
Database management systems.
Q9. Illustrate the following SQL clause with suitable example(s).
a- SELECT b- FROM c- WHERE d- GROUP BY e- HAVING f- ORDER BY [Hint—At the last you can
take any one example to use all these in your SQL query]
Q10. What is data abstraction and data independence? Explain their types with suitable example.
Q11. Define DDL and DML commands with an appropriate example.
Q12. What do you mean by Constraints? Sometimes, why it is useful in database designing? Justify
your answer. Also explain the following integrity constraints used in DBMS.
i- Domain constraint ii- Entity integrity constraint iii- Key constraints iv- Referential entity
integrity constraint.
Q13. Define naming conventions and design issues with respect to E-R diagram.
Q14. With example explain aggregate functions used in SQL.
Q15. Explain the following SQL operators with suitable example.
(a) LIKE (b) NOT LIKE (c) IN (d) NOT IN (e) LIMIT (f) ALL (g) BETWEEN (h) SOME/ANY