首页
网站开发
桌面应用
管理软件
微信开发
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
热点项目
更多
代做 program、代写 c++设计程...
2024-12-23
comp2012j 代写、代做 java 设...
2024-12-23
代做 data 编程、代写 python/...
2024-12-23
代做en.553.413-613 applied s...
2024-12-23
代做steady-state analvsis代做...
2024-12-23
代写photo essay of a deciduo...
2024-12-23
代写gpa analyzer调试c/c++语言
2024-12-23
代做comp 330 (fall 2024): as...
2024-12-23
代写pstat 160a fall 2024 - a...
2024-12-23
代做pstat 160a: stochastic p...
2024-12-23
代做7ssgn110 environmental d...
2024-12-23
代做compsci 4039 programming...
2024-12-23
代做lab exercise 8: dictiona...
2024-12-23
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!