0% found this document useful (0 votes)
202 views5 pages

SQL Command Basics for Databases

This lab report explores SQL commands for creating and manipulating databases. The objective is to familiarize students with fundamental SQL statements for tasks like creating databases, defining tables, inserting data, retrieving information, and modifying database structures. The report provides examples to demonstrate the syntax and usage of various SQL commands, with the goal of developing a solid foundation in working with databases. In conclusion, an overview of key SQL commands was provided to enable participants to create and manipulate databases through hands-on practice and exploration.

Uploaded by

Shahed Annam
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)
202 views5 pages

SQL Command Basics for Databases

This lab report explores SQL commands for creating and manipulating databases. The objective is to familiarize students with fundamental SQL statements for tasks like creating databases, defining tables, inserting data, retrieving information, and modifying database structures. The report provides examples to demonstrate the syntax and usage of various SQL commands, with the goal of developing a solid foundation in working with databases. In conclusion, an overview of key SQL commands was provided to enable participants to create and manipulate databases through hands-on practice and exploration.

Uploaded by

Shahed Annam
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

LAB REPORT 06

Title: SQL Command Practise(some more query)

Course title: Database Systems Laboratory


Course code: CSE-256
2 Year 2nd Semester Examination 2022
nd

Date of Submission: 22/01/2024

Submitted to-

Anup Majumder
Assistant Professor

Dr. Liton Jude Rozario


Professor

Dr. MD. Humayun Kabir


Professor

Department of Computer Science and Engineering


Jahangirnagar University
Savar, Dhaka-1342

Sl Class Roll Exam Roll Name

01 381 210901 Shahed Annam

Department of Computer Science and Engineering


Jahangirnagar University
Savar, Dhaka, Bangladesh
Introduction:

The objective of this lab report is to explore the essential SQL commands used for
creating and manipulating databases. SQL (Structured Query Language) is a standard
language for managing relational databases. It provides a means to interact with
databases, facilitating tasks such as creating tables, inserting data, querying information,
and modifying the database structure. Understanding SQL commands is crucial for
anyone working with databases, as it forms the foundation for efficient and effective
data management.

Objective:
The main objective of this lab report is to familiarize ourselves with the fundamental
SQL commands involved in creating and manipulating databases. By understanding
these commands, we aim to gain the knowledge and skills necessary to perform tasks
such as creating a database, defining tables, inserting data, retrieving information, and
modifying the structure of a database. Through practical examples, we will explore the
syntax and usage of various SQL commands, enabling us to develop a solid foundation in
working with databases.

1. Find list in alphabetic order,all customer,who have a loan at the Dhaka


branch
2. List the entire loan relation in descending order of amont(If several loans
have the same amount ,order them in ascending order by loan_number)

3. List all customer who have an account at the bank


4. List the customer who have a loan at the bank

5. Find all customer who have a loan, account or both at the bank
6. Find all customer who have both a loan and an account

7. Find the average account balance at the Dhaka bank

Conclusion:

In conclusion, this lab provided a comprehensive overview of fundamental SQL


commands essential for database creation and manipulation. Participants were
introduced to the syntax and functionality of key SQL statements, enabling them
to create databases, manipulate data, and modify database structures.
Understanding these commands is crucial for anyone involved in database
management or development. Moving forward, continued practice and
exploration of SQL commands will undoubtedly enhance participants' abilities to
work with databases effectively, ensuring efficient data management and
manipulation in various applications.

Common questions

Powered by AI

Beginners often struggle with understanding the syntax and structure of SQL commands, as well as applying these commands to real-world scenarios. The lab report proposes overcoming these challenges through practical exercises that reinforce command usage and understanding. By providing structured tasks and examples, learners can gradually build confidence and proficiency in using SQL effectively .

The lab report suggests ordering SQL query results in specific ways depending on the requirement. For instance, when listing customers with loans at a particular branch, the results are to be sorted in alphabetical order, while the entire loan relation is ordered in descending order of amount. If several loans have the same amount, they should be further ordered by loan number in ascending order to maintain clarity and consistency .

The lab emphasizes the distinction between SQL commands used for data retrieval, such as selecting data from tables using queries, and those used for data manipulation, which include commands for inserting, updating, or modifying database structures. For example, commands to list customers with various types of accounts or loans focus on data retrieval, whereas commands for creating new tables or altering existing ones deal with structural modification .

SQL commands are essential for creating and managing relational databases. They allow users to create tables, insert data, retrieve information, and modify the database structure. Understanding these commands is crucial for efficient data management, as they form the foundation for executing tasks related to database creation, manipulation, and maintenance .

The lab report emphasizes the need for precision in SQL syntax to ensure accurate database operations. Proper application of syntax ensures that database queries execute as intended without errors, promoting data integrity and facilitating efficient data manipulation and retrieval. Through detailed examples, the report highlights common pitfalls and best practices for writing effective SQL commands, underscoring the importance of syntax understanding in database management .

The lab report aims to provide participants with a comprehensive understanding of fundamental SQL commands, enabling them to effectively perform tasks such as creating databases, defining tables, inserting data, retrieving information, and modifying database structures. The expectation is that through practical examples, participants will develop a solid foundation in SQL, enhancing their ability to manage and manipulate databases efficiently .

The lab report suggests using SQL set operations to determine the overlap between customers with loans and those with accounts. Specifically, a query to find all customers who have both a loan and an account can be achieved using intersection operations or inner joins that match customer identifiers in both the loan and account datasets. This approach accurately identifies customers engaging in multiple banking services .

The lab report employs an experiential learning approach by combining theoretical explanations with practical examples. This method involves familiarizing students with fundamental SQL commands and then applying them in controlled scenarios to solve specific database management tasks. Such a hands-on approach helps in developing both conceptual understanding and practical skills necessary for effective database management .

The lab report underscores the importance of alphabetic ordering for achieving clarity and ease of access when listing customer information. Alphabetic ordering helps in systematically organizing the data, making it more understandable and searchable for users looking through customer lists, such as when identifying customers with loans at a particular branch .

Understanding the average account balance at a specific bank branch is significant as it helps assess the financial health and customer base of that branch. The lab suggests using SQL aggregate functions to compute average balances, providing insights into customer activities and branch performance, which are crucial for strategic planning and decision-making .

You might also like