99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代寫COMP9315、代做SQL編程語言

時間:2024-03-14  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



 COMP9315 24T1 - Assignment 1
1/9
Deadline
Pre-requisites:
Late Penalty:
Marks:
Submission:
COMP9315 24T1 Assignment 1
Adding a PersonName Data Type to
PostgreSQL
DBMS Implementation
Last updated: Sunday 25th February 9:26pm
Most recent changes are shown in red ... older changes are shown in brown.
Aims
This assignment aims to give you
an understanding of how data is treated inside a DBMS
practice in adding a new base type to PostgreSQL
The goal is to implement a new data type for PostgreSQL, complete with
input/output functions, comparison operators, formatting functions, and the
ability to build indexes on values of the type.
Summary
Friday 15 March, 11:59pm
before starting this assignment, it would be useful to
complete Prac Work P04
0.03 marks off the final mark for each hour late
for the first 5 days late; total mark of zero thereafter
This assignment contributes 15 marks toward your total
mark for this course.
Webcms3 > Assignments > Ass1 Submission > Make
Submission
or, on CSE machines, give cs9315 ass1 pname.c
pname.source
Make sure that you read this assignment specification carefully and completely
before starting work on the assignment.
Questions which indicate that you haven't done this will simply get the
response "Please read the spec".
We use the following names in the discussion below
PG_CODE ... the directory where your PostgreSQL source code is located
(on vxdb, /localstorage/$USER/postgresql-15.6/)
PG_HOME ... the directory where you have installed the PostgreSQL
binaries (on vxdb, /localstorage/$USER/pgsql/bin/)
PG_DATA ... the directory where you have placed PostgreSQL's data (on
vxdb, /localstorage/$USER/pgsql/data/)
 COMP9315 24T1 - Assignment 1
2/9
PG_LOG ... the file where you send PostgreSQL's log output (on vxdb,
/localstorage/$USER/pgsql/data/log)
Introduction
PostgreSQL has an extensibility model which, among other things, provides a
well-defined process for adding new data types into a PostgreSQL server. This
capability has led to the development by PostgreSQL users of a number of
types (such as polygons) which have become part of the standard distribution.
It also means that PostgreSQL is the database of choice in research projects
which aim to push the boundaries of what kind of data a DBMS can manage.
In this assignment, we will be adding a new data type for dealing with people's
names. "Hmmm", you say, "but aren't they just text strings, typically
implemented as two attributes, one for family name and one for given names?".
That may be true, but making names into a separate base data type allows us
to explore how we store and manipulate them.
One common way of writing names (e.g. used in UNSW student systems) is
Shepherd,John Andrew
Swift, Taylor
Martin, Eric Andre
Lakshminarasimhan,Venkateswaran Chandrasekara
Marshall-Martin, Sally Angela
Featherstone,Albert Basil Ernest George Harold Randolph William
i.e.
FamilyName,GivenNames
Note: some of the examples above have a space after the comma; some don't.
We give a more precise description of what text strings are valid PersonNames
below.
Adding Data Types in PostgreSQL
The process for adding new base data types in PostgreSQL is described in the
following sections of the PostgreSQL documentation:
38.13 User-defined Types
38.10 C-Language Functions
38.14 User-defined Operators
SQL: CREATE TYPE
SQL: CREATE OPERATOR
SQL: CREATE OPERATOR CLASS
Section 38.13 uses an example of a complex number type, which you can use
as a starting point for defining your PersonName data type (see below). There
are other examples of new data types under the directories:
PG_CODE/contrib/chkpass/ ... an auto-encrypted password datatype
 COMP9315 24T1 - Assignment 1
3/9
PG_CODE/contrib/citext/ ... a case-insensitive character string
datatype
PG_CODE/contrib/seg/ ... a confidence-interval datatype
These may or may not give you some useful ideas on how to implement the
PersonName data type. For example, many of these data types are fixed-size,
while PersonNames are variable-sized. A potentially useful example of
implementing variable-sized types can be found in:
PG_CODE/src/tutorial/funcs.c ... implementation of several data
types
Setting Up
You ought to start this assignment with a fresh copy of PostgreSQL, without
any changes that you might have made for the Prac exercises (unless these
changes are trivial). Note that you only need to configure, compile and install
your PostgreSQL server once for this assignment. All subsequent compilation
takes place in the src/tutorial directory, and only requires modification of
the files there.
Once you have re-installed your PostgreSQL server, you should run the
following commands:
$ cd PG_CODE/src/tutorial
$ cp complex.c pname.c
$ cp complex.source pname.source
Note the pname.* files will contain many references to complex; I do not want
to see any remaining occurences of the word complex in the files that you
eventually submit. These files simply provide a template in which you create
your PersonName type.
Once you've made the pname.* files, you should also edit the Makefile in this
directory and add the green text to the following lines:
MODULES = complex funcs pname
DATA_built = advanced.sql basics.sql complex.sql funcs.sql syscat.
The rest of the work for this assignment involves editing only the pname.c and
pname.source files. In order for the Makefile to work properly, you must use
the identifier _OBJWD_ in the pname.source file to refer to the directory holding
the compiled library. You should never modify directly the pname.sql file
produced by the Makefile. Place all of your C code in the pname.c file; do not
create any other *.c files.
Note that your submitted versions of pname.c and pname.source should not
contain any references to the complex type. Make sure that the documentation
 COMP9315 24T1 - Assignment 1
4/9
(comments in program) describes the code that you wrote. Leaving the word
complex anywhere in either pname.* file will result in a 1 mark penalty.
The Person Name Data Type
We wish to define a new base type PersonName to represent people's names,
in the format FamilyName,GivenNames. We also aim to define a useful set of
operations on values of type PersonName and wish to be able to create indexes
on attributes of type PersonName. How you represent PersonName values
internally, and how you implement the functions to manipulate them internally,
is up to you. However, they must satisfy the requirements below.
Once implemented correctly, you should be able to use your PostgreSQL
server to build the following kind of SQL applications:
create table Students (
zid integer primary key,
name PersonName not null,
degree text,
-- etc. etc.
);
insert into Students(zid,name,degree) values
(9300035,'Shepherd, John Andrew', 'BSc(Computer Science)'),
(5012345,'Smith, Stephen', 'BE(Hons)(Software Engineering)');
create index on Students using hash (name);
select a.zid, a.name, b.zid
from Students a join Students b on (a.name = b.name);
select family(name), given(name), show(name)
from Students;
select name,count(*)
from Students
group by name;
Having defined a hash-based file structure, we would expect that the queries
would make use of it. You can check this by adding the keyword EXPLAIN
before the query, e.g.
db=# explain analyze select * from Students where name='Smith,John
which should, once you have correctly implemented the data type and loaded
sufficient data, show that an index-based scan of the data is being used. Note
that this will only be evident if you use a large amount of data (e.g. one of the
larger test data samples to be provided).
Person Name values
 COMP9315 24T1 - Assignment 1
5/9
Valid PersonNames will have the above format with the following qualifications:
there may be a single space after the comma
there will be no people with just one name (e.g. no Prince, Jesus,
Aristotle, etc.)
there will be no numbers (e.g. noGates, William 3rd)
there will be no titles (e.g. no Dr, Prof, Mr, Ms)
there will be no initials (e.g. no Shepherd,John A)
In other words, you can ignore the possibility of certain types of names while
implementing your input and output functions.
If titles occur, you can assume that they will occur after a comma after the given
names, e.g. "Smith, John, Dr".
A more precise definition can be given using a BNF grammar:
PersonName ::= Family','Given | Family', 'Given
Family ::= NameList
Given ::= NameList
NameList ::= Name | Name' 'NameList
Name ::= Upper Letters
Letter ::= Upper | Lower | Punc
Letters ::= Letter | Letter Letters
Upper ::= 'A' | 'B' | ... | 'Z'
Lower ::= 'a' | 'b' | ... | 'z'
Punc ::= '-' | "'"
You should not make any assumptions about the maximum length of a
PersonName.
Under this syntax, the following are valid names:
Smith,John
Smith, John
O'Brien, Patrick Sean
Mahagedara Patabendige,Minosha Mitsuaki Senakasiri
I-Sun, Chen Wang
Clifton-Everest,Charles Edward
The following names are not valid in our system:
Jesus # no single-word names
Smith , Harold # space before the ","
Gates, William H., III # no initials, too many commas
A,B C # names must contain at least 2 letters
Smith, john # names begin with an upper-case letter
 COMP9315 24T1 - Assignment 1
6/9
Think about why each of the above is invalid in terms of the syntax definition.
Important: for this assignment, we define an ordering on names as follows:
the ordering is determined initially by the ordering on the Family Name
if the Family Names are equal, then the ordering is determined by the
Given Names
ordering of parts is determined lexically
There are examples of how this works in the section on Operations on
PersonNames below.
Representing Person Names
The first thing you need to do is to decide on an internal representation for your
PersonName data type. You should do this, however, after you have looked at
the description of the operators below, since what they require may affect how
you decide to structure your internal PersonName values.
When you read strings representing PersonName values, they are converted
into your internal form, stored in the database in this form, and operations on
PersonName values are carried out using this data structure. It is useful to
define a canonical form for names, which may be slightly different to the form in
which they are read (e.g. "Smith, John" might be rendered as "Smith,John").
When you display PersonName values, you should show them in canonical
form, regardless of how they were entered or how they are stored.
The first functions you need to write are ones to read and display values of type
PersonName. You should write analogues of the functions complex_in(),
complex_out that are defined in the file complex.c. Call them, e.g.,
pname_in() and pname_out(). Make sure that you use the V1 style function
interface (as is done in complex.c).
Note that the two input/output functions should be complementary, meaning
that any string displayed by the output function must be able to be read using
the input function. There is no requirement for you to retain the precise string
that was used for input (e.g. you could store the PersonName value internally in
a different form such as splitting it into two strings: one for the family name(s),
and one for the given name(s)).
One thing that pname_in() must do is determine whether the name has the
correct structure (according to the grammar above). Your pname_out() should
display each name in a format that can be read by pname_in().
Note that you are not required to define binary input/output functions, called
receive_function and send_function in the PostgreSQL documentation,
and called complex_send and complex_recv in the complex.cfile.
 COMP9315 24T1 - Assignment 1
7/9
As noted above, you cannot assume anything about the maximum length of
names. If your solution uses two fixed-size buffers (one for family, one for
given) then your mark is limited to a maximum of 8/15, even if you pass all of
the tests.
Operations on person names
You must implement all of the following operations for the PersonName type:
PersonName = PersonName ... two names are equal
Two PersonNames are equivalent if, they have the same family name(s)
and the same given name(s).
PersonName : Smith,John
PersonName : Smith, John
PersonName : Smith, John David
PersonName : Smith, James
(PersonName = PersonName ) is true
(PersonName = PersonName ) is true
(PersonName = PersonName ) is true (commutative)
(PersonName = PersonName ) is false
(PersonName = PersonName ) is false
PersonName > PersonName ... the first PersonName is greater than the
second
PersonName is greater than PersonName if the Family part of
PersonName is lexically greater than the Family part of PersonName . If
the Family parts are equal, then PersonName is greater than
PersonName if the Given part of PersonName is lexically greater than
the Given part of PersonName .
PersonName : Smith,James
PersonName : Smith,John
PersonName : Smith,John David
PersonName : Zimmerman, Trent
(PersonName > PersonName ) is false
(PersonName > PersonName ) is false
(PersonName > PersonName ) is true
(PersonName > PersonName ) is false
(PersonName > PersonName ) is true
Other operations: <>, >=, <, <=
You should also implement the above operations, whose semantics is
hopefully obvious from the descriptions above. The operators can typically
be implemented quite simply in terms of the first two operators.
family(PersonName) returns just the Family part of a name
 COMP9315 24T1 - Assignment 1
8/9
PersonName : Smith,James
PersonName : O'Brien,Patrick Sean
PersonName : Mahagedara Patabendige,Minosha Mitsuaki Senakasir
PersonName : Clifton-Everest,David Ewan
family(PersonName ) returns "Smith"
family(PersonName ) returns "O'Brien"
family(PersonName ) returns "Mahagedara Patabendige"
family(PersonName ) returns "Clifton-Everest"
given(PersonName) returns just the Given part of a name
PersonName : Smith,James
PersonName : O'Brien,Patrick Sean
PersonName : Mahagedara Patabendige,Minosha Mitsuaki Senakasir
PersonName : Clifton-Everest,David Ewan
given(PersonName ) returns "James"
given(PersonName ) returns "Patrick Sean"
given(PersonName ) returns "Minosha Mitsuaki Senakasir"
given(PersonName ) returns "David Ewan"
show(PersonName) returns a displayable version of the name
It appends the entire Family name to the first Given name (everything
before the first space, if any), separated by a single space.
PersonName : Smith,James
PersonName : O'Brien,Patrick Sean
PersonName : Mahagedara Patabendige,Minosha Mitsuaki Senakasir
PersonName : Clifton-Everest,David Ewan
PersonName : Bronte,Greta-Anna Maryanne
show(PersonName ) returns "James Smith"
show(PersonName ) returns "Patrick O'Brien"
show(PersonName ) returns "Minosha Mahagedara Patabendige"
show(PersonName ) returns "David Clifton-Everest"
show(PersonName ) returns "Greta-Anna Bronte"
Hint: test out as many of your C functions as you can outside PostgreSQL (e.g.
write a simple test driver) before you try to install them in PostgreSQL. This will
make debugging much easier.
You should ensure that your definitions capture the full semantics of the
operators (e.g. specify commutativity if the operator is commutative). You
should also ensure that you provide sufficient definitions so that users of the
PersonName type can create hash-based indexes on an attribute of type
請加QQ:99515681  郵箱:99515681@qq.com   WX:codehelp 

掃一掃在手機打開當前頁
  • 上一篇:CS 3140代做、代寫java語言編程
  • 下一篇:SEHH2042代做、代寫C++編程設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

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

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                国产精品 欧美精品| 99久久综合99久久综合网站| 丁香婷婷综合网| 26uuu国产日韩综合| 国产99久久久久| 亚洲日本在线视频观看| 欧美亚洲动漫制服丝袜| 蜜臀久久99精品久久久久久9| 日韩精品一区二区三区视频播放| 国产黑丝在线一区二区三区| 一区二区三区日韩欧美| 日韩欧美中文字幕精品| 福利电影一区二区| 国产精品久久久久久久久免费桃花| 丁香天五香天堂综合| 亚洲mv在线观看| 国产欧美日本一区二区三区| 欧美视频一区二| 激情综合色播五月| 亚洲天堂2016| 久久久美女艺术照精彩视频福利播放 | 久久99久久99精品免视看婷婷| 久久久久国产精品厨房| 日本黄色一区二区| 国产一区二区在线观看免费| 亚洲成人激情av| 1000部国产精品成人观看| 精品欧美乱码久久久久久1区2区| 色婷婷国产精品久久包臀| 国产精品资源在线| 日本中文字幕一区二区视频| 日韩毛片在线免费观看| 亚洲国产精品国自产拍av| 精品国产髙清在线看国产毛片| 欧美在线一二三四区| 99精品视频一区| 国产传媒一区在线| 激情综合色播五月| 美国十次综合导航| 日韩高清在线不卡| 五月天一区二区| 图片区小说区区亚洲影院| 亚洲人吸女人奶水| 亚洲精品中文在线影院| 国产精品美女久久久久久2018| 欧美精品一区二区三区在线播放 | 欧美日韩国产高清一区二区三区 | 亚洲一区二区三区自拍| 亚洲手机成人高清视频| 亚洲欧美另类久久久精品| 亚洲欧洲成人精品av97| 综合久久给合久久狠狠狠97色| 国产无人区一区二区三区| 久久综合色一综合色88| 久久日一线二线三线suv| 精品88久久久久88久久久| 久久这里只有精品视频网| 久久综合久久鬼色中文字| 久久久久久久性| 国产精品色呦呦| 国产精品超碰97尤物18| 一区二区三区四区不卡在线| 亚洲午夜在线电影| 蜜桃在线一区二区三区| 国产成人在线免费观看| 99久久99久久精品国产片果冻 | 国产激情精品久久久第一区二区| 国产精品一区在线| 菠萝蜜视频在线观看一区| 久久精品国产亚洲一区二区三区| 裸体在线国模精品偷拍| 精品一区二区三区免费毛片爱| 国产成人免费视频网站高清观看视频| 国产盗摄一区二区| 一本久久精品一区二区| 日韩欧美国产高清| 亚洲欧洲三级电影| 日本成人中文字幕在线视频| 精品中文字幕一区二区小辣椒| 国产成人精品亚洲777人妖 | 色久综合一二码| 欧美日韩亚洲综合| 久久精品在线免费观看| 一级女性全黄久久生活片免费| 麻豆国产精品777777在线| 91在线观看高清| 精品国产乱码久久久久久浪潮| 最新国产成人在线观看| 奇米一区二区三区av| 成人亚洲一区二区一| 欧美人动与zoxxxx乱| 国产拍欧美日韩视频二区| 亚洲一区二区综合| 成人午夜视频免费看| 欧美日本乱大交xxxxx| 国产精品女同一区二区三区| 日韩黄色小视频| 色综合中文字幕| 久久麻豆一区二区| 日韩精品1区2区3区| 色综合久久久久综合体桃花网| 久久精品欧美日韩| 免费不卡在线观看| 欧美日韩精品系列| 亚洲免费高清视频在线| 国产高清在线精品| 精品国产乱码久久久久久1区2区 | 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 中文字幕+乱码+中文字幕一区| 日日夜夜一区二区| 91电影在线观看| 中文幕一区二区三区久久蜜桃| 九色综合国产一区二区三区| 69堂成人精品免费视频| 亚洲精品日韩一| 99久久精品国产观看| 国产精品久久久久久久久久免费看| 免费成人你懂的| 日韩一卡二卡三卡四卡| 日韩在线卡一卡二| 欧美妇女性影城| 丝袜a∨在线一区二区三区不卡| 欧美日韩一区二区三区在线看| 亚洲男同性视频| 在线看一区二区| 亚洲成人7777| 欧美一区二区三区视频在线观看 | 中文字幕久久午夜不卡| 国产一区不卡在线| 欧美α欧美αv大片| 国产在线精品一区二区不卡了 | 亚洲一区二区三区四区不卡| 欧美少妇bbb| 免费在线看一区| 欧美精品一区二区三区一线天视频| 国产一区二区三区久久久 | 精品久久一区二区三区| 久久99精品国产麻豆婷婷| 日韩一区二区三区在线| 韩国一区二区视频| 中文字幕在线观看一区| 97超碰欧美中文字幕| 亚洲一区二区精品久久av| 日韩一区二区在线观看视频播放| 国产乱码精品一区二区三区忘忧草 | 亚洲丝袜美腿综合| 欧美午夜片在线观看| 麻豆国产一区二区| 国产精品剧情在线亚洲| 欧美日韩一区二区三区四区| 人人狠狠综合久久亚洲| 国产精品三级av| 欧美另类变人与禽xxxxx| 国产99久久久国产精品免费看| 亚洲色图丝袜美腿| 精品国产免费一区二区三区四区 | 一区二区不卡在线播放 | 99久久久久久99| 一区二区免费看| 亚洲精品一区二区三区影院 | 天天综合天天做天天综合| 日韩免费一区二区三区在线播放| av电影在线观看一区| 日本人妖一区二区| 一色屋精品亚洲香蕉网站| 欧美一级夜夜爽| 成人国产精品免费观看视频| 日韩精品一级中文字幕精品视频免费观看 | 亚洲一区二区美女| 国产欧美视频一区二区| 色猫猫国产区一区二在线视频| 麻豆精品一区二区综合av| 亚洲精品国产高清久久伦理二区| 精品理论电影在线观看| 欧美美女直播网站| 不卡一区二区三区四区| 国产一区二区调教| 日本vs亚洲vs韩国一区三区二区 | 678五月天丁香亚洲综合网| 国产成人午夜视频| 精品亚洲成a人| 日韩av午夜在线观看| 亚洲成人综合网站| 艳妇臀荡乳欲伦亚洲一区| 国产精品久久久久精k8| 国产亚洲精品精华液| 精品少妇一区二区三区在线播放| 欧美女孩性生活视频| 在线欧美一区二区| 色老汉一区二区三区| 色综合久久久久| 91首页免费视频| 91色porny在线视频| 成人av动漫网站| 懂色av一区二区三区蜜臀| 国产91富婆露脸刺激对白| 成人免费毛片aaaaa**| 成人福利电影精品一区二区在线观看| 国产精品一区专区| 成人av在线播放网址|