亚洲十八**毛片_亚洲综合影院_五月天精品一区二区三区_久久久噜噜噜久久中文字幕色伊伊 _欧美岛国在线观看_久久国产精品毛片_欧美va在线观看_成人黄网大全在线观看_日韩精品一区二区三区中文_亚洲一二三四区不卡

代做COMP3211、Python/Java程序代寫

時間:2024-04-26  來源:  作者: 我要糾錯



Coursework Specification
Late submissions will be penalised at 10% per working day.
No work can be accepted after feedback has been given.
You should expect to spend up to 37.5 hours on this assignment.
Please note the University regulations regarding academic integrity.
Module: COMP3211 Advanced Databases
Assignment: Database Programming Exercise Weighting: 25 %
Deadline: 16:00 Wed 8 May 2024 Feedback: Fri 17 May 2024
Instructions
In this assignment, you will build a query optimiser for SJDB, a simple RDBMS. Your optimiser should accept a
canonical query plan (a project over a series of selects over a cartesian product over the input named
relations) and aim to construct a left-deep query plan which minimises the sizes of any intermediate relations.
Part 1: Estimator.java
Before implementing an optimiser for query plans, you must first estimate the cost of the query plans.
In the first phase, you must create a class Estimator that implements the PlanVisitor interface and performs
a depth-first traversal of the query plan. On each operator, the Estimator should create an instance of Relation
(bearing appropriate Attribute instances and tuple counts) and attach to the operator as its output.
Some operators may require you to revise the value counts for the attributes on the newly created output
relations (for example, a select of the form attr=val will change the number of distinct values for that
attribute to 1). Note also that an attribute on a relation may not have more distinct values than there are
tuples in the relation.
Page 5 of this coursework specification lists the formulae that you should use to calculate the sizes of the
output relations, and to revise the attribute value counts. The supplied distribution of SJDB includes a
skeleton for Estimator, including an implementation of the visit(Scan) method.
Part 2: Optimiser.java
Once you have an estimator, you must create a class Optimiser that will take a canonical query plan as input,
and produce an optimised query plan as output. The optimised plan should not share any operators with the
canonical query plan; all operators should be created afresh.
In order to demonstrate your optimiser, you should be able to show your cost estimation and query
optimisation classes in action on a variety of inputs. The SJDB zip file contains a sample catalogue and
queries. In addition, the SJDB class (see page 3) contains a main() method with sample code for reading a
serialised catalogue from file and a query from stdin.
Part 3: Report
In addition to your estimator and optimiser, you should produce a short (maximum 500 word) report that
describes the optimisation strategy that you’ve adopted.
Note
You should not need to modify any of the provided classes or interfaces as part of your submission (aside
from Estimator), but if you think that you have a justifiable reason for doing so, please contact Nick for
permission first.
2
Submission
Please submit your files (Estimator.java, Optimiser.java and report.pdf) using the electronic hand-in system
(http://handin.ecs.soton.ac.uk/) by 4pm on the due date.
Late submissions will be penalised at 10% per working day and no work can be accepted after feedback has
been given.
You should expect to spend up to 37.5 hours on this assignment, and you should note the University
regulations regarding academic integrity:
http://www.calendar.soton.ac.uk/sectionIV/academic-integrity-statement.html
Relevant Learning Outcomes
1. The internals of a database management system
2. The issues involved in developing database management software
3. Demonstrate how a DBMS processes, optimises and executes a query
4. Implement components of a DBMS
Marking Scheme
Criterion Description Outcomes Total
Cost Estimator Implementation of the cost estimator 1,2,3,4 40 %
Optimiser Implementation of the query optimiser 1,2,3,4 40 %
Report Description of your query optimisation strategy 1,2,3 20 %
Note that partial credit will be given for incomplete solutions; for example, an optimiser that moves some
(but not all) selections down the query plan will still receive part of the total mark for the optimiser
component.
3
SJDB – A Simple Java Database
SJDB supports a limited subset of the relational algebra, consisting of the following operators only:
• cartesian product
• select with a predicate of the form attr=val or attr=attr
• project
• equijoin with a predicate of the form attr=attr
• scan (an operator that reads a named relation as a source for a query plan)
In addition, all attributes on all relations will be strings; there are no other datatypes available. Attributes also
have globally unique names (there may not be two attributes of the same name on different relations), and
self-joins on relations are not permitted.
The sjdb package contains the following classes and interfaces:
Relation an unnamed relation, contains attributes
NamedRelation a named relation
Attribute an attribute on a relation
Predicate a predicate for use with a join or select operator
Operator abstract superclass for all operators
UnaryOperator abstract superclass for all operators with a single child
Scan an operator that feeds a named relation into a query plan
Select an operator that selects certain tuples in its input, via some predicate
Project an operator that projects certain attributes from its input
BinaryOperator abstract superclass for all operator with two children
Product an operator that performs a cartesian product over its inputs
Join an operator that joins its inputs, via some predicate
Catalogue a directory and factory for named relations and their attributes
CatalogueException a failure to retrieve relations or attributes from the catalogue
CatalogueParser a utility class that reads a serialised catalogue from file
QueryParser a utility class that reads a query and builds a canonical query plan
PlanVisitor an interface that when implemented performs a depth-first plan traversal
Inspector a utility class that traverses an annotated plan and prints out the estimates
SJDB class containing main()
Test an example of the test harnesses used for marking
The SJDB class contains a main() method with skeleton code for reading catalogues and queries.
The system provides basic statistical information about the relations and attributes in the database, as below.
These are stored on the relations and attributes themselves, and not in the catalogue.
• the number of tuples in each relation
• the value count (number of distinct values) for each attribute
A sample serialised catalogue (cat.txt) and queries (q1.txt, etc) are available in sjdb/data.
4
Test Harness Notes
The file Test.java in the SJDB distribution contains an example of the test harness that I will be using to mark
your submissions. This example test harness manually constructs both plans and catalogues as follows:
package sjdb;
import java.io.*;
import java.util.ArrayList;
import sjdb.DatabaseException;
public class Test {
private Catalogue catalogue;
public Test() {
}
public static void main(String[] args) throws Exception {
Catalogue catalogue = createCatalogue();
Inspector inspector = new Inspector();
Estimator estimator = new Estimator();
Operator plan = query(catalogue);
plan.accept(estimator);
plan.accept(inspector);
Optimiser optimiser = new Optimiser(catalogue);
Operator planopt = optimiser.optimise(plan);
planopt.accept(estimator);
planopt.accept(inspector);
}
public static Catalogue createCatalogue() {
Catalogue cat = new Catalogue();
cat.createRelation("A", 100);
cat.createAttribute("A", "a1", 100);
cat.createAttribute("A", "a2", 15);
cat.createRelation("B", 150);
cat.createAttribute("B", "b1", 150);
cat.createAttribute("B", "b2", 100);
cat.createAttribute("B", "b3", 5);
return cat;
}
public static Operator query(Catalogue cat) throws Exception {
Scan a = new Scan(cat.getRelation("A"));
Scan b = new Scan(cat.getRelation("B"));
Product p1 = new Product(a, b);
Select s1 = new Select(p1, new Predicate(new Attribute("a2"), new Attribute("b3")));
ArrayList<Attribute> atts = new ArrayList<Attribute>();
atts.add(new Attribute("a2"));
atts.add(new Attribute("b1"));
Project plan = new Project(s1, atts);
return plan;
}
}
As can be seen in this test harness, I use the Inspector class (provided with the SJDB sources) to print out a
human-readable version of your query plans – your query plans must be able to accept this visitor without
throwing exceptions. Your estimator and optimiser need not (and should not) produce any data on stdout
(you should use the Inspector for this when testing).
Note also that you should manually construct plans that contain joins in order to test your Estimators.
Estimators and Optimisers that do not run without errors will be marked by inspection only, and will
consequently receive a reduced mark.
5
Cost Estimation
As described in lectures, the following parameters are used to estimate the size of intermediate relations:
• T(R), the number of tuples of relation R
• V(R,A), the value count for attribute A of relation R (the number of distinct values of A)
Note that, for any relation R, V(R, A) ≤ T(R) for all attributes A on R.
Scan
T(R) (the same number of tuples as in the NamedRelation being scanned)
Product
T(R × S) = T(R)T(S)
Projection
T(πA(R)) = T(R) (assume that projection does not eliminate duplicate tuples)
Selection
For predicates of the form attr=val:
T(σA=c(R)) = T(R)/V(R,A), V(σA=c(R),A) = 1
For predicates of the form attr=attr:
T(σA=B(R)) = T(R)/max(V(R,A),V(R,B)), V(σA=B(R),A) = V(σA=B(R),B) = min(V(R,A), V(R,B)
Join
T(R⨝A=BS) = T(R)T(S)/max(V(R,A),V(S,B)), V(R⨝A=BS,A) = V(R⨝A=BS,B) = min(V(R,A), V(S,B))
(assume that A is an attribute of R and B is an attribute of S)
Note that, for an attribute C of R that is not a join attribute, V(R⨝A=BS,C) = V(R,C)
(similarly for an attribute of S that is not a join attribute)
Further Reading
For further information on cost estimation, see §16.4 of Database Systems: The Complete Book

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp
















 

標簽:

掃一掃在手機打開當前頁
  • 上一篇:CS 161代做、Java/Python程序代寫
  • 下一篇:CAN202代寫、代做MATLAB編程設計
  • 無相關信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區(qū)
    昆明西山國家級風景名勝區(qū)
    昆明旅游索道攻略
    昆明旅游索道攻略
  • 短信驗證碼平臺 理財 WPS下載

    關于我們 | 打賞支持 | 廣告服務 | 聯(lián)系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    欧美6一10sex性hd| 欧美影院午夜播放| av在线电影网| 国语精品一区| 自拍偷拍亚洲激情| 在线日韩影院| 精品日韩av一区二区| 麻豆九一精品爱看视频在线观看免费| 精品欧美一区二区在线观看| 国产精品啊啊啊| 日本一区视频| 日韩欧美一中文字暮专区| 91在线一区二区三区| 九九精品调教| 日韩理论片网站| 国产寡妇亲子伦一区二区| 欧美一区二区麻豆红桃视频| 91啦中文在线| 欧美日本在线播放| 成人精品亚洲人成在线| 日本一区二区三区电影免费观看| 色八戒一区二区三区| 欧美日韩国产小视频在线观看| 国产精品一区二区99| 中国一级特黄毛片大片| 久久99精品久久久久久动态图| 午夜精品偷拍| 日日躁夜夜躁人人揉av五月天| 91麻豆视频网站| 日韩aaaa| ga∨成人网| 国产精品影视在线| 网站一区二区| 亚洲黄色小说网站| 日本在线中文字幕一区二区三区| 欧美日韩一区在线| 成人性色生活片| 精品国产91久久久久久浪潮蜜月| 成人黄色免费网站| 国产高潮在线| 黄色av网站在线看| 日韩欧美一区二区在线| 国产免费播放一区二区| 欧美日韩大陆一区二区| 美日韩一区二区| www.久久.com| 日韩精品一区二区在线观看| 99精品国产福利在线观看免费| 精品国产乱码91久久久久久网站| 久久久蜜桃一区二区人| 亚洲精品观看| 欧美6一10sex性hd| 日本乱码高清不卡字幕| 奇米影视一区二区三区小说| 宅男噜噜噜66国产精品免费| 一区二区三区美女视频| 国产欧美日韩精品高清二区综合区| 手机av免费在线| 一级毛片免费视频| 91在线精品| 欧美视频在线观看一区二区| 在线看日本不卡| 午夜激情综合网| 99在线视频精品| 婷婷精品视频| 国产成人l区| 久久婷婷蜜乳一本欲蜜臀| 国产精品视频二区三区| 日韩一区二区三区观看| 国产精品久久久久久久| 免费av片在线观看一道本| 国产欧美一区二区精品性| 欧美电影网址| 婷婷成人av| 欧美黑人疯狂性受xxxxx野外| 国产视频一二区| 欧美在线短视频| 综合婷婷亚洲小说| 成人av网址在线| 欧美另类老肥妇| 精品伦理精品一区| 色94色欧美sute亚洲线路一ni | 成人xxx免费视频播放| 欧美日韩视频在线第一区| 成人福利视频在| 日本在线免费观看视频| 日韩欧美黄色影院| 亚洲欧美日韩在线| 蜜桃av一区二区| 欧美精品一区二区三区精品| 欧美va视频| 蜜桃视频在线观看免费视频| 污视频网站在线| 最新在线观看av| 亚洲天堂a在线| 亚洲激情中文| 亚洲精品视频在线看| 亚洲国产一区二区精品专区| 日本在线中文电影| 亚洲制服欧美中文字幕中文字幕| 国产精品网站在线观看| 久久网站热最新地址| 久久亚洲春色中文字幕久久久| 欧美日本不卡高清| 欧美精品午夜| 国产在视频线精品视频www666| 青青青爽久久午夜综合久久午夜| 国产精品狼人久久影院观看方式| 午夜久久美女| 国产精品1区2区3区在线观看| 日本一区二区高清| 欧美又粗又大又爽| 午夜cr在线观看高清在线视频完整版| 伊人影院在线播放| 丝袜视频国产在线播放| 牛牛精品在线视频| 中文在线二区| 最全影音av资源中文字幕在线| 国产三级视频| 国产最新精品精品你懂的| 亚洲午夜伦理| 日本在线视频一区二区| 五丁香在线视频| 在线免费观看的av网站| 黄色av电影在线观看| 小明成人免费视频一区| 中文有码一区| 九九久久电影| 午夜在线a亚洲v天堂网2018| 韩国v欧美v日本v亚洲v| 综合中文字幕| 国产精品久久天天影视| 伊人久久大香线蕉综合热线 | 一区二区在线观看免费视频播放| 精品国产一区二区精华| 日本在线中文字幕一区二区三区| 日韩精品水蜜桃| 中文字幕欧美激情| 精品久久久久久久久国产字幕| 91久久精品一区二区| 16—17女人毛片毛片| 日韩欧美黄色影院| 久久精品a一级国产免视看成人| 国产剧情av在线播放| 福利欧美精品在线| siro系绝美精品系列| 欧美在线观看视频一区二区三区| 日韩欧美在线观看一区二区三区| 欧美著名女优| 欧产日产国产精品视频| 四虎成人精品永久免费av九九| 国产日韩在线不卡| 欧美怡红院视频| 国产国产国产国产国产国产| 91麻豆免费在线视频| 欧美一级片在线看| 97国产一区二区| 国产精品丝袜91| heyzo在线观看| wwww亚洲| 亚洲图片123| 狠狠综合久久av一区二区蜜桃| 成人欧美一区二区三区白人 | 91精品国产91久久久久久密臀| 国产一区亚洲| 欧洲精品在线观看| 欧美xxxx免费虐| 亚洲日本va| 蜜臀av国产精品久久久久| 成人午夜碰碰视频| 在线观看一区日韩| 国产ktv在线视频| 国产精品99在线观看| 亚洲色图制服诱惑| 都市激情一区| av免费在线一区| 加勒比中文字幕精品| 日韩综合在线视频| 中文字幕一区不卡| 中文在线字幕免费观看| 首页国产欧美久久| 欧美日韩精品专区| 亚洲精品承认| 91精品精品| 国产视频一区在线播放| 免费观看黄色网| 欧美v亚洲v| 免费一级欧美在线观看视频| 天使萌一区二区三区免费观看| 亚洲综合一区二区三区| 瑟瑟视频在线| 日韩av高清在线观看| 亚洲男人天堂| 国产91丝袜在线观看| 在线观看免费毛片| 国产精品99精品久久免费| 黄色av电影在线观看| av电影天堂一区二区在线观看| av中文字幕在线不卡| jizz视频在线观看|