美女扒开腿免费视频_蜜桃传媒一区二区亚洲av_先锋影音av在线_少妇一级淫片免费放播放_日本泡妞xxxx免费视频软件_一色道久久88加勒比一_熟女少妇一区二区三区_老司机免费视频_潘金莲一级黄色片_精品国产精品国产精品_黑人巨大猛交丰满少妇

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

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

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

    美女扒开腿免费视频_蜜桃传媒一区二区亚洲av_先锋影音av在线_少妇一级淫片免费放播放_日本泡妞xxxx免费视频软件_一色道久久88加勒比一_熟女少妇一区二区三区_老司机免费视频_潘金莲一级黄色片_精品国产精品国产精品_黑人巨大猛交丰满少妇
    四虎成人免费视频| 亚洲女优在线观看| theav精尽人亡av| 美国美女黄色片| 特级特黄刘亦菲aaa级| 日韩人妻无码一区二区三区| 青青草精品在线| 日本黄色特级片| 久久精品无码一区二区三区毛片 | 野外性满足hd| 黄色网址在线视频| 91视频在线网站| 久久久久无码精品| 亚洲一区 欧美| wwwxx日本| 一起草最新网址| 亚洲av无码一区二区三区在线| 亚洲欧美视频在线播放| 男男受被啪到高潮自述| 一区二区三区伦理片| 手机免费看av片| 免费黄视频在线观看| 日韩精品人妻中文字幕有码| 日韩欧美国产成人精品免费| 激情小说欧美色图| 成年人一级黄色片| 日韩黄色免费观看| 亚洲AV无码久久精品国产一区| 婷婷久久综合网| 一区视频免费观看| 少妇欧美激情一区二区三区| 黄色一级片中国| 少妇极品熟妇人妻无码| 美国黄色一级视频| 97香蕉碰碰人妻国产欧美| 一级特级黄色片| 国产jk精品白丝av在线观看| 欧美福利第一页| www亚洲色图| 97在线观看免费高| 男人女人拔萝卜视频| 日本不卡视频一区| 成人午夜剧场视频网站| 91社区视频在线观看| 99久久99久久精品免费看小说.| 在线免费看视频| 东方av正在进入| 国产88在线观看入口| 国产精品亚洲无码| 可以直接看的黄色网址| 免费在线观看一级片| 网站免费在线观看| 国产熟女高潮一区二区三区| 99久久99久久精品免费看小说. | 操她视频在线观看| 四虎永久免费地址| 美女黄色一级视频| 中文字幕乱码av| 美女伦理水蜜桃4| 亚洲女同二女同志奶水| 一级国产黄色片| 波多野结衣a v在线| 99riav国产精品视频| 精品少妇一区二区三区免费观| 国产一级淫片久久久片a级| 亚洲最大视频网| www.av免费| 国产国语性生话播放| wwwwww日本| 在线观看xxx| 人人澡人人澡人人看| 久久久久无码国产精品一区李宗瑞| 国产免费看av| 天天躁日日躁狠狠躁免费麻豆| 亚洲а∨天堂久久精品2021| 免费看污黄网站在线观看| 欧美一级大片免费看| 91杏吧porn蝌蚪| 欧美成人另类视频| 一区二区三区久久久久| 亚洲欧美高清在线| 久久久久亚洲av无码网站| www.99re7| 亚洲天堂视频一区| 亚洲视频天天射| 日本天堂中文字幕| 欧美黑人猛猛猛| 黄色a级片在线观看| 99成人在线观看| 亚洲国产精品一区二区久久hs| 一级片视频免费看| 91精品人妻一区二区三区蜜桃欧美| 亚洲av永久无码精品| www.男人天堂| 91丝袜在线观看| 在线观看国产网站| 欧美亚一区二区三区| 魔女鞋交玉足榨精调教| 日本成人免费视频| 国产性猛交xx乱| 青青青手机在线视频| 天堂а√在线中文在线鲁大师| 免费成人美女女在线观看| 三级黄色在线观看| 麻豆精品国产传媒| 黄色在线观看av| x88av在线| 免费人成视频在线播放| 在线观看亚洲免费视频| 永久免费未视频| 成年人二级毛片| 天天躁日日躁狠狠躁av麻豆男男| 精品人妻一区二区免费| 精品成人av一区二区三区| 成人18视频免费69| 无码国产69精品久久久久网站| 国产成人精品无码免费看夜聊软件| 亚洲精品成人无码| 免费看裸体网站| 老熟妇高潮一区二区三区| 国产精九九网站漫画| 国产成人无码精品久久二区三| 国模大尺度视频| 午夜黄色福利视频| www.美色吧.com| 粉嫩精品久久99综合一区| 亚洲少妇一区二区| 男女全黄做爰文章| 性欧美13一14内谢| 美女被艹视频网站| 波多野吉衣中文字幕| 亚洲精品乱码久久久久久9色| 国产综合精品在线| 亚洲AV无码国产精品| 小日子的在线观看免费第8集| 亚洲久久久久久久| 国产女人18毛片水真多18| 91免费公开视频| 特黄一区二区三区| 制服 丝袜 综合 日韩 欧美| 性折磨bdsm欧美激情另类| 极品色av影院| 黄色工厂在线观看| 国产伦精品一区二区三区88av| 91视频青青草| 久久精品在线观看视频| 中文天堂资源在线| 白白色免费视频| 97超碰在线免费观看| 老鸭窝一区二区| 欧美大喷水吹潮合集在线观看| 国产大学生自拍| 69av.com| av漫画在线观看| 俄罗斯黄色录像| 一级黄色片毛片| 亚洲欧美视频在线播放| 给我看免费高清在线观看| 欧美bbbbb性bbbbb视频| 蜜桃精品一区二区| 黄色三级生活片| 国内毛片毛片毛片毛片毛片| 影音先锋男人看片资源| 波多野结衣 在线| 成人精品在线观看视频| 欧美一级大片免费看| 国产一区二区精彩视频| 国模大尺度视频| 中文字幕影片免费在线观看| 国产精品815.cc红桃| 我想看黄色大片| caoporn91| 懂色av粉嫩av蜜乳av| 亚洲精品91在线| 国产又粗又硬又长又爽| caopor在线| 亚洲精品成人无码| 成人无码精品1区2区3区免费看 | 国产男女无遮挡猛进猛出| 精品少妇一区二区三区密爱| 中国毛片在线观看| a天堂中文字幕| 熟女少妇内射日韩亚洲| 九九热免费在线| 内射毛片内射国产夫妻| 99久久精品久久亚洲精品| 男女男精品视频网站| 国产尤物在线播放| av激情在线观看| 97人妻精品一区二区三区免费| 岛国精品资源网站| 国产福利短视频| 激情高潮到大叫狂喷水| 天天操天天操天天操天天操天天操| 成人免费视频入口| 久久久久亚洲av无码麻豆| 国产免费a级片| 短视频在线观看| 男人av资源站| 极品白嫩的小少妇|