狠狠综合久久久久综合网址-a毛片网站-欧美啊v在线观看-中文字幕久久熟女人妻av免费-无码av一区二区三区不卡-亚洲综合av色婷婷五月蜜臀-夜夜操天天摸-a级在线免费观看-三上悠亚91-国产丰满乱子伦无码专区-视频一区中文字幕-黑人大战欲求不满人妻-精品亚洲国产成人蜜臀av-男人你懂得-97超碰人人爽-五月丁香六月综合缴情在线

代做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)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區
    昆明西山國家級風景名勝區
    昆明旅游索道攻略
    昆明旅游索道攻略
  • NBA直播 短信驗證碼平臺 幣安官網下載 歐冠直播 WPS下載

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

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

    狠狠综合久久久久综合网址-a毛片网站-欧美啊v在线观看-中文字幕久久熟女人妻av免费-无码av一区二区三区不卡-亚洲综合av色婷婷五月蜜臀-夜夜操天天摸-a级在线免费观看-三上悠亚91-国产丰满乱子伦无码专区-视频一区中文字幕-黑人大战欲求不满人妻-精品亚洲国产成人蜜臀av-男人你懂得-97超碰人人爽-五月丁香六月综合缴情在线
  • <dl id="akume"></dl>
  • <noscript id="akume"><object id="akume"></object></noscript>
  • <nav id="akume"><dl id="akume"></dl></nav>
  • <rt id="akume"></rt>
    <dl id="akume"><acronym id="akume"></acronym></dl><dl id="akume"><xmp id="akume"></xmp></dl>
    亚洲xxxx2d动漫1| 成人性做爰aaa片免费看不忠| 国产内射老熟女aaaa| 最新中文字幕久久| 国内少妇毛片视频| 日本免费a视频| wwwxxx黄色片| 精品亚洲视频在线| 国产乱淫av片杨贵妃| 免费一级特黄毛片| 成人黄色一区二区| 激情图片中文字幕| 国产freexxxx性播放麻豆| 日韩av三级在线| 亚洲第一中文av| 黑人巨茎大战欧美白妇| 亚洲色成人一区二区三区小说| 爆乳熟妇一区二区三区霸乳| 天堂中文av在线| 国产精品12345| 亚洲欧美日韩一级| 六月婷婷激情综合| 亚洲精品午夜在线观看| 免费高清一区二区三区| 999精品视频在线| 免费的av在线| 五月天婷婷亚洲| 久久亚洲精品无码va白人极品| 亚洲不卡视频在线| 99久久免费观看| 午夜啪啪小视频| 国产美女三级视频| 日韩精品一区二区三区电影| 欧美精品一区二区三区免费播放| 色天使在线观看| 少妇人妻大乳在线视频| 亚洲一区二区福利视频| 欧美日韩成人免费视频| 中国一级大黄大黄大色毛片| 手机看片福利日韩| 精品欧美一区免费观看α√| 日韩视频在线免费播放| jizz欧美性11| 国产超级av在线| 久久99久久久久久| 成人性做爰片免费视频| 国内自拍视频网| 黄色av网址在线播放| 精品国产无码在线| 伊人色在线观看| 奇米精品一区二区三区| 亚洲激情免费视频| 国产精品自在自线| 男女无套免费视频网站动漫| 一女被多男玩喷潮视频| 69精品丰满人妻无码视频a片| 波多野结衣xxxx| 国产又大又黄又粗的视频| 国产成人无码一二三区视频| 欧美高清中文字幕| a级片一区二区| 韩国无码av片在线观看网站| 91视频福利网| 特级毛片在线免费观看| 国产精品视频中文字幕| 久久久久久久久久久久久久国产| 少妇av一区二区三区无码| 日本成人在线不卡| 中文字幕在线中文| 亚洲色成人www永久在线观看| 免费的av在线| 久艹在线免费观看| 午夜免费福利小电影| heyzo亚洲| 免费高清在线观看免费| 欧美黄色一级片视频| 九九九在线观看视频| 亚洲欧美日韩综合网| 中文字幕 日韩 欧美| 亚洲一二三不卡| 亚洲AV无码成人精品一区| 9色视频在线观看| 国产欧美日韩网站| 99福利在线观看| wwwwwxxxx日本| 超碰97免费观看| www.男人天堂网| 日韩欧美国产综合在线| 久久黄色片视频| 97公开免费视频| 五月六月丁香婷婷| 日本丰满大乳奶| 国产精品一区二区免费在线观看| 亚洲国产精品久久久久爰色欲| 国产主播中文字幕| 五月天男人天堂| 777精品久无码人妻蜜桃| 国产免费视频传媒| 免费看av软件| 99精品人妻少妇一区二区| 久久久国产欧美| 波多野结衣 作品| 欧美亚洲国产成人| 天堂中文av在线| 丁香六月激情婷婷| 亚洲国产精品三区| 免费看黄色a级片| 国产免费人做人爱午夜视频| 国产性生活一级片| 日韩中文字幕在线视频观看| 最新av免费在线观看| 欧美久久久久久久久久久久久久| 国产中文字幕免费观看| 中文 日韩 欧美| 污污污污污污www网站免费| 国产成人亚洲精品无码h在线| 中文字幕1234区| 久久久999视频| 精品一区二区三区毛片| 成人黄色一区二区| 久久精品无码中文字幕| 亚洲欧美日本一区二区| 日日碰狠狠添天天爽超碰97| 99九九99九九九99九他书对| 欧美精品自拍视频| 免费看啪啪网站| 国产精彩免费视频| 成人免费观看在线| 在线无限看免费粉色视频| 国产成人综合一区| 青青草视频在线免费播放| 在线观看日本www| 麻豆av免费在线| 日韩av三级在线| 国产爆乳无码一区二区麻豆| 激情五月俺来也| 国产一级不卡毛片| 无码人妻精品一区二区三区在线| 老汉色影院首页| xxx中文字幕| 欧美国产日韩另类| 国产3p在线播放| 一本色道久久亚洲综合精品蜜桃| 免费无码av片在线观看| 久久这里只有精品18| 狠狠精品干练久久久无码中文字幕| 国产91色在线观看| 搡女人真爽免费午夜网站| av天堂永久资源网| 亚洲国产精品久久久久婷蜜芽| 久久综合久久久久| 黄色激情在线视频| 99在线免费视频观看| a天堂资源在线观看| 国产传媒久久久| 男女啪啪免费观看| 欧美国产综合在线| 日韩a级在线观看| 日韩精品视频在线观看视频| 日本大片免费看| 欧美成人高潮一二区在线看| 成人在线观看你懂的| 阿v天堂2017| 国产v亚洲v天堂无码久久久| 欧美黄色一级片视频| 色多多视频在线播放| 一区二区在线播放视频| 天天干天天爽天天射| 午夜精品中文字幕| 中国一级黄色录像| 日韩精品视频在线观看视频| 拔插拔插海外华人免费| 1024av视频| 日韩视频在线免费看| 少妇网站在线观看| 亚洲成年人专区| 很污的网站在线观看| 妞干网在线免费视频| 激情黄色小视频| 四虎精品欧美一区二区免费| 人妻少妇精品无码专区二区| 大香煮伊手机一区| 一级 黄 色 片一| 欧美日韩dvd| 欧美韩国日本在线| 婷婷激情综合五月天| 久久久久久久久久伊人| 亚洲国产精品久久久久爰色欲| 97公开免费视频| 国产树林野战在线播放| 激情综合在线观看| 国产一级免费大片| 九九爱精品视频| 视色视频在线观看| 久久久久久www| wwwwwxxxx日本| 国产v片免费观看| 亚洲制服中文字幕| aa在线免费观看| 激情成人在线观看|