代写Executor、代做Executor设计程序
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<std::string, std::string> &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 <YourAndrewID>_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!
- 碧桂园服务物业管家帮助业主找到失而复得的贵重资料
- Instagram群发营销工具,Ins引流工具,带你实现营销快速增长!
- Telegram营销软件引流群发利器,教你自动引流吸粉
- 代写program、MATLAB设计程序代做
- 代做Godunov-Type Scheme
- 海外销售专家提问 WhatsApp拉群营销工具真的是业务成功的黄金钥匙吗
- TG群发营销利器,Telegram自动拉群发助手/纸飞机协议号购买
- 数字征途 专家指南 WhatsApp拉群营销在海外业务中的辉煌征程
- Instagram营销软件 - ins采集软件/ig采集助手/ins群发助手
- 创新引爆业绩 WhatsApp拉群营销工具为您的业务开创新的成功篇章
- Telegram群组活跃软件,TG自动化炒群工具,电报脚本炒群神器
- 跨境电商群发拉群智能数据解读:WhatsApp代筛料子引领您的数据分析之旅
- CHC4008代做、代写Python设计编程
- Ins群发消息工具,Instagram模拟器群发软件,助你实现营销梦想!
- WhatsApp协议号注册器,智能推广工具,带您走向网络通信的新高度
- Instagram群发筛选软件,Ins群发注册工具,助你轻松推广!
- InBody体成分系列产品荣获欧盟CE-MDR认证 加速全球布局步伐
- 业界智者首选WhatsApp工具成功博主亲自示范如何揭示市场趋势事业稳步上升
- 海外营销:"WhatsApp筛选器" 最好选择
- 老人突发急病双眼流脓失明,爱尔英智眼科梁军院长全力救治保眼球
- 我与WhatsApp拉群工具的故事:从迷茫到坚定,从平凡到不平凡的蜕变之路
- 代写CSci 4061 MultiThreaded Image
- 群思亮相2024 CHINC,分享智慧医疗新发展与实践应用!
- CS 2550代做、代写SQL设计编程
- 告别无聊的推广方法 用这个WhatsApp拉群营销工具 让你的品牌故事成为引人注目的焦点
- WhatsApp拉群的秘籍/ws协议号/ws群发/ws拉群
- 虚拟奇兵 科技魔法师如何借助WhatsApp拉群营销工具打破常规的数字奇迹
- 魔方网表,私有部署的excel共享方案
- 佛山市政数局与新点软件签署联合创新开发协议
- 宁夏构建西部医疗健康行业大模型生态,引领医疗创新与数字化转型
推荐
- 老杨第一次再度抓握住一瓶水,他由此产生了新的憧憬 瘫痪十四年后,老杨第一次再度抓握住一瓶水,他 科技
- 苹果罕见大降价,华为的压力给到了? 1、苹果官网罕见大降价冲上热搜。原因是苹 科技
- 全力打造中国“创业之都”名片,第十届中国创业者大会将在郑州召开 北京创业科创科技中心主办的第十届中国创业 科技
- 创意驱动增长,Adobe护城河够深吗? Adobe通过其Creative Cloud订阅捆绑包具有 科技
- 丰田章男称未来依然需要内燃机 已经启动电动机新项目 尽管电动车在全球范围内持续崛起,但丰田章男 科技
- 智慧驱动 共创未来| 东芝硬盘创新数据存储技术 为期三天的第五届中国(昆明)南亚社会公共安 科技
- 升级的脉脉,正在以招聘业务铺开商业化版图 长久以来,求职信息流不对称、单向的信息传递 科技
- 疫情期间 这个品牌实现了疯狂扩张 记得第一次喝瑞幸,还是2017年底去北京出差的 科技
- B站更新决策机构名单:共有 29 名掌权管理者,包括陈睿、徐逸、李旎、樊欣等人 1 月 15 日消息,据界面新闻,B站上周发布内部 科技
- 如何经营一家好企业,需要具备什么要素特点 我们大多数人刚开始创办一家企业都遇到经营 科技