0% found this document useful (0 votes)
45 views19 pages

DMA Micro Project

The document describes a micro project on cursors and types of cursors in a database management system. It outlines the aim to enhance understanding of database manipulation techniques. It proposes hands-on exercises with different cursor types and case studies to select appropriate types based on scenarios. Performance analysis of cursor types is also included.

Uploaded by

Ashish Mavani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views19 pages

DMA Micro Project

The document describes a micro project on cursors and types of cursors in a database management system. It outlines the aim to enhance understanding of database manipulation techniques. It proposes hands-on exercises with different cursor types and case studies to select appropriate types based on scenarios. Performance analysis of cursor types is also included.

Uploaded by

Ashish Mavani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Mahavir Polytechnic, Nashik

(Year: 2023-2024)
Micro Project

Program: Information Technology

Semester: 4th

Course: Database Management

Course Code: 22416

Title of the Project: Cursor and Types of Cursor

______________________________________________

Members of the Group

1. Shelar Aditya Vaibhav Enrollment No.2205300175

2. Bankar Nilesh Krushna Enrollment No.2205300194

3. Mavani Ashish Shantilal Enrollment No. 2205300293

1
Maharashtra State Board of Technical Education, Mumbai

CERTIFICATE

This is to certify that Mr. /Ms Bankar Nilesh Krushna Roll No. 60 of 4th Semester of

Diploma in Information Technology of Mahavir Polytechnic has completed the

Micro Project satisfactorily in course Database Management (22416) for the

academic year 2023-2024 as prescribed in the curriculum.

Place ______________ Enrolment No 2205300194

Date _______________ Exam Seat No _______________________

Course Coordinator HOD Principal

Institute Seal

2
Maharashtra State Board of Technical Education, Mumbai

CERTIFICATE

This is to certify that Mr. /Ms Mavani Ashish Shantilal Roll No.63 of 4th Semester of

Diploma in Information Technology of Mahavir Polytechnic has completed the

Micro Project satisfactorily in course Database Management (22416) for the

academic year 2023-2024 as prescribed in the curriculum.

Place ______________ Enrolment No 2205300293

Date _______________ Exam Seat No _______________________

Course Coordinator HOD Principal

Institute Seal

3
Maharashtra State Board of Technical Education, Mumbai

CERTIFICATE

This is to certify that Mr. /Ms Shelar Aditya Vaibhav No Roll. 41 of 4th Semester of

Diploma in Information Technology of Mahavir Polytechnic has completed the

Micro Project satisfactorily in course Database Management (22416) for the

academic year 2023-2024 as prescribed in the curriculum.

Place ______________ Enrolment No 2205300175

Date _______________ Exam Seat No _______________________

Course Coordinator HOD Principal

Institute Seal

4
Mahavir Polytechnic

Vision

We strive to educate students to become industry ready engineers having professional attitude and
groomed personality.

Mission

· To provide well defined system to ensure quality education by strengthening teaching learning
processes through innovative practices

· To provide a platform where students are exposed to the industry, up bridged with the industry
standards and requirements.

· To train students by teaching them leadership and teamwork skills.

· To groom students enriching their personality and social values

IT Department

Vision
IT Department strives to educate students to become Industry ready Engineers having Professional
attitude and groomed personality.

Mission
.To provides well defined system to ensure quality education by strengthening teaching learning
processes through innovative practices.

.To provides a platform where students are exposed to the Industry, up bridged with the industry
standards and requirements.

.To train students by teaching them leadership and teamwork skills.

.To groom students enriching their personality and social values.

5
PART A
‘Cursor and Types of Cursor’
1.0 Brief Introduction

A cursor in database management systems (DBMS) allows for navigating and manipulating a result set
row by row. Common types of cursors include forward-only, static, dynamic, keyset-driven,
insensitive, and scrollable cursors. Each type has specific characteristics and is used based on factors
like the size of the result set and the requirements of the application.

2.0 Aim/Benefits of the Micro – Project

Aim:

The aim of a micro project focused on cursors and types of cursors in a database management system (DBMS)
is to enhance understanding and proficiency in database manipulation techniques.

Benefits of such a micro project include:


1. Hands-On Learning: Participants gain practical experience by working directly with cursors within a DBMS
environment, enhancing their understanding of database concepts.

2. Enhanced Problem-Solving Skills: Through implementing cursor operations and handling different cursor
types, participants develop problem-solving skills essential for database management tasks.

3. Improved Database Proficiency: Participants become proficient in utilizing cursors effectively, allowing them
to perform complex data manipulation tasks with confidence.

4. Understanding Performance Implications: By exploring the advantages and limitations of different cursor
types, participants gain insights into the performance implications of cursor usage, enabling them to make
informed decisions in real-world scenarios.

5. Preparation for Advanced Database Work: This micro project serves as a foundation for more advanced
database projects and tasks, laying the groundwork for further exploration of database management concepts.

3.0 Course Outcomes Addressed


The micro-project "Cursor and Types of Cursor" addresses key course outcomes:
1. Understanding Cursors: Students will comprehend the functionality of cursors in database systems.

2. Implementing Cursors: Students will gain practical skills in using various cursor operations.

3. Selecting Cursor Types: Students will learn to choose appropriate cursor types based on specific
requirements.

4. Performance Optimization: Students will be able to optimize cursor usage for improved data
retrieval efficiency.

6
4.0 Proposed Methodology (in about 4 to 5 Sentences)
• Introduction to Cursors: Begin with a theoretical overview of cursors, explaining their purpose,
functionality, and the importance of cursor types in database management.
• Database Setup: Set up a database environment where students can practice implementing cursors. This
could involve using a relational database management system (RDBMS) such as MySQL, PostgreSQL, or
SQLite.
• Hands-On Exercises: Provide a series of hands-on exercises where students implement different cursor
operations using SQL queries. These exercises should cover fetching rows, scrolling through result sets, and
performing data modifications using various cursor types.
• Case Studies and Scenarios: Present real-world case studies and scenarios where students must analyze
data retrieval requirements and select the most appropriate cursor type based on the given scenario.
Encourage students to discuss their reasoning behind selecting a particular cursor type.
• Performance Analysis: Conduct performance analysis exercises where students compare the performance
of different cursor types for a given task. This could involve measuring the time taken to execute queries
and analyzing resource usage.
• Documentation and Reporting: Require students to document their findings, solutions, and performance
analysis results. This documentation could take the form of reports, presentations, or code repositories,
depending on the preferences of the instructor.
• Peer Review and Discussion: Facilitate peer review sessions where students can discuss their approaches,
share insights, and provide feedback on each other's work. Encourage constructive criticism and
collaborative learning.
• Final Project Presentation: Conclude the micro project with a final presentation session where students
showcase their learnings, findings, and project outcomes. This presentation could also include
recommendations for best practices in cursor usage.
• Evaluation and Feedback: Evaluate student performance based on their documentation, presentations,
and participation in discussions. Provide constructive feedback to help students improve their
understanding of cursor concepts and their practical implementation skills.

Progress Report / Weekly Report


Week Duration Sign of the
Date Work / Activity Performed
No in Hrs. Faculty
1 Selection topic

2 Finalizing topic

3 Information search

4 Making report

5 Project Submission

7
5.0 Resources Required (major resources such as PC, some machining facility, Software etc.)

Sr. No
Name Of
Specifications Quantity Remarks
Resource/Material
1 Software Chrome, MS Word 1

2 RAM 4 GB 1

3 SSD 256 GB 1

4 Operating System Windows 11 1

5 Processor AMD Athlon PRO 1


3045B with Radeon
Graphics

Sign of Course Teacher

8
MICROPROJECT REPORT
1.0 Rationale
The project on cursors and their types in a database management system (DBMS) serves as an opportunity
to deepen understanding of database manipulation concepts. Through practical application, students gain
hands-on experience, reinforcing theoretical knowledge acquired in database courses. They explore the
functionalities of various cursor types, understanding their strengths and limitations. Additionally, students
learn optimization techniques to enhance performance in data retrieval tasks. Ultimately, this project
prepares students for roles in database development and administration by providing valuable skills and
insights into cursor usage, ensuring readiness for real-world database challenges.

2.0 Aim/Benefits of the Micro – Project (in about 4 to 5 Sentences)

Aim:

The aim of the project on cursors and types of cursors in a database management system (DBMS) is to provide
students with a thorough understanding of cursor functionality and types. It aims to familiarize students with
various cursor types, enabling them to make informed decisions when implementing cursors in database
applications. Additionally, the project aims to equip students with optimization techniques to enhance data
retrieval efficiency, preparing them for roles in database development and administration.
Benefits:

1. Enhanced Understanding: Students gain a deeper understanding of cursor functionality and its
significance in database manipulation, providing them with a solid foundation in database concepts.

2. Practical Skills Development: Through hands-on exploration, students develop practical skills in
implementing and utilizing various cursor types, preparing them for real-world database tasks.

3. Optimization Techniques: Students learn optimization techniques to improve data retrieval


efficiency, enabling them to design more efficient database systems and applications.

4. Readiness for Roles: By gaining insights into cursor usage and optimization, students become
better prepared for roles in database development and administration, enhancing their career
readiness.

COs addressed by the Micro Project:

CO1: Students grasp the functionality of cursors and the significance of different types.

Students develop hands-on proficiency in implementing various cursor types for data
CO2:
manipulation tasks.

CO3: Students learn optimization techniques to enhance data retrieval efficiency using cursors.

Students gain the ability to select appropriate cursor types based on performance and
CO4:
application requirements.

9
3.0 Literature Review

1. Introduction
- Definition and significance of micro project cursors.
- Aim of the review.
2. Theoretical Background
- Overview of cursors in DBMS.
- Distinction between micro project cursors and traditional cursors.
3. Types of Cursors
- Forward-Only, Static, Dynamic, and Keyset Cursors.
- Characteristics, applications, and considerations for micro projects.
4. Applications
- Examples showcasing cursor usage in micro projects.
- Efficiency gains and challenges encountered.
5. Best Practices
- Guidelines for effective cursor usage.
- Performance optimization strategies and alternatives.
6. Future Directions
- Emerging trends and research opportunities.
- Expected advancements in micro project cursor technology.
7. Conclusion
- Summary of findings.
- Implications for micro project development.
- Closing remarks on cursor management in small-scale applications.
4.0 Actual Methodology (in about 4 to 5 Sentences)

1. Literature Review:
- Review existing literature on cursors in DBMS and their relevance to micro projects.
2. Definition and Scope:
- Define micro projects in database management and specify study objectives.
3. Data Collection:
- Gather data on cursor types used in micro projects from samples and experts.
4. Analysis:
- Analyze data to compare cursor types based on efficiency and scalability.
5. Case Studies:
- Study representative micro projects to understand cursor usage and impact.
6. Evaluation:
- Evaluate cursor types' suitability for micro projects considering project requirements.
7. Recommendations:
- Provide best practices for cursor usage and optimization.
8. Future Directions:
- Discuss potential areas for further research and development.
9. Documentation:
- Document methodology, findings, and recommendations in a report.
10. Peer Review:
- Submit the report for peer review to ensure credibility and quality
.

10
5.0 Actual Resources Used (major resources such as PC, some machining facility, Software etc.)

Name Of
Sr. No Specifications Quantity Remarks
Resource/Material

1 Software Chrome, MS Word 1

2 RAM 4 GB 1

3 SSD 256 GB 1

4 Operating System Windows 11 1

5 Processor AMD Athlon PRO 1


3045B with Radeon
Graphics

6.0 Outputs of the Micro-Projects

What Is a Cursor in SQL?


A cursor in SQL is a user-defined iterative variable that enables the user to access query results. It
could be thought of as a pointer that points to the context area. A cursor is used by PL/SQL to navigate
through the context area. It holds the rows that are returned by SQL statements.
A cursor is defined using a DECLARE statement and taking SELECT as a parameter. A cursor is
generally given a name so that in future, it could be referred to in the program to retrieve and execute
the rows returned by SQL statements.
Types of Cursors
There are two types of cursors-
• Implicit Cursor
Whenever a DML statement like INSERT, UPDATE or DELETE is executed, an implicit cursor is
generated by default, to process these statements. It is also created when a SELECT statement returning
only a single row is executed. Since these cursors are automatically generated, these cursors or the
information contained in them can not be controlled by the users. To check the state of these DML
statements, Oracle provides a few attributes known as implicit cursor attributes, as given below.

Attribute Description

Returns TRUE if DML statement


was executed successfully or
%FOUND SELECT statement returns one or
more rows, otherwise returns
FALSE.

11
It is the logical opposite of the
above attribute. Returns TRUE if no
%NOTFOUND statement was executed or no record
was fetched, otherwise returns
FALSE.

Returns TRUE if the cursor is open,


otherwise FALSE.
The point to be noted here is that an
implicit cursor is automatically
%ISOPEN
closed by Oracle once the statement
associated with it gets executed. So,
in this case, it will always return
FALSE.

Returns the number of statements


%ROWCOUNT
from the cursor at a time.

Example
Let’s consider a table named student, as given below.

Now, using the below program, we’ll update the table by decreasing the salary of each below by 1000.

12
Here %ROWCOUNT attribute of Oracle has been used to find the number of rows that have been
updated in the database.
Output-

Now, if we see our table, the rows have been updated and the salary of each employee has been reduced
by 1000.

13
• Explicit Cursor
An explicit cursor is a programmer-defined cursor that is created when we are executing a SELECT
statement returning more than one row. Even though the cursor stores several records simultaneously,
only one can be processed at a time, which is referred to as the current row. This cursor is defined for
gaining extra control over the context area.
The syntax for defining an explicit cursor-

CURSOR cursor_name IS select_statement;

Working with an explicit cursor is not the same as with an implicit cursor, some steps have to be
followed while using an explicit cursor. The steps are defined as follows;

• Declaring the Cursor


The cursor is declared in the DECLARE section along with the associated SELECT statement.
Syntax-

CURSOR CURSORNAME IS SELECT.......;

• Opening the Cursor


The cursor is opened in the execution section and doing so allocates the memory for the cursor to fetch
the rows returned by the SQL statement.
Syntax-

OPEN cursor_name;

14
• Fetching the Cursor
This operation involves fetching the data, accessing one row at a time.
Syntax-

FETCH cursor_name INTO record_name;

• Closing the Cursor


At the end of the SQL block, the cursor is closed.
Syntax-

CLOSE cursor__name;

Example-

In the above code, we declare the cursor as s_student, and it is used to fetch the id, name and address of
each student in the database.

15
Output

How to Create a Cursor?


A cursor in SQL can be created by using the above method, following the four steps, or we can also use
the FOR LOOP for working with the cursor, by giving the cursor name instead of the range limit in the
for loop statement. This will make the for loop run from the cursor’s first record to the cursor’s last
record. The FOR loop will perform the cursor variable, cursor opening, cursor fetching, and cursor
closing implicitly.
Syntax-

DECLARE
CURSOR <cursor_name> IS <SELECT statement>;
BEGIN
FOR I IN <cursor_name>
LOOP
.
.
END LOOP;
END;

16
Example-

Here, the cursor is created as student_s. The for loop variable is named lv_s_name. The above code
prints the name of the student in each iteration of the for a loop.
Output

Cursor Life Cycle


A cursor life cycle has below five steps:
• Cursor Declaration
The SQL statement is used to declare a cursor.
• Cursor Opening
A cursor is opened to store data from the result collection.
• Cursor Fetching
When a cursor is opened, rows can be fetched one at a time or in a block to perform data manipulation.
• Cursor Closing
Following data manipulation, the cursor should be directly locked.
• Cursor Deallocation
Cursors can be deallocated to erase the cursor description and free all resources associated with the
cursor.

17
Conclusion
So in this cursor in SQL tutorial, we covered everything from what is a cursor in SQL to the difference
between implicit and explicit cursors, to creating a cursor in SQL to cursor life cycle too!
If you wish to learn the A-Z of SQL, Simplilearn’s SQL Certification Training should be your next
stop. And if you have any queries related to the cursor in SQL, feel free to drop them in the comment
section and our experts will answer them for you.

7.0 Skill Developed / Learning outcome of this Micro-Project


- Technical Skills:
- Proficiency in database management and SQL programming.
- Ability to optimize database performance.

- Analytical Skills:
- Critical thinking and problem-solving in evaluating cursor types.
- Data analysis to draw meaningful conclusions.

- Project Management Skills:


- Resource and time management in micro project environments.

- Communication Skills:
- Technical communication of findings and recommendations.
- Collaboration and teamwork.

- Learning Outcomes:
- Deeper understanding of database concepts and practical application.
- Foundation for continuous learning in database management and related technologies.

8.0 Applications of this Micro-Project


1. Data Manipulation:
- Cursors facilitate operations like data retrieval, insertion, deletion, and updates in micro projects.
2. Data Analysis and Reporting:
- They enable complex data analysis tasks and report generation by processing and aggregating data sets.
3. Batch Processing:
- Cursors are used for iterative data processing tasks, with static cursors ensuring data consistency.
4. Cursor-Based Navigation:
- They support cursor-based navigation systems such as pagination in web applications.
5. Real-Time Data Updates:
- Cursors like dynamic and keyset cursors are employed for real-time data scenarios.
6. Data Entry and Validation:
- Cursors are used in cursor-based data manipulation tasks, ensuring data consistency and integrity.

18
Teacher Evaluation Sheet for Micro Project

Rubrics for Assessment of Micro-Project

Poor Average Good Excellent


Characteristic to be
Sr. No
Assessed (Marks 1-3) (Marks 4-5) (Marks 6-8) (Marks 9-10)

1. Relevance to course

2. Literature survey

3. Project proposal

4. Completion of target
Analysis &
5.
representationof data
Quality of
6.
Prototype/Model
7. Report preparation

8. Presentation

9. Defense
Marks:-

Marks obtained
Marks for Total
Enrollment by the
Name Of Student Group Work Marks
No. individual based
(06) (10)
on viva (04)
2205300175 Shelar Aditya Vaibhav

2205300194 Bankar Nilesh Krushna

2205300293 Mavani Ashish Shantilal

Name and designation of Faculty Member_______________________________________

Signature: ________________________________________________

19

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy