首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
代写program、代做c/c++设计程序
项目预算:
开发周期:
发布时间:
要求地区:
Assignment 3: Executor
Introduction
Welcome to the Executor assignment. This assignment exercises your understanding of an evaluator implementation for WHERE clauses.
In the Database Management Systems (DBMS), the ability to effectively query and manipulate data is foundational. A pivotal component of querying databases is the WHERE clause, which serves as a filter to select specific data that meets certain conditions. This assignment is designed to deepen your understanding of how DBMS evaluates these conditions, determining whether they are true or false for given data rows. By implementing an evaluator for the WHERE clause, you will gain hands-on experience in parsing and executing conditional logic.
Where Clause
The WHERE clause is a fundamental element of SQL queries that allows for the filtering of records, ensuring that only data satisfying specific conditions is selected, updated, or deleted from a database. It serves as a critical tool for data analysis and management, enabling precise control over the retrieval of information based on defined criteria.
A simplified WHERE clause can include various components:
●Column References: Direct references to the columns of a database table whose values are part of the conditions being evaluated.
●Constants: Fixed values against which column values are compared.
●Arithmetic Operations: Basic mathematical operations (addition, subtraction, multiplication, division) that can be performed on column values or constants within the condition.
●Logical Operators: Operators such as AND, OR, and NOT that are used to combine multiple conditions or negate a condition, respectively.
●Pattern Matching: Utilization of patterns (often with the LIKE operator) for matching string values according to a specified format.
●BETWEEN: A condition that checks if a column's value falls within a specified range.
●IN: A condition that checks if a column's value matches any value within a provided list.
●IS NULL and IS NOT NULL: Conditions that check for null (or missing) values.
●EXISTS: A logical operator that checks for the existence of rows in a subquery (though, for simplicity, subqueries won’t be considered in this assignment).
The WHERE clause is a powerful part of SQL that enhances the flexibility and effectiveness of database operations by allowing for complex and nuanced data querying strategies.
Assignment 3 Requirement
1.Understanding the Existing Code:
○Download the starter code at https://github.com/dbms-summer-2023/Command_Processor_Layer/tree/Assignment3.
○Familiarize yourself with the provided C++ starter code. Read the comments on the “testWhere.cpp” to understand how to test the Evaluator class.
○Analyze the structure of ParserTreeNode. It is necessary because you need to traverse an instance of ParseTreeNode when evaluating each node of the tree by your implementation of the Evaluator class.
2.Implement the Evaluate Function:
○Here is the signature of the method in the Evaluator class you need to implement. It is located in the folder /executor in the starter code.
bool evaluate(ParserTreeNode &node, std::unordered_map
&column_name_to_value);
○The provided parameters include a parsed tree, column names and its corresponding values. To simplify the process, column values are always provided as strings[In the production version of CapybaraDB, the method receives Storage Type instead of string.]. And the output is bool type, true or false. Your evaluator is expected to give a correct evaluation of the condition.
○Your implementation of evaluate() function in Evaluator class should cover the following:
i.Identify column names and find their values
ii.Comparison operators: =, >, <, >=, <=, <>
iii.Logical operators: AND, OR, NOT
iv.Range operators: BETWEEN ... AND …
v.List operators: IN (list)
○Your implementation of evaluate() function in Evaluator class DOES NOT need to cover the following:
i.Any built-in functions, such as UPPER(), GETDATE()
ii.Nullity checks: IS NULL, IS NOT NULL
iii.String operations: first_name || ' ' || last_name
iv.Arithmetic operation: +, -, *, /, %
v.Bitwise Operators: &, |, ^
vi.Pattern matching: LIKE
vii.Any subqueries or nested select statements: WHERE age IN (SELECT age from user_table)
viii.CASE WHEN THEN (ELSE) END
ix.ANY, ALL operators
x.Existence checks: EXISTS
3.Testing and Debugging:
○Take advantage of the 21 test cases provided under `Google_tests/testWhere.cpp` to test your implementation. You can also develop your own test cases.
○There are 27 hidden test cases on Autolab.
Output Examples
●Case 1
○Parsed tree node: WHERE age > 30;
○Values: {age: 31}
○Expected output: true
●Case 2
○Parse tree: WHERE age > 30 AND birth_year BETWEEN 2000 AND 2020;
○Values: {age: 31, birth_year: 1999}
○Expectedutput: false
Submission
In this assignment, you are expected to submit using Autolab. You should submit a "tar", which should contain the evaluator.cpp and evaluator.h.
How to Submit to Autolab:
1.Go to the website https://mvlander.dns.army/courses/18-671/assessments.
2.Use your Andrew email and your name to sign up.
3.Check your email for an activation message and use the access code YATHMX to activate your account.
4.Log in to your Autolab account.
5.Tar your evaluator.cpp and evaluator.h files using the command: tar -cvf
_Assignment3.tar evaluator.cpp evaluator.h.
6.Navigate to the assignment submission page.
7.Click on the "Submit" link for Assignment 3.
8.Choose your tarred file and upload it. And you will see the score and feedback
9.You are allowed only 10 attempts.
Rubric
Your assignment will be graded based on the following criteria:
●Correct implementation of the `evaluate` function;
●Number of Tests passed.
We strongly recommend starting your work locally and submit your Autolab "final version" as early as possible. Don't leave until the last moment to submit your assignment otherwise you may receive a penalty for late submission. This is because building the C++ project on Autolab can be time-consuming, and there is likely to be a high volume of users as the deadline approaches. You can also test your own test cases before attempting the autolab since everyone has only 10 chances.
Good luck and enjoy! 😆
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
cis432代做、代写python/java程...
2024-05-04
eeen3007j代写、c++程序设计代...
2024-05-04
代写data程序、代做c/c++, jav...
2024-05-04
comp2006代做、代写c++程序语言
2024-05-04
comp26020代做、java/c++设计编...
2024-05-04
csci251 advanced programming...
2024-05-03
cs 6290: high-performance co...
2024-05-03
assignment 2: executing and ...
2024-05-03
ecse427/comp310 programmin...
2024-05-03
cs 452 (fall 22): operating...
2024-05-03
comp9414 23t2 assignment 2 ...
2024-05-03
dpst1091 23t1 assignment 2 ...
2024-05-03
program代做、代写python设计编...
2024-05-03
热点标签
finm8007
comp2006
comp26020
comp1721
eeen3007j
cis432
csci251
comp5125m
com398sust
32022
mth6158
comp328
finn41615
2024
mec302
mgmt3004
mgt7158
com160
as.640.440
econ3016
finm7405
econ7021
fin600
infs4205/7205
mktg2510-
f27sb
csse2310/csse7231
rv32i
eecs 113
comp1117b
cs 412
comp 315
econ7300
comp2017
ecs 116
fit5046
com6511
comp30024
acs341
econ1020
isys3014
acc408
comp1047
csc 256
cs 6347
finm7008
comp34212
csmde21
estr2520
comp285/comp220
mds5130/iba6205
finc6010
is3s665
busi2194
125.785
iom209
msin0041
econ339
cmt218
mast10007
comp5349
ecx2953/ecx5953
bios706
comp3310
mth6150
comp30027
comp20005
eec286
busi2211
bff2401
fnce90046
visu2001
mang6554
finc6001
125785
data423-24s1
engi 1331
fint2100
(520|600).666
can202
cs 61b
mast20029
info20003
stat512
econ3208
cmpsc311
engg1340
ecmt1010
fit5216
basc0003
ee3121
acct2002
comp5313
busi2131
ise529
elec372/472
csit940/csit440
cenv6141
comp3027/comp3927
ftec5580
comp1433
msci223
mark203
en3098
eden1000
ece6483
econ4410
mats16302
cs 6476
com6521
comp222
comp3211
comp10002
csc1002
chc6186
cs 161
comp27112
comp282
swen20003
comm1190
elec9764
acfi3308
acct7101
fin6035
comp2048
geog0163
comp2013
coen 146
dts101tc
sehh2042
comp30023
comp4880/8880
cs 455
07
stat0045.
fil-30023
celen085
psyc40005
math40082
are271
comp9311
ee5311
imse2113
comp 2322
acct2102
fnd109
int102
is3s664
is6153
data4000
accfin5034
fit5212
cs536-s24
fit5225
ecos3006
mes202tc
finc5001
stat3061
csc171
cs1b
7ssmm712
bu.450.760
cs170
comp3411
swen90004
cpt206
comp5313/comp4313—large
bl5611
kxo206
comp532
elec207
kxo151
cs 2820
cpt108
math2319
dts204tc
qm222
comp2511
ccs599
infs1001
mat2355
eeee4123
25721
ifn647
pols0010
hpm 573
qbus6860
comp9417
csci 1100
stat0023
cse340
comp2003j
cs 2550
cs360
fin 3080
ierg 4080
cs6238
cit 594
finm7406
hw6
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!