0% found this document useful (0 votes)
6 views2 pages

Project Guidlines

Uploaded by

Hamza Rao
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)
6 views2 pages

Project Guidlines

Uploaded by

Hamza Rao
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/ 2

Assignment: Database Creation and Query Application

Objective:
This assignment aims to provide hands-on experience with creating and managing databases,
inserting records, and applying various SQL queries and functionalities. By completing this task,
you will gain practical knowledge of database operations and SQL commands.

Task Requirements:
1. Create a Database with 5 Tables:
o Design a relational database consisting of 5 tables. Each table should be logically
related to a common theme, such as a business model (e.g., Customers, Orders,
Products, Employees, Departments).
o Define appropriate columns for each table, including primary and foreign keys to
establish relationships.
2. Insert Records:
o Insert 10 records into each table, ensuring data integrity and consistency across
related tables.

Queries to Apply:
1. Data Retrieval:
o Write SQL queries to retrieve specific data from the tables using SELECT.
o Apply conditions, sorting, and filtering to extract meaningful insights.
2. Data Modification:
o Demonstrate how to modify existing data using the UPDATE command.
o Include examples of changing column values based on specific conditions.
3. Data Update:
o Perform updates that reflect real-life scenarios, such as changing a customer's
address or updating an employee's salary.
4. Starting with a Specific Alphabet:
o Retrieve data where a specific column (e.g., CustomerName) starts with a given
alphabet using the LIKE operator.
o Example: Names starting with the letter 'A'.
5. Ending with a Specific Alphabet:
o Retrieve data where a specific column ends with a given alphabet.
o Example: Names ending with the letter 'n'.
6. Apply Aggregate Functions:
o Use aggregate functions such as SUM, AVG, COUNT, MIN, and MAX to
analyze the data.
o Example: Calculate the total sales, average order amount, or count the number of
employees in each department.
7. Apply Joins:
o Implement the following types of joins to combine data from multiple tables:
▪ Union: Combine results from two tables into a single result set.
▪ Self Join: Join a table with itself to find related rows.
▪ Natural Join: Automatically join tables based on matching column
names.
▪ Outer Joins (Left and Right): Include unmatched rows from one or both
tables.
8. Create Views:
o Create a view to simplify complex queries or provide a subset of the data.
o Example: Create a view showing customers with their most recent orders.
9. Create Indexes:
o Create indexes to improve the performance of queries.
o Example: Create an index on a frequently searched column such as
CustomerName.

You might also like