精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕

代做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  郵箱:[email protected]   WX:codinghelp
















 

標簽:

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

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

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

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

    精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕
    <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
    <ul id="e4iaa"></ul>
    <blockquote id="e4iaa"><tfoot id="e4iaa"></tfoot></blockquote>
    • <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
      <ul id="e4iaa"></ul>
      <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp><ul id="e4iaa"></ul>
      <ul id="e4iaa"></ul>
      <th id="e4iaa"><menu id="e4iaa"></menu></th>
      久久中文娱乐网| 欧美一区二区三区在线电影 | 色婷婷狠狠综合| 国产日韩影视精品| 国产资源在线一区| 精品国产露脸精彩对白| 久久精品国产99久久6| 欧美美女黄视频| 日韩主播视频在线| 欧美私模裸体表演在线观看| 亚洲自拍另类综合| 91久久人澡人人添人人爽欧美| 亚洲欧美欧美一区二区三区| 91成人看片片| 青青草国产精品97视觉盛宴| 精品福利av导航| 不卡的av中国片| 亚洲一级在线观看| 欧美电影免费观看高清完整版在线| 久久国产成人午夜av影院| 日韩一级欧美一级| 国产成人综合在线观看| 伊人夜夜躁av伊人久久| 91精品国产乱码| 成人综合婷婷国产精品久久 | 亚洲国产裸拍裸体视频在线观看乱了 | 极品少妇一区二区三区精品视频| 欧美老肥妇做.爰bbww视频| 亚洲国产精品视频| 日韩一区二区在线观看视频 | 日韩一区二区高清| 久久精品99久久久| 久久夜色精品国产噜噜av| 亚洲丝袜精品丝袜在线| 另类成人小视频在线| 在线观看三级视频欧美| 亚洲国产精品黑人久久久| 亚洲欧洲日韩在线| 天堂成人国产精品一区| 欧美成人一区二区三区片免费| 偷窥少妇高潮呻吟av久久免费| 成人在线一区二区三区| 一区二区三区在线视频观看58| 欧美日韩一区成人| 韩国精品主播一区二区在线观看 | 国产九色精品成人porny | 日韩免费观看高清完整版| 国内成人免费视频| 中文字幕av一区二区三区高 | 亚洲一区二区视频| 欧美大片在线观看一区二区| 国产suv精品一区二区三区| 亚洲精品乱码久久久久| 日韩精品一区二区三区中文不卡| 国产91富婆露脸刺激对白| 亚洲视频一区二区在线观看| 欧美日韩高清影院| 国产一区二区三区观看| 亚洲一区二区三区国产| 久久这里只有精品首页| 91在线视频免费91| 久久99久久精品欧美| 亚洲天堂2014| 国产丝袜在线精品| 日韩女同互慰一区二区| 在线观看国产精品网站| 国产成人免费视频| 韩国在线一区二区| 日韩精品国产欧美| 一区二区三区在线免费| 欧美国产欧美亚州国产日韩mv天天看完整 | 欧美亚洲高清一区| 福利一区在线观看| 奇米精品一区二区三区在线观看| 亚洲激情第一区| 国产精品国产a级| 中文字幕精品—区二区四季| 日韩视频免费观看高清在线视频| 欧美专区亚洲专区| 成人三级伦理片| 国产精品99久久久久久久vr | 欧美不卡激情三级在线观看| 欧美性猛交xxxx乱大交退制版| 波多野结衣的一区二区三区| 国产在线国偷精品产拍免费yy| 日韩中文字幕av电影| 亚洲一区二区在线观看视频| 亚洲欧美日韩在线不卡| 亚洲欧洲国产专区| 中文字幕一区二区三区四区| 国产精品色哟哟| 中文字幕一区二区三区色视频| 亚洲精品中文在线观看| 国产亚洲一区二区在线观看| 日本一区二区三区在线不卡| 国产日韩欧美电影| 国产欧美1区2区3区| 日本一区二区免费在线| 国产精品午夜在线| 成人欧美一区二区三区| 一区二区三区资源| 午夜精品久久久久影视| 日韩黄色免费网站| 精品亚洲成a人| 国产成人午夜精品影院观看视频 | 欧美体内she精高潮| 欧美无乱码久久久免费午夜一区| 在线观看亚洲精品| 91精品视频网| 日本一区二区视频在线| 中文字幕日韩一区二区| 悠悠色在线精品| 日本不卡中文字幕| 国产精品一区免费视频| 成人精品免费网站| 精品一区二区三区日韩| 99视频在线观看一区三区| 欧美人妇做爰xxxⅹ性高电影| 精品成人在线观看| 亚洲人成在线观看一区二区| 首页欧美精品中文字幕| 国产精品77777竹菊影视小说| 色婷婷精品大视频在线蜜桃视频| 91麻豆精品国产91久久久久久| 国产偷国产偷亚洲高清人白洁| 日韩美女视频一区二区| 日韩成人精品在线| 国产大陆精品国产| 欧美亚洲一区二区三区四区| 亚洲精品一区二区三区精华液| 亚洲视频一二区| 美女被吸乳得到大胸91| 91在线一区二区| 久久久久久9999| 日日夜夜精品视频天天综合网| 成人国产精品免费| 精品少妇一区二区三区视频免付费| 中文字幕亚洲区| 蜜桃av一区二区三区电影| av网站免费线看精品| 日韩一区二区三区四区五区六区| 一区视频在线播放| 国产一区二区调教| 欧美日韩国产高清一区二区三区| 久久精品一区二区三区四区| 日韩 欧美一区二区三区| 欧美性受xxxx黑人xyx性爽| 国产精品区一区二区三| 国产一区二区三区美女| 91精品一区二区三区在线观看| 亚洲另类在线制服丝袜| 成人h动漫精品一区二区| 久久午夜电影网| 免费看日韩a级影片| 欧美日产国产精品| 亚洲一二三四区| 91农村精品一区二区在线| 亚洲国产激情av| 亚洲一区二区综合| 久久精品人人做人人爽人人| 麻豆精品在线观看| aaa亚洲精品| 久久久久久影视| 日本中文字幕一区二区视频| 在线视频你懂得一区二区三区| 亚洲免费观看高清完整版在线观看熊 | 久久国产精品露脸对白| 91精品国产品国语在线不卡| 香蕉加勒比综合久久| 欧美日韩一级片网站| 亚洲一区二区成人在线观看| 欧美性一二三区| 日韩福利视频导航| 日韩精品综合一本久道在线视频| 美国一区二区三区在线播放| 精品国产亚洲在线| 精品一区二区国语对白| 久久新电视剧免费观看| 国产成人精品影院| 综合网在线视频| 国产美女av一区二区三区| 久久综合国产精品| 成人激情动漫在线观看| 亚洲一区二区精品久久av| 欧美一区二区三区色| 狠狠色丁香婷综合久久| 国产精品国产三级国产普通话蜜臀| 99久久伊人网影院| 一区二区三区精品在线| 欧美一区二区性放荡片| 国产.精品.日韩.另类.中文.在线.播放| 欧美喷潮久久久xxxxx| 亚洲一区二区偷拍精品| 一本色道**综合亚洲精品蜜桃冫| 久久综合久久99| 色综合久久中文综合久久牛| 日日夜夜精品视频免费 | 国产精品色婷婷久久58| 成人毛片在线观看| 丝袜美腿亚洲综合|