0% found this document useful (0 votes)
13 views

CS614 Assignment 1 Solution Fall 2024

Uploaded by

bin.azad101
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

CS614 Assignment 1 Solution Fall 2024

Uploaded by

bin.azad101
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

GET MORE SOLUTIONS FILE FROM

VUAnswer.pk
CS614 ASSIGNMENT 1 SOLUTION FALL 2024

Due Date: 8-Nov-2024


Total Marks: 20

DO NOT COPY PASTE EXACT SAME SOLUTION

FOR MORE CORRECT SOLUTIONS CONTACT


WHATSAPP +923162965677

Question 1:

Considering the following queries:


OLTP (OnLine Transaction Processing) specific query

Select tx_date, balance from tx_table


Where account_ID = 592156;

DWH specific query

Select balance, age, sal, gender from customer_table and tx_table


Where age between (20 and 30) and Education = ‘graduate’ and CustID.customer_table =
Customer_ID.tx_table;

Let's take a brief look at these two queries, write the results by comparing them, and summarize
them in the table below:
GET MORE SOLUTIONS FILE FROM
VUAnswer.pk

Solution
Criteria OLTP Query DWH Query
Primary Key Uses account_ID as a primary Joins on CustID and Customer_ID,
Usage key to filter a specific record implying primary key usage
Number of Single table (tx_table) Two tables (customer_table and tx_table)
Tables
Rows Typically returns a single or Returns multiple rows based on specified
Returned few rows based on account_ID conditions
Query High selectivity, very specific Lower selectivity due to broader conditions
Selectivity (focused on account_ID) (age range, education)
Indexing Uses indexes on account_ID May require indexes on multiple columns
for faster retrieval (e.g., age, education) for efficient querying

Question 2:

Consider an employee database system developed for a multi-branch company. Each branch is
based on a specific department in a different city, e.g., HR, Admin, or Head Office.
Table 1: Employee Record

EmployeeID EmployeeName Branch Department JobTitle DateOfJoining Salary


Emp32055 Salman Ahmed Islamabad Head office CEO 2016-11-01 850000
Emp32001 Hussain Ali Lahore Amin Admin 2019-05-01 350000
Officer
Emp32056 Uzma khan Lahore Admin Supervisor 2019-05-01 180000
Emp32022 Zafar Ali Lahore Admin Admin 2020-03-15 220000
Officer
Emp32035 Usama Khan Karachi HR HR 2021-08-20 150000
Assistant
Emp32077 Ali Ahmed Karachi HR HR 2021-05-01 280000
Manager
GET MORE SOLUTIONS FILE FROM
VUAnswer.pk
Identify the normalization form(NF) of the given table and write down the anomaly type of given
statements.

Solution
Scenario Anomaly
Type
If a new branch is added (e.g., a new branch in another city), it is impossible to Insertion
record it in the table unless an employee is also added. Anomaly
If all employees from a particular branch are removed, information about that Deletion
branch (e.g., the city and department) will also be lost. Anomaly
If a department or branch location of a specific department changes (e.g., the Update
HR department moves to a different city), the change must be made in multiple Anomaly
rows. If any change is missed, it can lead to inconsistent data.
GET MORE SOLUTIONS FILE FROM
VUAnswer.pk

REGARD - SARIM
WHATSAPP +923162965677

PLEASE NOTE:
Don't copy-paste the same answer.
Make sure you can make some changes to your solution file before
submitting copy paste solution will be marked zero.
If you found any mistake then correct yourself and inform me.
Before submitting an assignment must check your assignment requirement
file.
If you need some help or question about file and solutions feel free to ask.

FOR MORE ASSIGNMENTS SOLUTIONS VISIT

VUAnswer.pk

You might also like