文档库 最新最全的文档下载
当前位置:文档库 › Efficient filtering of XML documents with XPath expressions

Efficient filtering of XML documents with XPath expressions

Efficient filtering of XML documents with XPath expressions
Efficient filtering of XML documents with XPath expressions

Ef?cient Filtering of XML Documents with XPath Expressions Chee-Yong Chan,Pascal Felber,Minos Garofalakis,Rajeev Rastogi

Bell Laboratories,Lucent Technologies

cychan,pascal,minos,rastogi@https://www.wendangku.net/doc/f813098211.html,

Abstract

We propose a novel index structure,termed XTrie,that supports the ef?cient?ltering of XML documents based on XPath expressions.Our XTrie index structure offers several novel features that make it especially attractive for large-scale publish/subscribe systems.First,XTrie is designed to support effective?ltering based on complex XPath ex-pressions(as opposed to simple,single-path speci?cations). Second,our XTrie structure and algorithms are designed to support both ordered and unordered matching of XML data. Third,by indexing on sequences of element names orga-nized in a trie structure and using a sophisticated matching algorithm,XTrie is able to both reduce the number of un-necessary index probes as well as avoid redundant match-ings,thereby providing extremely ef?cient?ltering.Our ex-perimental results over a wide range of XML document and XPath expression workloads demonstrate that our XTrie in-dex structure outperforms earlier approaches by wide mar-gins.

1.Introduction

The exploding volume of information(e.g.,stock quotes, news reports,advertisements)made available on the In-ternet has fueled the development of a new generation of applications based on selective data dissemination,where speci?c data is selectively relayed to a large number(e.g., millions)of distributed clients.This trend has led to the emergence of novel middleware architectures that asyn-chronously propagate data from a set of publishers(i.e., data generators)to a large number of widely dispersed sub-scribers(i.e.,data consumers)who have pre-registered their interest in speci?c information items[4].In general,such publish-subscribe architectures are implemented using a set of networked servers that selectively propagate relevant messages to the consumer population,where message rele-vance is determined by subscriptions representing the con-sumers’interests in speci?c messages.

The majority of existing publish/subscribe systems have typically relied on simple subscription mechanisms,such as keyword or“bag of words”matching,or simple comparison predicates on attribute values.For example,systems such as Gryphon[1],Siena[4],and Elvin[15],all use?lters in the form of a set of attributes and simple arithmetic or boolean comparisons on the values of these attributes.The recent emergence of XML(eXtensible Markup Language)[18]as a standard for information exchange on the Internet has led to an increased interest in using more expressive subscrip-tion/?ltering mechanisms that exploit both the structure and the content of published XML documents.In particular, the XPath language[17],which is a W3C proposed stan-dard for addressing parts of an XML document,has been adopted as a?lter-speci?cation language by a number of recent XML data dissemination systems(e.g.,XFilter[2], Intel’s NetStructure XML Accelerator[6]).Given the in-creased complexity of structural,XPath-based data?lters, the problem of effectively identifying the subscriptions that match an incoming XML document poses a dif?cult and important research challenge.More speci?cally,the key problem faced in XPath-based data-dissemination systems can be abstracted as the following XPath Expression(XPE) Retrieval Problem:“Given a large collection of XPath expressions(XPEs)and an input XML document,?nd the subset of XPEs in that match.”

The key technique for expediting XPE retrieval is to con-struct an appropriate index structure on the given collection of XPE subscriptions.Since XPEs can,in general,represent structurally complex tree patterns,building index structures for ef?cient XPE retrieval is a non-trivial problem.Further-more,simplistic approaches(e.g.,building an index based solely on the element names contained in the XPEs)can re-sult in very ineffective retrieval schemes that incur a lot of unnecessary checking of(irrelevant)XPE subscriptions.

In this paper,we propose a novel index structure,termed XTrie,that supports the ef?cient?ltering of XML docu-ments based on XPath expressions.Our XTrie index struc-ture offers several novel features that make it especially attractive for large-scale publish/subscribe systems.First, XTrie is designed to support effective?ltering based on complex XPath expressions(as opposed to simple,single-path speci?cations).Second,our XTrie structure and algo-rithms are designed to support both ordered and unordered

matching of XML data.Note that ordered matching is an important requirement for many applications(e.g.,docu-ment processing)that has typically been overlooked in ex-isting data dissemination systems.Third,by indexing on sequences of element names(i.e.,substrings)organized in a trie structure and using a sophisticated matching algorithm, XTrie is able to both reduce the number of unnecessary in-dex probes as well as avoid redundant matchings,thereby providing extremely ef?cient?ltering.

Indexing on a carefully-selected set of substrings(rather than individual element names)in the XPEs is a key in-gredient of our approach that enables us to minimize both the number and the cost of the required index probes.The key intuition here is that a sequence of element names has a lower probability(compared to a single element name) of matching in an input document,resulting in fewer index probes.In addition,since there are fewer indexed XPEs as-sociated with a“longer”substring key,each index probe is likely to be less expensive as well.

To support on-line?ltering of streaming XML data,our XTrie indexing scheme is based on the event-based SAX parsing interface[13],to implement XML data?ltering as the XML document is parsed.This is in contrast to the alter-native DOM parsing interface[16],which requires a main-memory representation of the XML data tree to be built be-fore?ltering can commence.To the best of our knowledge, the only other SAX-based index structure for the XPE re-trieval problem is Altinel and Franklin’s XFilter[2],which relies on indexing the XPE element names using a hash-table structure.By indexing on substrings rather than in-dividual element names,our XTrie index provides a much more effective indexing mechanism than XFilter.A further limitation of XFilter is that its space requirement can grow to a very large size as an input document is parsed,which can also increase the?ltering time signi?cantly.Our exper-imental results over a wide range of XML document and XPath expression workloads validate our claims,demon-strating that our XTrie index structure signi?cantly outper-forms XFilter(by factors of up to).

2.Background

XPath Expressions(XPEs)and XPE-trees.An XML document comprises a hierarchically nested structure of el-ements,starting with a root element;sub-elements of an ele-ment can themselves be elements and can also contain char-acter data(i.e.,text)and attributes.Elements can be nested to any depth and the scope of an element in the XML doc-ument is de?ned by a start-tag and an end-tag.The XPath language treats XML documents as a tree of nodes(corre-sponding to elements)and offers an expressive way to spec-ify and select parts of this tree.XPath expressions(XPEs) are structural patterns that can be matched to nodes in the XML data tree.The evaluation of an XPE yields an object whose type can be a node-set,a boolean,a number,or a string.For our XPE retrieval problem,an XML document matches an XPE when the evaluation result is a non-empty node set.

The simplest form of XPEs specify a single-path pattern, which can be either an absolute path from the root of the document or a relative path from some known location(i.e., context node).A path pattern is a sequence of one or more location steps.In its basic form,a location step speci?es a node name(i.e.,an element name),and the hierarchical relationships between the nodes are speci?ed using parent-child(“”)operators(i.e.,at adjacent levels)and ancestor-descendant(“”)operators(i.e.,separated by any number of levels).For example,the XPE selects all ele-ment descendants of all elements that are direct children of the root element in the document.XPath also allows the use of a wildcard operator(“”)to match any element name at a location step.

Each location step can also include one or more predi-cates to further re?ne the selected set of nodes.Predicate expressions are enclosed by“”and“”symbols.The pred-icates can be applied to the text or the attributes of the ad-dressed elements,and may also include other path expres-sions.Any relative paths in a predicate expression are eval-uated in the context of the element nodes addressed in the location step at which they appear.For example,the XPE

speci?es a tree pattern starting at the root element with two child“branches”and such that the element has an attribute with a value equal to or greater than.

The tree pattern speci?ed by an XPE can be represented by an ordered rooted tree,where each node is labeled with an element name(pre?xed by either“”or“”followed by an optional sequence of one or more“*/”).The ordering of the child nodes for each parent node is based on their order of appearance in the XPE.We refer to such a tree representation of an XPE as an XPE-tree.

Unordered and Ordered XPE Matchings.Before we de-scribe the two modes of matching XPEs,we?rst introduce some new de?nitions and notation.Given two nodes and in a rooted tree,we say that precedes in a post-order traversal of,denoted by,if is visited before in a post-order traversal of.

Each node in an XML document tree is associated with a level number,denoted by,where if is the root element;otherwise,, where is the parent node of.

Each node in an XPE-tree is associated with a rel-ative level(with respect to its parent node in),which is de?ned to be at least,denoted by, if the label of is pre?xed with“”followed by

“”;otherwise,if the label of is pre?xed with“”followed by“”,then the relative level of is de?ned to be

s 1()

s 2()s 3()s 4()

s 2()b b c f d 108

(a)

[1,1]

/*/c

(b)

b 71

94b a 32e c 5

6

Figure 1.Unordered and Ordered Matchings.exactly ,denoted by

.Consider an XPE-tree with the set of nodes

and an XML document tree .We say

that a node in matches at a node in if the element name of is equal to that of .In the unordered matching model ,where is treated as an unordered tree,matches if there exists a set of nodes in such that (1)for each node in ,matches at ,and (2)for each child node of a node in ,is a descendant of such that .As an example,consider the XPE-tree of

in Figure 1(a),where the label and relative level of each node are indicated on its left and right,respectively;and the XML document tree in Figure 1(b),where the subscripts indicate the order in which the nodes are parsed (ignore the parenthetical annotations for now).Note that matches with ,,,and matching at ,,,and ,respectively.

In addition to the model of unordered matchings,XPath also allows the order of matching to be explicitly speci?ed.Consider again the XPE-tree in Figure 1(a)for .If we wish to indicate that the “branch”must match in the docu-ment before the “branch”,this can be expressed using the

XPE

-::.Referring again to Figure 1,if the positions of the two subtrees rooted

at

and in are swapped,then would not match while would still match .In the ordered matching model ,where is treated as an ordered tree,matches if (1)matches in the unordered matching model,and (2)for each pair of child nodes and of each internal node in ,in iff in .

Note that hybrid matchings of XPEs,which involve both unordered as well as ordered matchings,are also possible.Due to space constraints,we shall focus on only ordered matchings of XPEs that do not contain any attributes in the rest of this paper.Details on handling attributes as well as unordered and hybrid matchings are given in [5].

3.XPE Decompositions and Matchings

In this section,we describe the mechanisms employed in our XTrie index for decomposing XPEs into sequences of XML element names (i.e.,substrings ),and de?ne sev-eral important concepts for matching based on substring-trees that play a key role in our XTrie indexing structure and matching algorithms.

3.1.Substring Decompositions

Given an XPE ,we de?ne a sequence of element names

to be a substring of if is equal to the

concatenation of the element names of the nodes along a

path

in the XPE-tree of ,such that each is the parent node of ()and the label of each (except perhaps for )is pre?xed only by “”.In other words,each pair of consecutive element names in a substring of must be separated by a parent-child (“”)op-erator.We use

to denote the path of nodes in the XPE-tree of that de?nes the substring .As an example,consider the XPE

whose XPE-tree is depicted in Figure 2(a).The set of sub-strings of includes ,,and ;on the other hand

,,and are not substrings of ,since they in-volve an intermediate element name (i.e.,)that is not pre-?xed by “”.

A sequence of substrings of an XPE is said to be a substring decomposition of p if each

is a substring of and each node in ’s XPE-tree

is contained in

for some .The ordering of the substrings in is ?xed based on the order in which they would be matched in an ordered matching of ;i.e.,should be matched before .A substring decomposition is a minimal decomposition of p if each substring of is of maximal length;that is,there does not exist another longer substring in ’s XPE-tree that contains .Clearly,a minimal decomposition of comprises the smallest pos-sible number of substrings among all possible decomposi-tions of .Figures 2(a)and (b)show two possible substring decompositions for our example XPE ,where each dashed region encloses a path of nodes de?ning a substring.Note that is the (unique)minimal decomposition of .

Our XTrie index relies on substring decompositions for installing XPEs into the indexing structure.The choice of a speci?c class of substring decompositions impacts both the space and performance of the index.Minimal decompo-sitions,in particular,have two important performance ad-vantages.First,since longer substrings have a lower prob-ability of being matched in the input XML document,the maximal-length substrings chosen in a minimal decompo-sition generally result in fewer index probes.Second,since there are fewer XPEs associated with a longer substring,the cost of each index probe is generally lower with mini-

(a) S a(b) S

b(c)

e

ef

Figure2.Substring Decompositions.

mal decompositions.On the other hand,using only a mini-

mal decomposition for an XPE can result in problems when checking for an unordered matching.For example,consider

again the minimal decomposition in Figure2(a),where ,,,,and.Since “”is part of and but not part of,for unordered

matching,using only would fail to detect a matching of when matches after“”has been matched but before and are matched.

Intuitively,to avoid such problems,we need to enrich the

minimal decomposition of an XPE so that it“takes note”of the branching nodes in the XPE-tree.Our XTrie indexing scheme accomplishes this through the use of simple XPE decompositions.Formally,a substring decomposition is said to be a simple decomposition of an XPE if can be partitioned into two sequences and,where:(1) is the minimal decomposition of;and,(2)consists of one substring for each branching node v in’s XPE-tree,such that is the maximal substring in with as its last node and is not already listed in.As an example, the decomposition depicted in Figure2(b)is the simple decomposition of our example XPE;note that simply adds the substring(is a branching node)to the minimal decomposition.Also,note that,for a single-path XPE, its simple decomposition is equal to its minimal decompo-sition.

The substrings of the simple decomposition of

can be organized into a unique rooted tree,referred as the substring-tree of,as follows.Let

denote the simple decomposition of ,where denotes the number of substrings in the sim-ple decomposition of.Then,the root substring is, and the parent substring of,where,is(or equivalently,is the child substring of)if either(1) is a pre?x of,or(2)the last node of

is the parent node of the?rst node of

in the XPE-tree of.The ordering among sibling sub-

strings is based on their ordering in.As an example,

Figure2(c)shows the substring-tree for the simple decom-position in Figure2(b).A substring that has no child sub-strings is called a leaf substring.A substring is said to be a descendant of another substring if either is the parent substring of,or the parent substring of is a descendant of.Similarly,is said to be an ancestor of if is a descendant of.Finally,we de?ne the rank of a substring to be equal to if is the child of its parent substring;the rank of the root substring is .

We now extend the notion of relative level that was de-?ned for nodes in XPE-trees to https://www.wendangku.net/doc/f813098211.html,rmally,the relative level of a substring refers to the relative difference in levels between the last elements of and its parent sub-string in a matching.More formally,consider a substring of an XPE(with parent substring),and let

be the longest suf?x of such that

.Let for, and let denote.Then the relative level of is de-?ned to be at least,denoted by,if

;otherwise,it is de?ned to be exactly ,denoted by.

3.2.Matching with Substrings

Consider an XML document tree,and an XPE with XPE-tree and simple decomposition

.Since each substring corre-sponds to some path of nodes in,we can ex-tend the de?nition of matching for nodes to substrings as follows:matches at a node in(or there is a match-ing of at in)if matches such that the last node of matches at.We say that there is a matching of at level in if matches at some node at level in.

As the nodes in are parsed in a pre-order traversal(by the SAX parser),the ordered matching of in also pro-gresses incrementally following a pre-order traversal of the substring-tree of such that each substring is matched before,.Thus,to determine if matches, we need to keep track of the“partial matchings”of in .However,since we are interested only in whether or not matches and not in the actual number of match occurrences,“partial matchings”of that are“redundant”should be ignored in order to improve the effectiveness of the?ltering process.

We now formally de?ne the notions of partial and re-dundant matchings.Given an XPE and an XML docu-ment tree,we de?ne to be a set of matchings(with respect to and)if contains pairs of the form ,where matches at,and for each distinct pairs,,and. We say that there is a partial matching of at a node

in if there exists a set of matchings such that for each ,(1);and(2)for each child substring of,is a descendant of such that

.It follows that

we have a(complete)matching of in if there is a par-tial matching of at some node in.We represent a partial matching by its set of matchings.

To de?ne redundant matching,we?rst need to introduce the notion of subtree-matching.A set of matchings is said to be a subtree-matching of if is a partial match-ing of each descendant https://www.wendangku.net/doc/f813098211.html,rmally,a partial match-ing of at a node is considered redundant if there exists a subtree-matching of at some“earlier”node(i.e.,

in);thus,all subsequent partial matchings that require the matching of at can be safely ignored with-out affecting the correctness of deciding whether or not matches.More precisely,a partial matching of at (represented by)is said to be a redundant matching if there exists a subtree-matching of(represented by), where is either itself or an ancestor of,such that (1)and in;and(2)if is not the root substring of,then, where is the parent substring of.Otherwise,is said to be a non-redundant matching of.

Consider again the XPE and XML document in Fig-ure1,where the four substrings in the simple decomposition of are:,,,and.The par-enthetical annotation“”besides a node in means that there is a non-redundant matching of at when

is parsed in.Thus matches.Both the partial match-ings of at and at are redundant.Observe that a non-redundant matching could later become redundant as more nodes in the document tree are parsed;in particular, the non-redundant matching of at becomes redundant after is parsed.

4.The XTrie Indexing Scheme

In this section,we present our novel XTrie indexing scheme for?ltering XML documents based on XPEs.Due to space constraints,we focus only on ordered matchings. The details for unordered and hybrid matchings can be found in[5].

4.1.The Index Structure

Let denote the set of XPEs be-ing indexed,and denote the set of distinct substrings de-rived from all the simple decompositions of the XPEs in .An XTrie index consists of two key components:(1)a Trie[12](denoted by)constructed on to facilitate de-tection of substring matchings in the input XML data;and, (2)a Substring-Table(denoted by)that stores informa-tion about each substring of each XPE in.The informa-tion in is used to check for partial matchings.We now describe each of these two XTrie components in detail. The Substring-Table.The substring-table contains one row for each substring of each indexed XPE;i.e.,there are rows in with each row corresponding to some .The rows in are physically clustered in terms of the XPEs such that the substrings belonging to an XPE are stored in consecutive rows ordered based on the simple de-composition of.The order of the XPEs in is arbitrary. Since each row in corresponds to some substring,for convenience,we use the notation to the denote the row in that corresponds to the substring.

To facilitate locating all XPEs that contain some sub-string,the rows in are also logically partitioned into disjoint blocks such that each block contains all the rows that correspond to the same substring.This substring-based partitioning of the rows in is achieved by chaining the rows within each block using a singly linked list,giving a total of singly linked lists in(with one list for each distinct substring in).The rows within each linked list are partially ordered such that if rows and belong to the same linked list,then precedes in the linked list if.This is required to ensure correctness under the ordered matching model[5].

Each row in(corresponding to some substring)is a5-tuple

where:

refers to the row number of the tuple in corresponding to the parent substring of.

(if is a root substring.)

is the relative level of(i.e.,

).

is the rank of(i.e.,if is the child substring of its parent substring).

is the total number of child substrings of .

,which is a“pointer”for a singly linked list,is the row number of the next tuple in that belongs to the same logical block as the current row.If the current row is the last row in the linked list,then. The Trie.The trie is a rooted tree constructed from the set of distinct substrings,where each edge in is labeled with some element name.Each node in is associ-ated with a label,denoted by,which is the string formed by concatenating the edge labels along the path from the root node of to node;the label of the root node is an empty string.is constructed such that for each, there is a unique node in such that;and for each leaf node in,.In addition to the pointers to nodes at the next level of the trie,each node

in has two special pointers:

The Substring pointer(denoted by)points to some row in(i.e.,is a row number)as follows:if,then points to the ?rst row of the linked list associated with substring ;otherwise,.

1

2

6111415127

81334

5

1091

1111

1

233104

81275

a b c d

p4 = //c/b//c/d/*/*/d

p1 = //a/a/b/c/*/a/b p2 = /a/b[c/e]/*/b/c/d p3 = /a/b[c/*/d]//b/c b b

c

e

c

c d 00a 0014729

50

d b 08

1110Parent Row Rank Next

0111

3

32405

01617112

6

2

10111112

Algorithm SEARCH(,,)

Input:is an input XML document.(,)is an XTrie index. Output:is the set of XPEs that matches.

1)Initialize to be empty;

2)Initialize=root node of for=0to;

3)Let be a integer-array with all values initialized to;

4)Initialize;is the current document level

5)Initialize to be the root node of;is the current trie node

6)repeat

7)if(a start-tag is parsed in)then

8);

9)while((there is no edge labeled”t”from)and

(is not the root node of))do

10);

11)if(there is an edge labeled”t”from to in)then

12);

13)while(is not the root node)do

14)if()then

15)MATCH-SUBSTRING();

16);

17)else if(an end-tag is parsed in)then

18)Reset to for=1to;

19)=root node of;

20);

21);

22)until(has been completely parsed);

23)return;

Figure4.Algorithm to search XTrie. substrings,which are formed by the concatenation of some suf?x of and,by using the max-suf?x pointer in Step10.For each end-tag encountered(corresponding to some start-tag at level),the run-time information is up-dated by resetting to for all rows(Step18),and the search node is re-initialized to its previous location be-fore the tag was encountered(Step19).This is achieved by using an array to keep track of the location of the search node at each document level(Step12).

Algorithm MATCH-SUBSTRING(Figure5)is invoked when a substring(matching at level)is detected.The algorithm checks for non-redundant matchings of,updates the run-time information,and returns the identi?ers of all the matching XPEs that have as their last substring.More speci?cally,the algorithm iterates through each instance of in(i.e.,each row in the linked list associated with )to check for non-redundant matchings of.There are two scenarios for the instance of the matching substring(say )corresponding to row.For the special case where

is a root substring(Steps5-9),if its positional constraint is satis?ed(Step6),then the matching is a partial matching (and obviously non-redundant,since it is a root substring) and is updated to.If,in addition,is a leaf substring,then we have a matching of(Step9).For the general case where is a non-root substring(Steps10-14),if there is a non-redundant matching of(Step11), then is updated to.If,in addition,is a leaf substring,then Algorithm PROPAGATE-UPDATE is called to update the run-time information array and check for

Algorithm MATCH-SUBSTRING(,,,)

Input:is the substring-table of an XTrie index.is a2-dim.

integer-array.refers to the?rst row in that

corresponds to some substring that is matched at level.

Output:Set of matching XPEs.

1)Initialize to be empty;

2)while()do

3);

4)Initalize;

5)if()then

6)if()then

7);

8)if()then

9);

10)else

11)if(such that

and)then

12);

13)if()then

14)PROPAGATE-UPDATE();

15)if()then

16)Insert the id.of the XPE corrp.to row into;

17);

18)return;

Figure 5.Algorithm to process a matched

substring.

a matching of.We should point out that,since we are not interested in?nding multiple matches of the same XPE, we should eliminate unnecessary processing and checking in MATCH-SUBSTRING for XPEs that have already been matched.This can be easily achieved by using a bit-mask (consisting of one bit per XPE);we have omitted details of this additional?ltering step from Figure5for simplicity of presentation.

Algorithm PROPAGATE-UPDATE(depicted in Fig-ure6)is used to update whenever a non-redundant subtree-matching of some non-root substring(match-ing at level corresponding to row in)is detected.The algorithm iterates through each matching of its parent sub-string(at level)and updates its entry if the matching forms a non-redundant matching of.If this matching is also a subtree-matching for the parent sub-string of(Step12),then there are two cases to consider. If the parent substring is a root substring(Step13),then we have found a matching of;otherwise,we recurse the up-date propagation of the entries for the ancestor substrings of as well(Step16).The algorithm returns if a matching of has been detected;otherwise,if it is possible to have multiple matchings of the parent substring of (i.e.,for some),then to avoid any subsequent redundant matchings of descendants of,the algorithm updates the entries of all the earlier matchings of(Steps18to20),and returns.

The space requirement of the XTrie index is dominated by the total number of substrings in;that is,the space complexity is,where denotes the num-

Algorithm PROPAGATE-UPDATE(,,,)

Input:is the substring-table of an XTrie index.

is a2-dimensional integer-array.refers to a row in

that corresponds to some substring of

for which there is a subtree-matching of at level.

Output:Returns if there is a matching of;otherwise.

1);

2);

3)if then

4);

5)else

6);

7)Initialize;

8)Initialize;

9)while()and()do

10)if()then

11);

12)if()then

13)if()then

14);

15)else

16)=PROPAGATE-UPDATE(,,,);

17);

18)if()and()then

19)for=to do

20)if()then;

21)return;

Figure6.Algorithm to update and detect

complete matchings of XPE.

ber of the substrings in the simple decomposition of.To analyze the time complexity,let denote the length of the longest root-to-leaf path in the trie,denote the maxi-mum length of a linked list in,and denote the max-imum height of a substring-tree.The complexity of Algo-rithm PROPAGATE-UPDATE is.Since Algo-rithm MATCH-SUBSTRING makes at most calls to Algo-rithm PROPAGATE-UPDATE,the complexity of Algorithm MATCH-SUBSTRING is.For each start-tag in the input document,Algorithm SEARCH makes at most calls to Algorithm MATCH-SUBSTRING;thus,the com-plexity of processing each start-tag is.

We conclude this section by brie?y describing an opti-mized variant of XTrie,which we referred to as Lazy XTrie. In contrast to above variant of XTrie(referred to as Ea-ger XTrie),which probes the substring-table for every matching substring detected in the input document,Lazy XTrie postpones the probing of such that the substring-table is only probed for a matching substring if appears as a leaf substring in some XPE;otherwise,for a matching non-leaf substring,Lazy XTrie only updates information about the level at which is matched in the input document. Thus,Lazy XTrie minimizes the number of unnecessary in-dex probes at the expense of a slightly higher cost for each probe due to the additional processing required to check for matchings of the ancestor substrings of the matched leaf substring.The details of Lazy XTrie are given in[5].5.Related Work

There has been various work on the?ltering of data using “?at patterns”in the form of conjunctions of simple pred-icates on data attributes,including research on rule/trigger processing systems[9,11]and publish-subscribe systems [1,10,14].In contrast,our paper focuses on?ltering XML documents based on tree patterns(based on XPath expres-sions),which demands more sophisticated indexing tech-niques,since tree patterns consist of both data contents as well as structure.The only work that is closely related to ours is the XFilter index which is also designed for?lter-ing XML documents with XPath expressions[2].While our XTrie index is based on decomposing tree patterns into collections of substrings(i.e.,sequences of element names) and indexing them using a trie,XFilter essentially treats each tree pattern as a set of?nite state automata,with each automaton responsible for the matching of some path in the tree pattern.The collection of automata for all the tree pat-terns are indexed using a hash table on the single element names(i.e.,automata transitions).

XTrie is more space-ef?cient than XFilter since the space cost of XTrie is dominated by the number of substrings in each tree pattern,while the space cost of XFilter is dom-inated by the number of element names in each tree pat-tern.By indexing on substrings instead of single element names,the substring-table entries in XTrie are also probed less often than the hash table entries in XFilter.Further-more,while XTrie ignores partial matchings of tree patterns that are redundant,XFilter keeps tracks of all instances of partially matched tree patterns,which results in more pro-cessing overhead.

6.Experimental Evaluation

To determine the effectiveness of XTrie,we compare its performance against XFilter.Our results indicate that XTrie is between to times faster than XFilter for single-path XPEs1.

XML Documents.Similar to[2],we used the NITF(News Industry Text Format)DTD[7]to generate our XML doc-ument data set.The NITF DTD(version2.5)contains elements with attributes.Our data set of XML docu-ments is generated using IBM’s XML Generator tool[8]. We generated three sets of XML documents with sim-ilar characteristics.These sets correspond to different sizes of document:small,medium and large,with an average of ,,and pairs of tags,respectively.

XPath Expressions.We implemented an XPath expression generator that takes a DTD as input and creates a set of valid XPath expressions(with no duplicates)based on the

500

1000

15000100200300400500

F i l t e r i n g T i m e (m s )

Number of XPEs (x1,000)

Eager XTrie Lazy XTrie

XFilter XFilter-LB

(a)Varying P (

).

1000

2000

3000

4000

20100

1000

F i l t e r i n g T i m e (m s )

Document Size (number of tag pairs)

Eager XTrie Lazy XTrie XFilter-LB

(b)Varying document length (=,

=

,

=,=,=,=).

100

200

300

400500

00.10.20.30.40.5

F i l t e r i n g T i m e (m s )

Descendant (’//’) Probability

Eager XTrie Lazy XTrie XFilter-LB

(c)Varying (=

,

=

,

=

,

=,

=).

100

200

300

1015

20

F i l t e r i n g T i m e (m s )

Maximum Number of Levels

Eager XTrie Lazy XTrie XFilter-LB

(d)Varying (=

,

=

,

=

,

=,

=).

Figure 7.Experimental Results.

following set of six input parameters.The parameter

controls the cardinality of the set of indexed XPEs (rang-ing from to ).The parameter controls

the “depth”of the XPEs in terms of the maximum number

of levels (ranging from to ).The parameter ()

controls the probability (ranging from to )of having a

wildcard “”(descendant “”)operator at each node.The

parameter controls how “bushy”are the XPE-trees of the XPEs (ranging from to

);a value of will generate only single-path XPEs,while a higher value will increase the number of branches in the XPE-trees.The parameter (ranging from to )controls the skewness of the Zipf distribution [19]used for selecting element names,where a value of corresponds to a uniform distribution and a higher value corresponds to a more skewed distribution.Algorithms.We compare the performance of four algo-rithms:(1)XFilter,(2)XFilter with “list balance”opti-mization [2],which is denoted by -,(3)Ea-ger XTrie,and (4)Lazy XTrie.Note that we did not apply

the pre?ltering optimization [2]to XFilter because this opti-mization is orthogonal to the index approach,and is applica-ble to XTrie as well.All the algorithms were implemented

in C++and compiled using GNU C++version 2.95.3.Ex-periments were conducted on a Sun Ultra-250with MB of main memory running Solaris 2.7.All the index struc-tures were resident in main-memory for all the experiments.For each input XML document,we measured the total ?l-tering time which includes the CPU time to parse the in-put document,probe and update the index,and report the matched expressions.Our performance metric for each cat-egory of documents (small,medium,or large)is the average ?ltering time over the set of XML documents for that category.We used the SAX parser of the Apache Founda-tion [3]for parsing XML documents.The average times for parsing a small,medium,and large document were ms,ms,ms,respectively.6.1.Experimental Results Our experimental results are shown in Figure 7,where

the base case uses the following parameter values:medium data set,,=,=,=,=,and =.Figure 7(a)compares the scalability of the algorithms as a function of ,the size of the set of indexed XPEs.The results show that the ?ltering time increases almost lin-early with ,with Lazy XTrie being the fastest algorithm,which outperforms XFilter-LB by a factor of between to .Eager XTrie performs slightly better than XFilter-LB,and XFilter performs the worst.Note that since the performance

of XFilter is always much worse than XFilter-LB,we omit

XFilter from subsequent graphs.Figure7(b)compares the scalability of the algorithms as a function of the size of the XML documents(in terms of the number of tag-pairs).The results clearly show that the?ltering time increases linearly with the document size for all the algorithms.

Figure7(c)shows that increasing the probability of de-scendant operators in the XPEs(i.e.,)increases the?lter-ing time of all the algorithms.For the XTrie algorithms,this is because having more descendant operators in a XPE is likely to result in a larger number of shorter substrings in its simple decomposition,which not only increases the num-ber of entries in the substring-table but also leads to more matchings in the trie(due to shorter substrings).For the XFilter-LB algorithm,having more descendant operators in the XPEs translates to more instances of partially matched expressions thereby resulting in more processing overhead.

Finally,Figure7(d)compares the effect of the“depth”of the XPEs on the performance of the?ltering algorithms. The graphs show that the performance of all the algorithms improves slightly as the depth of the XPEs increases.This is because tree patterns with longer“branches”are more selective resulting in fewer matches.More experimental re-sults are given in[5].

We also compared the memory usage of both XTrie and XFilter,and our experimental results indicate that XTrie is more space ef?cient.For instance,for the experiment in Figure7(a)with XPEs,XTrie required approxi-mately MB of memory while XFilter required MB.

7.Conclusions

In this paper,we have proposed a novel index structure, termed XTrie,that supports the ef?cient?ltering of stream-ing XML documents based on XPath expressions.Our XTrie index offers several novel features that make it espe-cially attractive for large-scale publish/subscribe systems. First,the XTrie is designed to support effective?ltering based on complex XPath expressions(as opposed to sim-ple,single-path speci?cations).Second,our XTrie structure and algorithms are designed to support both ordered and un-ordered matching of XML data.Third,by indexing on se-quences of XML element names(i.e.,substrings)organized in a trie structure and using a sophisticated matching algo-rithm,the XTrie is able to both reduce the number of unnec-essary index probes as well as avoid redundant matchings, thereby providing extremely ef?cient?ltering.Our exper-imental results over a wide range of XML document and XPath expression workloads have clearly demonstrated the bene?ts of our approach,showing that our XTrie index con-sistently outperforms earlier approaches by wide margins. Acknowledgements.We would like to thank Mehmet Al-tinel and Mike Franklin for helping us to understand the details of XFilter.References

[1]M.K.Aguilera,R.E.Strom,D.C.Sturman,M.Astley,and

T.D.Chandra.Matching Events in a Content-based Sub-scription System.In Proc.of ACM PODC,pages53–61, Atlanta,GA,May1999.

[2]M.Altinel and M.Franklin.Ef?cient Filtering of XML Doc-

uments for Selective Dissemination of Information.In Proc.

of VLDB,pages53–64,Sept.2000.

[3]Apache.Xerces C++Parser.https://www.wendangku.net/doc/f813098211.html,,2001.

[4] A.Carzaniga,D.Rosenblum,and A.Wolf.Design and Eval-

uation of a Wide-Area Event Noti?cation Service.ACM Trans.on Computer Systems,19(3):332–383,August2001.

[5] C.-Y.Chan,P.Felber,M.Garofalakis,and R.Rastogi.Ef?-

cient Filtering of XML Documents with XPath Expressions.

Technical report,Bell Labs.,June2001.

[6]T.I.Corporation.Intel NetStructure XML Ac-

celerators.https://www.wendangku.net/doc/f813098211.html,/netstructure/products/ xml

学生选课系统

管理信息系统课程设计报告 学生选课系统 班级: 学号: 姓名: 指导教师: 2014年12月20日

目录第一章:现行系统概述 第二章:系统分析 2.1需求分析 2.2可行性研究 2.3信息系统规划 2.4系统的开发方法的选择 2.5组织结构与功能分析 2.6业务流程分析 2.7数据与数据流程分析 2.8功能/数据分析 2.9新系统逻辑方案的建立 第三章系统设计 3.1系统总体结构设计 3.2数据结构与数据库设计 3.3代码设计 3.4输入/输出设计 3.5模块功能与处理过程设计 第四章系统实施 4.1系统实施 4.2系统运行调试

第五章:结束语(结论、建议、收获、体会及小组中每个成员的工作内容) 参考文献

第一章现行系统概述 本科生选课系统是个很庞大的信息系统。目前随着学校人数和课程的激增,对教务处而言,管理和维护选课系统关系到自身的效率,选课系统的繁杂,在一定程度上会相对的增加教务处的管理负担。对学生而言,在选课阶段必须面对大量课程进行仔细筛选,而所有课程聚在一起,学生无法快速定位自己想选以及在规定时间内被要求选的课程类别。 这些问题的出现表明我们的选课系统仍然存在着问题,也需要对其进行改造,由此提高学生选课效率,为学生的学习带来更大的便利。学生选课系统作为一种现代化的教学技术,越来越受到人们重视,是一个学校不可或缺的部分。学生选课系统就是为了管理好选课信息而设计的。学生选课系统将是选课管理工作规范化,系统化,程序化,避免选课管理的随意性,提高信息处理的速度和准确性,能够准确,及时,有效的查询和修改学生选课情况。

第二章系统分析 2.1需求分析 学生可以选修规定范围内的课程,查看已修学分总数,还可以修改个人信息。教师可以根据统计的人数挑选一定数量的学生,也可以直接在网上公布成绩,让学生直接在网上查询成绩。管理员可以指定每门课程的任课教师,修改课程信息,增加、修改、删除学生信息。分析一:系统应该满足以下几个方面需求: (1)某些选修课程因为前序课程或者教学管理资源的限制,要求系统能对课程选修人数、选修学生年级、专业等进行限制。 (2)选课过程需具有时效性,系统要能在短时间内响应大量学生的查询和选课要求,並及时处理。 (3)教务部门能及时掌握课程选修情况,系统界面直观,操作简单,学生不需经任何培训即可操作。 (4)系统要提供数据输出接口以供教务员作后期处理及保存。包括作为以后查询和评估使用的资料。 分析二:系统要实现的功能分为二大模块: 管理员模块: (1)负责统一管理,包括课程的查询、添加、修改和删除; (2)限制选修条件的管理,包括条件的添加、修改和删除; (3)统一管理用户,包括管理员和学生用户的管理; (4)系统公告的管理; (5)数据的管理和数据导出;

九年级数学二次函数几种解析式的求法素材

二次函数的解析式求法 求二次函数的解析式这类题涉及面广,灵活性大,技巧性强,笔者结合近几年来的中考 试题,总结出几种解析式的求法,供同学们学习时参考。 一、 三点型 例1 已知一个二次函数图象经过(-1,10)、(2,7)和(1,4)三点,那么这个函 数的解析式是_______。 分析 已知二次函数图象上的三个点,可设其解析式为y=ax 2 +bx+c,将三个点的坐标代 入,易得a=2,b=-3,c=5 。故所求函数解析式为y=2x 2-3x+5. 这种方法是将坐标代入y=ax 2+bx+c 后,把问题归结为解一个三元一次方程组,求出待定系 数 a, b , c, 进而获得解析式y=ax 2+bx+c. 二、交点型 例2 已知抛物线y=-2x 2+8x-9的顶点为A ,若二次函数y=ax 2+bx+c 的图像经过A 点, 且与x 轴交于B (0,0)、C (3,0)两点,试求这个二次函数的解析式。 分析 要求的二次函数的图象与x 轴的两个交点坐标,可设y=ax(x-3),再求也y=-2x 2+8x-9的顶点A (2,-1)。将A 点的坐标代入y=ax(x-3),得到a=21 ∴y=21x(x-3),即 y= x x 23212 . 三、顶点型 例 3 已知抛物线y=ax 2 +bx+c 的顶点是A(-1,4)且经过点(1,2)求其解析式。 分析 此类题型可设顶点坐标为(m,k),故解析式为y=a(x-m)2+k.在本题中可设y=a(x+1)2+4.

再将点(1,2)代入求得a=-21 ∴y=-,4)1(212++x 即y=-.272 12+-x x 由于题中只有一个待定的系数a ,将已知点代入即可求出,进而得到要求的解析式。 四、平移型 例 4 二次函数y=x 2 +bx+c 的图象向左平移两个单位,再向上平移3个单位得二次函 数,122+-=x x y 则b 与c 分别等于 (A)2,-2;(B)-6,6;(c)-8,14;(D)-8,18. 分析 逆用平移分式,将函数y=x 2 -2x+1的顶点(1,0)先向下平移3个单位,再向右平移 两个单位得原函数的图象的顶点为(3,-3)。 ∴y=x 3)3(22--=++x c bx =x .662 +-x ∴b=-6,c=6. 因此选(B ) 五、弦比型 例 5 已知二次函y=ax 2+bx+c 为x=2时有最大值2,其图象在X 轴上截得的线段长为 2,求这个二次函数的解析式。 分析 弦长型的问题有两种思路,一是利用对称性求出交点坐标,二是用弦比公式d=a ?

网上选课系统-需求分析报告

一、系统设计可行性 1.1网上选课系统的产生 网上选课系统是针对在校学生和教师使用的,从学生的角度来说,由于教学制度的改革,现在大部分的高等院校开始实行学生自主选课模式,传统的教学模式已经不能适应新的教学模式,如果还只是通过纸上的方式选课,一方面浪费大量的人力、物力,另一方面浪费时间以及在统计过程中不可避免的会出现差错。随着高校的人数增加,暴露出来的弊端会越来越多。 因此,利用网络,使学生只要在计算机前输入自己的个人选课信息即可完成原来几倍的作业量。从教室的角度来讲,同样可以节约大量的时间和减少工作量以及减少错误的发生率。 1.2可行性分析 网上选课系统的可行性分析包括以后几个方面: 1.技术可行性 由于校园网络的普遍应用,使得网上选课非常的方便,无需再进行网络的建设。基于B/S模式的选课系统更加适合校园网,使得学生可以在任何有校园网的地方完成选课过程。 https://www.wendangku.net/doc/f813098211.html,、C#语言在大二的时候学过了,而且数据库Access运 用的比较熟练,大部分做起来还算得心应手,部分不会的现在上网也比较方便,可以在网上进行查找。. 2.经济可行性

校园网应经普及,因此网络设备上不需要大的投入。加之,B/S 模式的系统只要求客户端具备浏览器的基本功能,就能实现网上选课。因此,从经济上来说,开发网上选课系统不需要很大的投入,硬件上只需要Web服务器和数据库服务器即可。 3.操作可行性 B/S模式的最大优势就是操作方便、如同浏览网页一样。 综上所述,网上选课系统在高校中是可行的。 二、系统的需求分析 2.1引言 2.1.1编写的目的 本文档是对该学生选课系统的一个整体把握,以便在下一步的开发设计中更好的控制开发。 本文档的预期读者是: 设计人员 开发人员 管理和测试人员 最终用户. 2.1.2背景 由于电脑时代的到来以及internet的迅速发展,电脑无处不在,当然各种工作效率也大幅提高,那么对于一个学校来说,开发一个好的学生选课系统势在必行。鉴此,特开发此学生选课系统,该系统实现了选课的网络化、信息化、现代化。

学生选课管理系统

学生选课管理系统 SANY GROUP system office room 【SANYUA16H-SANYHUASANYUA8Q8-

#include #include #include #include #include //定义学生对象类型 typedef struct node { char Sno[10]; //学号 char Sname[10]; //姓名 char Ssex[3]; //性别 char Sage[3]; //年龄 char Sdept[4]; //所在系 struct node *next; }Student; //定义课程对象类型 typedef struct node2 { char Cno[10]; //课程号 char Cname[10]; //课程名 char Cpno[5]; //先行课 char Ccredit[3]; //学分 struct node2 *next; }Course; //定义选课对象类型 typedef struct node3 { char Sno[10]; char Cno[10]; int Grade; struct node3 *next; }SC; //初始化学生信息表

void InitlistA(Student *stu) { stu->next=NULL; } //初始化课程信息表 void InitlistB(Course *C) { C->next=NULL; } //初始化选课信息表 void InitlistC(SC *S) { S->next=NULL; } //求选课表的深度 int Getlength(SC *S) { int i=0; SC *p; p=S->next; while(p!=NULL) { p=p->next; i ; } return(i); } //用户输入数据建立学生信息表(尾插法) void CreatelistA(Student *stu) { Student *s,*r; int m,i;

求二次函数解析式 综合题 练习+答案

求二次函数解析式:综合题 例1 已知抛物线与x轴交于A(-1,0)、B(1,0),并经过M(0,1),求抛物线的解析式. 分析:本题可以利用抛物线的一般式来求解,但因 A(-1,0)、B(1,0)是抛物线与x轴的交点,因此有更简捷的解法. 如果抛物线y=ax2+bx+c与x轴(即y=0)有交点(x1,0),(x2,0).那么显然有 ∴x1、x2是一元二次方程ax2+bx+c=0的两个根.因此,有 ax2+bx+c=a(x-x1)(x-x2) ∴抛物线的解析式为 y=a(x-x1)(x-x2) (*) (其中x1、x2是抛物线与x轴交点的横坐标) 我们将(*)称为抛物线的两根式.

对于本例利用两根式来解则更为方便. 解:∵抛物线与x轴交于A(-1,0)、B(1,0) ∴设抛物线的解析式为 y=a(x+1)(x-1) 又∵抛物线过M(0,1),将x=0,y=1代入上式,解得a=-1 ∴函数解析式为y=-x2+1. 说明:一般地,对于求二次函数解析式的问题,可以小结如下: ①三项条件确定二次函数; ②求二次函数解析式的一般方法是待定系数法; ③二次函数的解析式有三种形式: 究竟选用哪种形式,要根据具体条件来决定. 例2 由右边图象写出二次函数的解析式.

分析:看图时要注意特殊点.例如顶点,图象与坐标轴的交点. 解:由图象知抛物线对称轴x=-1,顶点坐标(-1,2),过原点(0,0)或过点(-2,0). 设解析式为y=a(x+1)2+2 ∵过原点(0,0),∴a+2=0,a=-2.故解析式为 y=-2(x+1)2+2,即y=-2x2-4x. 说明:已知顶点坐标可以设顶点式. 本题也可设成一般式y=ax2+bx+c,∵过顶点(-1,2)和过原点(0,0),

项目关键节点计划

北京某企业项目关键节点计划 发展计划控制时间节点分析 1.项目可研报告,报集团批准 2.确定项目启动 3.完成项目团队组建 4.取得土地证 5.净地交付 6.提供用地红线和规划要点 7.完成《某某经营部产品定位报告》,报集团批准 8.完成《某某概念规划设计任务书》 9.完成规划及概念设计,报集团批准 10.《项目投资分析模型(概念版)》——组织概念目标成本测算确认目标成 本及财务指标(一级目标成本),完成项目经营测算 11.完成建筑方案设计 12.示范区域确定及方案设计确认 13.完成外网配套征询 14.方案设计汇报,报集团批准 15.《项目投资分析模型(方案版)》——组织方案图目标成本测算确认目标 成本及财务指标(二级目标成本),完成项目经营测算 16.取得建设用地规划许可证 17.完成基坑施工图 18.完成桩基及基础施工图 19.完成样板区施工图、景观、精装修设计 20.完成常规建筑结构水电施工图设计 21.完成景观施工图 22.完成综合管网图设计 23.取得施工图审 24.取得工程规划许可证 25.完成三通一平 26.完成工程策划 27.完成合约规划 28.《项目投资分析模型(目标版)》——组织施工图目标成本测算确认目标 成本及财务指标(三级目标成本),完成项目经营测算 29.签订总包施工合同 30.取得施工许可证 31.样板区开工 32.取得项目开发贷款 33.基础(土方)工程开工 34.±0米以下结构工程开工、独立地下结构(地库)完工(基础) 35.完成裙房或转换层结构施工 36.首批主体施工达到预售条件 37.首批主体结构封顶 38.全部主体结构封顶

39.首批门窗、栏杆、幕墙等材料进场 40.样板区工程完工、开放 41.各标段取得预售许可证 42.产品定价表,报集团批准 43.销售开盘 44.销售完成30% 45.销售完成50% 46.现金流回正时间 47.销售完成75% 48.销售完成95% 49.第一批外立面落架亮相 50.最后一批外立面落架完成 51.全部单体达竣工条件 52.市政配套埋管完工 53.室外景观、绿化完工(完成项目施工) 54.专项验收结束,取得《竣工备案证明》 55.开始办理集中交房(入伙) 56.办理房产初始登记 57.工程全部结算完成 58.完成收尾及项目财务核算 59.项目后评估

学生选课管理系统需求规格说明书

学生选课系统需求规格说明书

目录 0. 文档介绍 (4) 0.1文档目的 (4) 0.2文档范围 (4) 0.3读者对象 (4) 0.4参考文档 (4) 1.产品介绍 (5) 2.产品面向的用户群体 (6) 3. 产品应当遵循的标准或规范 (7) 4.产品范围 (7) 5. 产品中的角色 (7) 6. 产品的功能性需求 (8) 6.0功能性需求分类 (8) 6.1后台管理功能需求 (8) 6.1.1管理员信息管理 (8) 6.1.2教师信息管理 (10) 6.1.3学生信息管理 (11) 6.1.4课程信息管理 (12) 6.1.5排课管理 (13) 6.1.6教室信息管理 (14) 6.2前台管理功能需求 (15) 6.2.1学生选课 (15) 6.2.2撰写教师反馈 (16) 6.2.3个人信息管理 (17) 6.2.4用户登录 (19) 7. 产品的非功能性需求 (20) 7.1用户界面需求 (20) 7.2软硬件环境需求 (20) 7.3产品质量需求 (20) 7.4其他需求 (21) 附录A:需求建模与分析报告 (22) A.1学生选课系统业务流程图 (22) A.1.1系统总体业务流程分析 (22) A.1.2学生管理业务流程图分析 (23)

A.1.3教师管理业务流程图分析 (24) A.1.4选课/退课子系统业务流程图分析 (25) A.1.5教师反馈子系统业务流程图分析 (26) A.1.6管理员管理业务流程图分析 (26) A.1.7管理员排课业务流程图: (27) A.1.8管理员退课业务流程图: (28) A.2学生选课管理系统数据流程图 (29) A.2.1顶层数据流程图 (30) A.2.2 O层数据流程图 (30) A.2.3后台管理数据流程图 (31) A2.4 前台管理数据流程图 (36) 附录B:需求确认....................................................................................... 错误!未定义书签。

二次函数的三种表达形式.

二次函数的三种表达形式: ①一般式: y=ax2+bx+c(a≠0,a、b、c为常数),顶点坐标为[,] 把三个点代入函数解析式得出一个三元一次方程组,就能解出a、b、c的值。 ②顶点式: y=a(x-h)2+k(a≠0,a、h、k为常数),顶点坐标为对称轴为直线x=h,顶点的位置特征和图像的开口方向与函数y=ax2的图像相同,当x=h时,y最值=k。 有时题目会指出让你用配方法把一般式化成顶点式。 例:已知二次函数y的顶点(1,2)和另一任意点(3,10),求y的解析式。 解:设y=a(x-1)2+2,把(3,10)代入上式,解得y=2(x-1)2+2。 注意:与点在平面直角坐标系中的平移不同,二次函数平移后的顶点式中,h>0时,h越大,图像的对称轴离y轴越远,且在x轴正方向上,不能因h前是负号就简单地认为是向左平移。 具体可分为下面几种情况: 当h>0时,y=a(x-h)2的图象可由抛物线y=ax2向右平行移动h个单位得到;当h<0时,y=a(x-h)2的图象可由抛物线y=ax2向左平行移动|h|个单位得到;当h>0,k>0时,将抛物线y=ax2向右平行移动h个单位,再向上移动k个单位,就可以得到y=a(x-h)2+k的图象; 当h>0,k<0时,将抛物线y=ax2向右平行移动h个单位,再向下移动|k|个单位可得到y=a(x-h)2+k的图象;

当h<0,k>0时,将抛物线y=ax2向左平行移动|h|个单位,再向上移动k个单位可得到y=a(x-h)2+k的图象; 当h<0,k<0时,将抛物线y=ax2向左平行移动|h|个单位,再向下移动|k|个单位可得到y=a(x-h)2+k的图象。 ③交点式: y=a(x-x1)(x-x2) (a≠0) [仅限于与x轴即y=0有交点时的抛物线,即b2-4ac≥0] . 已知抛物线与x轴即y=0有交点A(x1,0)和B(x2,0),我们可设y=a(x-x1)(x-x2),然后把第三点代入x、y中便可求出a。 由一般式变为交点式的步骤: 二次函数 ∵x1+x2=-b/a,x1?x2=c/a(由韦达定理得), ∴y=ax2+bx+c =a(x2+b/ax+c/a) =a[x2-(x1+x2)x+x1?x2] =a(x-x1)(x-x2). 重要概念: a,b,c为常数,a≠0,且a决定函数的开口方向。a>0时,开口方向向上;a<0时,开口方向向下。a的绝对值可以决定开口大小。 a的绝对值越大开口就越小,a的绝对值越小开口就越大。 能灵活运用这三种方式求二次函数的解析式;

学生选课管理系统(数据库课程设计)

数据库系统原理及其应用教程 课程设计报告 设计题目选修课程管理系统的设计与实现 指导教师

摘要 随着计算机技术的日新月异,极大的推动的各个行业的信息化进程。各大高校也急需进行信息化改革,以促进教学质量和工作效率快速提升。 本文是在对各大高校全校公开课学生选课情况进行实地调查后,进行详细分析讨论后撰写的学生选课管理系统数据库设计报告。全文从最初的系统规划,到需求分析、概念设计、逻辑设计、物理设计。每一阶段都进行了详细的分析。接下来的实现、运行与维护阶段,还

进行了对本系统的测试,最后是本次项目开发的心得和体会以及本文的参考文献。 本系统主要功能是对学生选课及相关信息进行管理。较行业同类产品而言,本系统人机界面设计更加合理、人性化,用户操作简单方便。数据库的安全性更高,对用户访问权限进行了严格控制。数据存取速度更快,使用年限更长。可以很好的满足高校公开课学生选课的要求,极大的提高了学校的工作效率。 关键字:学生选课管理系统;分析;设计 目录 一、概述 (4) 1.1 设计背景 (34) 1.2 设计目的 (36) 1.3 设计内容 (39) 二、需求分析 (19) 2.1 功能分析 (7) 2.2 工作流图 (6) 2.3 数据流图 (7)

2.4 数据字典 (16) 三、概念模型设计 (18) 3.1 实体之间的联系 (18) 3.2 E-R图 (19) 四、逻辑设计 (26) 4.1 概念模型向关系模型的转换 (26) 4.2 概念模型的优化 (27) 五、源代码及查询截图 (29) 5.1 数据库的存储结构 (29) 5.2 实现 (32) 5.3 人机界面设计 (34) 5.4 系统测试 (36) 5.5 运行维护 (39) 六、总结 (40) 参考文献 (41) 一、概述 1.1设计背景 可行性研究的目的是用最小的代价在尽可能的短的时间内确定数据库系统是否可能开发、是否值得开发、是否可以开发(在该报告中主要是考查《学生选课管理系统》是否可能开发、是否值得开发、是否可以开发)。其实质是在较高层次上以较抽象方式进行的、简化的压缩的需求分析和概要设计过程。

网上选课系统可行性分析报告

网上选课系统可行性分析报告 1、引言 1.1 编写目的 开发网上选课管理系统是为了实现学校人力资源的优化和学生成绩管理的科学管理而设计的,更方便老师对学生的了解和学生对课程的安排,更有利于教课的进行。方便学生、管理者、老师获取学生信息。对学生信息将进行安全检测,包括真实性。通过试用本系统,可以更加有效的管理学生的学籍管理,成绩信息等,并且具有对信息的增加,查询,修改等功能。 1.2 项目背景 待开发项目名称:学生网上选课管理系统; 委托单位:黔南民族师范学院 开发单位:黔南民族师范学院的学生 主管部门:黔南民族师范学院的老师 用户:黔南民族师范学院 产品的所有权:黔南民族师范学院 项目开发者:马红霞、涂贵欢、毛必琴 项目背景: “学生选课系统”是指在网络上提供选修课服务,使学生能够在规定的时间内在网上选课或退课而系统马上能够返回该学生是否成功的信息,能查询课程信息、教师个人信息以及该程成绩。教师可提供说开课程的基本信息,同时还可以通过本系统查询选修课学生信息。教务管理员负责何时开放和关闭选课、发布信息、选课用户的管理和选课情况的监控等,并可以为教务管理员提供方便的管理功能:添加、删除、修改课程信息和学生记录等。随时完成统计工作,避免某门课的报名人数超出它的最大容量,而如果报名人数不足又有部分学生没选上课,将课程的选修过程设置为两次。本系统是选修课实现系统的自动化从而提高教务工作的效率。较为全

面的涵盖了学生从入学到毕业的全部信息,牵涉部门广各系部、学生办、财务部处等。 1.3 参考资料 [1] 吕云鹏王昕鹏邱玉龙编著.软件工程—理论与实践. 人民邮电出版社. [2]白度文库.wenku.baidu./view/fc6709115f0e7cd184253679.html [3]曾建潮.软件工程.武汉理工大学出版社. 2、可行性研究的前提 2.1 基本要求 主要功能:教师对学生资料、成绩以及所选课程进行修改管理;学生可通过查询自身成绩,自主选择相关课程,管理员(教务处)统管所有学生、教师的相关信息。 性能要求:所有数据实时更新保持同步,且定时备份。 输出要求:简单、快捷、实时。 输入要求:及时的修改和更新学生、教师和课程的信息。 安全与保密要求:系统本身配备一定的安全机制,保证各项数据的完整、正确。 每类用户进入系统时,均需输入唯一的用户名和密码;教师有权对学生所选课程成绩进行录入、查询和修改;学生有权对选修课程进行修改;管理员有权对学生信息、所选课程、科目成绩进行管理、修改。 完成期限:3个月 2.2 开发目标 (1)开发此学生选课管理系统软件,使教学人员及操作者进行选课管理,方便操作者随时添加、查询、修改,使工作人员从繁琐的填表,查表工作中解放出来,使得人力和设备减少; (2)使供需双方都获得满意的结果; (3)促进报表、统计数字的规范化;

学生选课管理系统(详细设计说明书)

1引言 (2) 1.1编写目的 (2) 1.2背景 (2) 1.3定义 (2) 1.4参考资料 (2) 2程序系统的结构 (3) 3程序1(标识符)设计说明 (7) 3.1程序描述 (7) 3.2功能 (8) 3.3性能 (8) 3.4输人项 (8) 3.5输出项 (9) 3.6算法 (9) 3.7流程逻辑 (9) 3.8接口 (10) 3.9存储分配 (11) 3.10注释设计 (11) 3.11限制条件 (11) 3.12测试计划 (11) 3.13尚未解决的问题 (11) 4程序2(标识符)设计说明....................................................................... 错误!未定义书签。

详细设计说明书 1引言 1.1编写目的 该详细设计说明书的目的在于根据需求说明书与概要设计说明书提出该系统的详细设计,即系统的详细架构,主要包括系统的模块划分、程序系统的结构、各个模块的流程以及各层次中每个程序的设计考虑。 1.2背景 软件系统名称:学生选课系统 软件实现计算机:方正科技 与其他系统和机构的相互管理:暂无。 1.3定义 图1 程序数据字典定义 1.4参考资料 1.《软件工程导论》(张海藩编著清华大学出版社2007年5月) 2.《数据库系统概论(第四版)》(王珊编著高等教育出版社2007年11月)

3.《Visualbasic程序设计》(吴定雪主编科学出版社) 2程序系统的结构 2.1 、管理员模块程序设计说明 ①人员管理:管理员在登录之后可以对系统内的人员(包括学生、教师等)进行管理, 包括对人员的信息进行查询、修改和删除等操作。 ②课程管理:管理员在后台添加、编辑课程的基本信息(包括授课教师、开课时间设定), 同时可以编辑系统开放选课的时间,在适当时间开启和关闭选课系统。 ③系统信息管理:管理员可对系统的基本信息进行编辑,对系统公告进行更改或者系统 标题、系统相关链接等。 ④系统权限管理:对不同的用户要分配不同的权限,管理员可设定不同人员对不同模块 的访问权限,允许或者拒绝不同用户对模块的增删查改操作。 图2.1管理员模块图 2.2、教师模块程序设计说明 (1)基本信息管理:此模块主要实现两个分支功能: ①个人信息修改和密码修改。在教师用户登录状态下,实现这些功能,通过对自己 的注册信息的修改满足用户的个性需求,能将注册信息及时反映个人状态,另外,密码修改则是很多网站都应具备的基本功能,能有效保护用户身份和网络安全。 ②其它基功能如学生查询,教师查询和留言查询,这三个功能都是在教师在线状态

学生选课系统需求规格说明书

学生选课系统需求规格说明书 学生选课系统需求规格说明书 姓名:潘园园 学号:1108210127 班级:11信管1班 1.文档介绍 (2) 1.1文档目的 (2) 1.2 文档的范围 (2) 1.3 读者对象 (2) 1.4 缩写说明 (2) 1.5 参考资料 (2) 2. 任务概述 (3) 2.1 项目的来源及背景 (3) 2.2 项目要达成的目标 (3) 2.3 系统总体业务流程分析 (3) 2.4 学生选课系统业务流程图 (4) 2.5 学生选课数据流程图 (5) 2.6 产品面向的用户群体 (6) 2.7 产品中的角色 (6) 2.8 产品范围 (6) 3. 功能需求 (7) 3.1 功能需求的分类 (7) 3.2 后台功能需求 (7)

3.2.1管理员信息管理 (7) 3.2.2 学生信息管理 (7) 3.2.3 教师信息管理 (7) 3.2.4 课程信息管理 (7) 3.2.5 教室信息管理 (7) 3.3 前台管理功能需求 (7) 3.3.1 登陆系统 (7) 3.3.2 个人信息资源管理 (8) 3.3.3 学生选课 (8) 3.3.4 教师反馈 (8) 3.3.5 退出系统 (8) 3.4 非功能性需求 (8) 3.4.1 用户界面需求 (8) 3.4.2 软件安全需求 (8) 3.4.3 产品质量需求 (8) 3.4.4 软件运行环境需求 (8) 3.4.5 其他需求 (8) 4.产品提交 (9) 1.文档介绍 1.1文档目的 本文档目的是在开发一个全面的用户需求系统,从多方面分析用户的需求以及尽量的满足。而此文档是关于学生选课的一个系统,我们知道,学生选课系统是专门为各个高校提供服务的一个平台,广泛的被各高校的学生和老师所用。

学生选课管理系统

软件项目管理 学生选课管理系统 项目名称: 组长 组员 提交时间: 2015年6月15日

学生选课管理系统 项目任务书 一、目的、要求 通过软件开发的实践训练,进一步掌握软件项目管理的方法和技术,提高软件开发的实际能力,培养工程设计能力和综合分析、解决问题的能力。 具体如下: 1.学习和实践在分析和设计计算机应用系统所需要的知识,包括面向对象 的系统分析与设计,软件项目管理,编码和测试方面的知识; 2.熟悉自动化的软件开发工具Rational Rose 2003,并将其运用于软件 开发的全过程; 3.进一步加强和提高软件工程文档的编写能力; 4.培养协作能力和团队精神。 二、主要内容 1.课题题目:学生选课系统,本系统要实现学生选课的基本功能,包括学生退选课,查看自己的选课信息;教师查看选课学生的信息,提交成绩; 管理员添加学生、管理学生、管理成绩、添加教师、管理教师和管理课 程等。 2.运用面向对象技术、UML及可视化的建模工具完成系统的需求分析与设计。 3.使用Rational Rose作为需求分析与设计的建模工具,包括静态建模和

动态建模,并利用对象模型自动生成数据模型,自动建立数据库。 4.采用分层模式的应用设计模式进行系统的设计实现。 5.系统要实现四个模块功能:教师模块、学生模块、管理员模块和公用模块。 6.初步建立系统原型,实现关键的功能,并对系统进行测试。 三、任务分配

学生选课管理系统 任务分解书(WBS)一.学生选课管理系统任务分解 1.1.1 项目规划 1.1.2 计划评审 1.2 需求开发 1.2.1 用户界面设计 1.2.2 用户需求评审 1.2.3 修改需求、修改用户界面 1.2.4 需求规格说明书 1.2.5 编写需求获取方法 1.2.6 编写需求跟踪矩阵 1.3 设计 1.3.1 概要设计 1.3.2 详细设计

求二次函数解析式的几种方法

沁乐教育沁心学习乐在其中 2015年秋季九年级数学辅导资料第二讲函数图像性质及应用 学校:姓名:

二次函数的图象与基本性质 (一)、知识点回顾 【知识点一:二次函数的基本性质】 【知识点二:抛物线的图像与a、b、c关系】 (1)a决定抛物线的开口方向:a>0,开口向________ ;a<0,开口向________ (2)c决定抛物线与________的位置:c>0,图像与y轴的交点在___________;

c=0,图像与y 轴的交点在___________;c<0,图像与y 轴的交点在___________; (3)a ,b 决定抛物线对称轴的位置,我们总结简称为:___________; (4)△=b 2-4ac 决定抛物线与________交点情况: △=b 2-4ac ?? ? ??<=>轴没有交点与轴有一个交点与轴有两个交点与x x x 000 【知识点三:二次函数的平移】 设0,0>>n m ,将二次函数2 ax y =向右平移m 个单位得到___________;向左平移m 个 单位得到___________;向上平移n 个单位得到___________;向下平移n 个单位得到___________。简单总结为___________,___________。 (注意:要用以上方法对二次函数图象进行平移,要先化成顶点式再操作) 【知识点四:二次函数与一元二次方程的关系】 二次函数)0(2 ≠++=a c bx ax y ,当0=y 时,即变为一元二次方程 )0(02≠=++a c bx ax ,从图象上来说,二次函数)0(2≠++=a c bx ax y 的图象与x 轴的 交点的横坐标x 的值就是方程)0(02 ≠=++a c bx ax 的根。 【知识点五:二次函数解析式的求法】 (1) 知抛物线三点,可以选用一般式:c bx ax y ++=2,把三点代入表达式列三元一次 方程组求解; (2) 知抛物线顶点或对称轴、最大(小)值可选用顶点式:k h x a y +-=2 )(;其中抛 物线顶点是),(k h ; (3) 知抛物线与x 轴的交点坐标为)0,(),0,(21x x 可选用交点式:

UML学生选课系统

UML统模语言 实验报告 实验名称:学生选课系统UML部署系(院):计算机科学学院 专业班级:软工11402 姓名:靳生栋 学号:201404621 指导教师:应霞

实验时间:2017.10.15—2017.10.21 实验地点:12教一楼B区机房 一.需求分析 网上选课系统是一个高等院校用来进行对学生选修课程管理的管理信息系统(MIS)。该信息系统能够为学生提供方便的选课功能,也能够提高高等院校对学生和教学管理的效率。网上选课系统的功能性需求包括以下容: (1)系统管理员负责系统的管理维护工作,维护工作包括课程的添加、删除和修改,对学生基本信息的添加、修改、查询和删除。 (2)学生通过客户机浏览器根据学号和密码进入选课界面,在这里学生可以进行查询已选课程、指定自己的选修课程以及对自己基本信息的查询。 满足上述需求的系统主要包括以下几个小的系统模块: (1)基本业务处理模块。基本业务处理模块主要用于实现学生通过合法认证登录到该系统中进行网上课程的选择和确定。 (2)信息查询模块。信息查询模块主要用于实现学生对选课信息的查询和自身信息的查询。 (3)系统维护模块。系统维护模块主要用于实现系统管理员对系统的管理和对数据库的维护,系统的管理包括学生信息、课程信息等信息的维护。数据库的维护包括数据库的备份、恢复等数据库管理操作。 二.创建系统用例模型 1.学生用例能够通过该系统进行如下活动: (1)查询选课信息。学生可以在查询界面了解可供自己选择的各门课程的详细信息。 (2)登录选课系统。学生能够根据自己的学号和密码登录选课系统,如果身份验证失败,不得进行下一步操作。如果通过身份验证才能进入下一个操作界面。

学生选课管理系统源代码

#include #include #include struct course { int num; char name[20]; char kind[20]; int ttime,mark,term; }c; struct student { int snum; int cnum; char cnam[20]; char snam[20]; }s[500]; int count;//全局变量 int main()//主函数 { int n; int menu(); int f1(); int luru(); int liulan(); int chaxun(); int xuanke(); int tongji(); printf("\n ********************** ***********************"); printf("\n\n ********** 欢迎进入学生选课系统!**********"); menu(); printf("\n"); printf(" ******************* the end *********************\n"); printf("\n ********************** ***********************"); printf("\n\n 请先选择1 进行课程信息录入:"); scanf("%d",&n);//防止错误,请重新输入 for(;n>5||n<0;) { printf("\n 输入错误!请重新输入!\n "); scanf("%d",&n); } while(n>0&&n<6) {

二次函数表达式三种形式练习题

1.把二次函数y=x2﹣4x+5化成y=a(x﹣h)2+k(a≠0)的形式,结果正确的是() A.y=(x﹣2)2+5 B.y=(x﹣2)2+1 C.y=(x﹣2)2+9 D.y=(x﹣1)2+1 2.将y=(2x﹣1)?(x+2)+1化成y=a(x+m)2+n的形式为() A.B.C.D. 3.与y=2(x﹣1)2+3形状相同的抛物线为()A.y=1+x2B.y=(2x+1)2 C.y=(x﹣1)2D.y=2x2 4.二次函数的图象的顶点坐标是(2,4),且过另一点(0,﹣4),则这个二次函数的解析式为() A.y=﹣2(x+2)2+4 B.y=﹣2(x﹣2)2+4 C.y=2(x+2)2﹣4 D.y=2(x﹣2)2﹣4 5.已知某二次函数的图象如图所示,则这个二次函数的解析式为() A.y=﹣3(x﹣1)2+3 B.y=3(x﹣1)2+3 C.y=﹣3(x+1)2+3 D.y=3(x+1)2+3 6.顶点为(6,0),开口向下,开口的大小与函数y=x2的图象相同的抛物线所对应的函数是() A.y=(x+6)2B.y=(x﹣6)2C.y=﹣(x+6)2D.y=﹣(x﹣6)2 7.已知二次函数的图象经过点(﹣1,﹣5),(0,﹣4)和(1,1),则这二次函数的表达式为() A.y=﹣6x2+3x+4 B.y=﹣2x2+3x﹣4 C.y=x2+2x﹣4 D.y=2x2+3x﹣4 8.若二次函数y=x2﹣2x+c图象的顶点在x轴上,则c等于()A.﹣1 B.1 C.D.2 9.如果抛物线经过点A(2,0)和B(﹣1,0),且与y轴交于点C,若OC=2.则这条抛物线的解析式是()A.y=x2﹣x﹣2 B.y=﹣x2﹣x﹣2或y=x2+x+2 C.y=﹣x2+x+2 D.y=x2﹣x﹣2或y=﹣x2+x+2 10.如果抛物线y=x2﹣6x+c﹣2的顶点到x轴的距离是3,那么c的值等于() A.8 B.14 C.8或14 D.﹣8或﹣14 11.二次函数的图象如图所示,当﹣1≤x≤0时,该函数的最大值是() A.3.125 B.4 C.2 D.0 12.当﹣2≤x≤1时,二次函数y=﹣(x﹣m)2+m2+1有最大值3,则实数m的值为() A.或﹣B.或﹣C.2或﹣D.或﹣ 13.如果一条抛物线经过平移后与抛物线y=﹣x2+2重合,且顶点坐标为(4,﹣2),则它 的解析式为. 14.二次函数的图象如图所示,则其解析式为. 15.若函数y=(m2﹣4)x4+(m﹣2)x2的图象是顶点在原点,对称轴是y轴的抛物线,则 m=. 16.二次函数图象的开口向上,经过(﹣3,0)和(1,0),且顶点到x轴的距离为2, 则该二次函数的解析式为. 17.如图,已知抛物线y=﹣x2+bx+c的对称轴为直线x=1,且与x轴的一个交点为(3,0), 那么它对应的函数解析式是. 18.二次函数y=ax2+bx+c的图象经过A(﹣1,0)、B(0,﹣3)、C(4,5)三点,求出 抛物线解析式. 19.二次函数图象过点(﹣3,0)、(1,0),且顶点的纵坐标为4,此函数关系式为. 20.如图,一个二次函数的图象经过点A,C,B三点,点A的坐标为(﹣1,0),点B的坐标为 (4,0),点C在y轴的正半轴上,且AB=OC.则这个二次函数的解析式是. 21.坐标平面内向上的抛物线y=a(x+2)(x﹣8)与x轴交于A、B两点,与y轴交于C点,若 ∠ACB=90°,则a的值是.

一级节点标准

生产计划一级节点标准 为进一步加强对计划落实工作的考核力度,保证生产经营工作按公司计划得到有效落实,从而促进公司快速、健康发展,特对房地产开发流程中重要工程建设节点的完成标准强调说明如下: 一、总规报批:指“拟开工项目总规手续完备,项目后续工作能够紧前进行。 (一)项目总规报批需完善的手续: 1、土地出让合同签订完成,经过确权,办理完成国有土地使用权证; 2、拟开项目市场定位报告完成公司审批; 3、项目预算通过公司审批完成; 4、规划方案通过公司及政府的批复,完成政府图审盖章,具备施工图设计的条件; 5、完成建设用地规划许可证的办理。 二、施工图纸:指“项目单体各专业施工图纸(建筑、结构、水暖、电等)设计完成,并通过分公司的内部审核及政府的图审后,施工图纸到达总部预结算部”。 该节点包含内容有: (一)项目所在地块完成地勘并出具正式地勘报告。 (二)项目各专业图纸符合施工图设计深度及标准(根据开发进度及批次划分,外线、园林图纸可适当后延,在主体封顶前完成即可); (三)项目各专业图纸经分公司内审,并根据内审意见调整完成。 (四)项目各专业图纸完成图纸外审,并根据审核意见调整完成,取得图审合格证。 (五)完整的施工图纸到达总部预结算部,并具备施工图预算的条件。 三、预算:指“项目各专业预算工作完成,预算成果满足招标采购需求”。 该节点包含内容有: (一)根据项目标段及各专业界面划分完成预算委托并签订委托合同。

(二)根据预算委托完成项目预算,成果经公司预决算部审核并经采购部确认,满足项目招标采购需求。 四、单规:指“完成批次开发内各单体建设工程规划许可证的办理”。 该节点包含内容有: (一)根据当地政府主管部门要求,完成相应报批文件资料及费用的缴纳。 (二)单规报批完成,并取得建设工程规划许可证。 五、招标:指“在总部职能部门的监督下,在经分公司考察合格的总包供应商选择范围内,完成对拟开批次的总包供应商的选择,完成公司定标报告的审批”。 所有投标单位必须经过以分公司生产副总为第一责任人的招标小组的考察,完成相应的招标文件、定标报告。 六、项目开工:指“开工手续完备,或拟开工项目现场有实际开工动作能够保证连续生产这一系列事件的总和”。 (一)项目开工前应完备以下开工手续: 1、国有土地使用权证; 2、建设用地规划许可证; 3、建设工程规划许可证; 4、建筑工程施工许可证; (二)项目现场实际开工动作为下列情况之一: 1、破土开槽; 2、桩基施工; 3、褥垫层施工; (三)项目能够保证连续生产的条件有: 1、总包合同签订,施工单位现场管理人员已到位,主要机械、机具、施工人员已进场; 2、监理机构已进驻现场; 3、由建设单位、监理单位、施工单位和设计单位参加的图纸会审已经完成;

uml描述网上选课系统

6 网上选课系统 网上选课系统的产生是因为目前高校扩招后,在校学生日益增多。如果仍然通过传统的纸上方式选课,既浪费大量的人力物力,又浪费时间。同时,在人为的统计过程中不可避免出现的错误。因此,通过借助网络系统,让学生只要在电脑中输入自己的个人选课信息来替代有纸化的手工操作成为高校管理的必然趋势。该信息系统能够为学生提供方便的选课功能,也能够提高高等院校对学生和教学管理的效率。 6.1需求分析 网上选课系统的功能性需求包括以下内容: (1)系统管理员负责系统的管理维护工作,维护工作包括课程的添加、删除和修改,对学生基本信息的添加、修改、查询和删除。 (2)学生通过客户机浏览器根据学号和密码进入选课界面,在这里学生可以进行查询已选课程、指定自己的选修课程以及对自己基本信息的查询。 满足上述需求的系统主要包括以下几个小的系统模块: (1)基本业务处理模块。基本业务处理模块主要用于实现学生通过合法认证登录到该系统中进行网上课程的选择和确定。 (2)信息查询模块。信息查询模块主要用于实现学生对选课信息的查询和自身信息的查询。 (3)系统维护模块。系统维护模块主要用于实现系统管理员对系统的管理和对数据库的维护,系统的管理包括学生信息、课程信息等信息的维护。数据库的维护包括数据库的备份、恢复等数据库管理操作。 6.2系统建模 在系统建模以前,我们首先需要在Rational Rose 2003中创建一个模型。并命名为“网上选课系统”,该名称将会在Rational Rose 2003的顶端出现,如下图6-1所示。 图6-1创建项目系统模型

6.2.1创建系统用例模型 创建系统用例的第一步是确定系统的参与者。网上选课系统的参与者包含二种,分别是Student(学生)和SystemManager(系统管理员),如图6-2所示。 图6-2 系统参与者 然后,我们根据参与者的不同分别画出各个参与者的用例图。 1. 学生用例图:学生在本系统中的可以进行登录、查询课程、选择课程和查询个人信 息的相关操作。通过这些活动创建的学生用例图如图6-3所示。 图6-3 学生用例图图6-4系统管理员用例图 2. 系统管理员用例图:系统管理员在本系统中能够进行登录、修改学生信息、添加、修改和删除课程、添加和删除学生信息的相关操作。通过这些活动创建的系统管理员用例图如图6-4所示。 6.2.2创建系统静态模型 从前面的需求分析中,我们可以根据主要的五个类对象:学生类、系统管理员类、课程类、数据控制类和界面类创建完整的类图如图6-5所示。 图6-5 系统类图 6.2.3创建系统动态模型 系统的动态模型可以使用交互作用图、状态图和活动图来进行描述。

相关文档
相关文档 最新文档