Tuesday, 16 June 2009

ADVANCE DATABASE_assignment

Stored Procedures

A stored procedure is a subroutine available to applications accessing a relational database system.

It is actually stored in the database data dictionary.

Typical uses for stored procedures include data validation (integrated into the database) or access control mechanisms. Furthermore, stored procedures are used to consolidate and centralize logic that was originally implemented in applications. Large or complex processing that might require the execution of several SQL statements is moved into stored procedures, and all applications call the procedures only.


Cursors

A cursor is a moving placement or pointer that indicates a position. English-speakers have used the term with this meaning since the 16th century, for a wide variety of movable or mobile position-markers.

The literal meaning of the original Latin word cursor expresses the idea of someone or something that runs. Especially in the plural, Cursores 'runners', it was the name of certain functions, originally messengers. Cursor was also a Roman cognomen used by gens Papiria.

The word cursor may refer to any of the following:

  • Cursor (slide rules)
  • Cursor (typewriters)
  • Cursor (computers)
  • Cursor (databases)
  • Cursor (magazine), an early computer-based "magazine" that was distributed on cassette in the late 1970s. Each issue contained programs, utilities, and games and was a forerunner of today's computer magazines that come packaged with CD-ROMs and DVD-ROMs. Cursor was produced for users of the Commodore PET.
  • Cursor, a holographic sidekick character from the TV series Automan, with the ability to "draw" physical objects in real space


Embedded - SQL

Embedded SQL is a method of combining the computing power of a programming language and the database manipulation capabilities of SQL. Embedded SQL statements are SQL statements written inline with the program source code of the host language. The embedded SQL statements are parsed by an embedded SQL preprocessor and replaced by host-language calls to a code library. The output from the preprocessor is then compiled by the host compiler. This allows programmers to embed SQL statements in programs written in any number of languages such as: C/C++, COBOL and Fortran.

The ANSI SQL standards committee defined the embedded SQL standard in two steps: a formalism called Module Language was defined, then the embedded SQL standard was derived from Module Language.[1] The SQL standard defines embedding of SQL as embedded SQL and the language in which SQL queries are embedded is referred to as the host language. A popular host language is C. The mixed C and embedded SQL is called Pro*C in Oracle and Sybase database management systems. In the PostgreSQL database management system this precompiler is called ECPG. Other embedded SQL precompilers are Pro*Ada, Pro*COBOL, Pro*FORTRAN, Pro*Pascal, and Pro*PL/I.


Trigger

In computing:

OPERSEA_"assignment"

Quantitative Analysis
A business or financial analysis technique that seeks to understand behavior by using complex mathematical and statistical modeling, measurement and research. By assigning a numerical value to variables, quantitative analysts try to replicate reality mathematically.
Quantitative analysis can be done for a number of reasons such as:
-measurement
-performance evaluation or valuation of a financial instrument
-it can also be used to predict real world events such as changes in a share price
The process of determining the value of a security by examining its numerical, measurable characteristics such as revenues, earnings, margins, and market share.

Decision Theory
Decision theory in mathematics and statistics is concerned with identifying the values, uncertainties and other issues relevant in a given decision and the resulting optimal decision. It is sometimes called game theory.
Decision theory is a body of knowledge and related analytical techniques of different degrees of formality designed to help a decision maker choose among a set of alternatives in light of their possible consequences.
Decision theory can apply to conditions of certainty, risk, or uncertainty. [decision UNDER certainty] means that each alternative leads to one and only one consequence, and a choice among alternatives is equivalent to a choice among consequences.

Decision Tree
A decision tree (or tree diagram) is a decision support tool that uses a tree-like graph or model of decisions and their possible consequences, including chance event outcomes, resource costs, and utility. Decision trees are commonly used in operations research, specifically in decision analysis, to help identify a strategy most likely to reach a goal. Another use of decision trees is as a descriptive means for calculating conditional probabilities.

Forecasting
Forecasting is the process of estimation in unknown situations. Prediction is a similar, but more general term. Both can refer to estimation of time series, cross-sectional or longitudinal data. Usage can differ between areas of application: for example in hydrology, the terms "forecast" and "forecasting" are sometimes reserved for estimates of values at certain specific future times, while the term "prediction" is used for more general estimates, such as the number of times floods will occur over a long period. Risk and uncertainty are central to forecasting and prediction. Forecasting is used in the practice of Customer Demand Planning in every day business forecasting for manufacturing companies. The discipline of demand planning, also sometimes referred to as supply chain forecasting, embraces both statistical forecasting and a consensus process.
Forecasting is commonly used in discussion of time-series data.

Linear Programming
Linear programming, sometimes known as linear optimization, is the problem of maximizing or minimizing a linear function over a convex polyhedron specified by linear and non-negativity constraints. Simplistically, linear programming is the optimization of an outcome based on some set of constraints using a linear mathematical model.

Wednesday, 4 February 2009

restaurant_theodbs_assignment



Public listX As Integer

Private Sub cmdback_Click(Index As Integer)

If listX = 0 Then

MsgBox "Well, there is no more ingredient in the list!", vbOKOnly

Else

listX = listX - 1

Listing.Enabled = True

Listing.RemoveItem (listX)

End If

End Sub

Private Sub cmdGo_Click(Index As Integer)

Listing.Enabled = True

Listing.List(listX) = dataIngdts.Text

listX = listX + 1

End Sub

Private Sub combomenu_Click()

Dim data As ADODB.Recordset

Set data = New ADODB.Recordset

If DataEnvironment1.Connection1.State = adstateclose Then

DataEnvironment1.Connection1.Open

End If

If combomenu.Text = "Chicken Salad" Then

data.Open "SELECT tblmadewith.quantity,tblmadewith.unit, tblingredients.name FROM tblmadewith,tblingredients WHERE tblmadewith.itemid = 'CHKSD' and tblingredients.ingredientid = tblmadewith.ingredientid;", DataEnvironment1.Connection1, adOpenDynamic, adLockOptimistic

Set dataIngdts.DataSource = data

ElseIf combomenu.Text = "Chicken N Suds" Then

data.Open "SELECT tblmadewith.quantity,tblmadewith.unit, tblingredients.name FROM tblmadewith,tblingredients WHERE tblmadewith.itemid = 'CKSDS' and tblingredients.ingredientid = tblmadewith.ingredientid;", DataEnvironment1.Connection1, adOpenDynamic, adLockOptimistic

Set dataIngdts.DataSource = data

ElseIf combomenu.Text = "Fruit Plate" Then

data.Open "SELECT tblmadewith.quantity,tblmadewith.unit, tblingredients.name FROM tblmadewith,tblingredients WHERE tblmadewith.itemid = 'FRPLT' and tblingredients.ingredientid = tblmadewith.ingredientid;", DataEnvironment1.Connection1, adOpenDynamic, adLockOptimistic

Set dataIngdts.DataSource = data

ElseIf combomenu.Text = "Fruit Salad" Then

data.Open "SELECT tblmadewith.quantity,tblmadewith.unit, tblingredients.name FROM tblmadewith,tblingredients WHERE tblmadewith.itemid = 'FRTSD' and tblingredients.ingredientid = tblmadewith.ingredientid;", DataEnvironment1.Connection1, adOpenDynamic, adLockOptimistic

Set dataIngdts.DataSource = data

ElseIf combomenu.Text = "Garden Salad" Then

data.Open "SELECT tblmadewith.quantity,tblmadewith.unit, tblingredients.name FROM tblmadewith,tblingredients WHERE tblmadewith.itemid = 'GDNSD' and tblingredients.ingredientid = tblmadewith.ingredientid;", DataEnvironment1.Connection1, adOpenDynamic, adLockOptimistic

Set dataIngdts.DataSource = data

ElseIf combomenu.Text = "Millenium Salad" Then

data.Open "SELECT tblmadewith.quantity,tblmadewith.unit, tblingredients.name FROM tblmadewith,tblingredients WHERE tblmadewith.itemid = 'MILSD' and tblingredients.ingredientid = tblmadewith.ingredientid;", DataEnvironment1.Connection1, adOpenDynamic, adLockOptimistic

Set dataIngdts.DataSource = data

ElseIf combomenu.Text = "Soda" Then

data.Open "SELECT tblmadewith.quantity,tblmadewith.unit, tblingredients.name FROM tblmadewith,tblingredients WHERE tblmadewith.itemid = 'SODA' and tblingredients.ingredientid = tblmadewith.ingredientid;", DataEnvironment1.Connection1, adOpenDynamic, adLockOptimistic

Set dataIngdts.DataSource = data

ElseIf combomenu.Text = "Vegan Eatin'" Then

data.Open "SELECT tblmadewith.quantity,tblmadewith.unit, tblingredients.name FROM tblmadewith,tblingredients WHERE tblmadewith.itemid = 'VGNET' and tblingredients.ingredientid = tblmadewith.ingredientid;", DataEnvironment1.Connection1, adOpenDynamic, adLockOptimistic

Set dataIngdts.DataSource = data

ElseIf combomenu.Text = "Water" Then

data.Open "SELECT tblmadewith.quantity,tblmadewith.unit, tblingredients.name FROM tblmadewith,tblingredients WHERE tblmadewith.itemid = 'WATER' and tblingredients.ingredientid = tblmadewith.ingredientid;", DataEnvironment1.Connection1, adOpenDynamic, adLockOptimistic

Set dataIngdts.DataSource = data

End If

End Sub



Friday, 14 November 2008

RDBMS

Definition:
RDBMS is the abbreviation for "relational database management system", a system for the creation, manipulation, and deletion of relational databases in part or in toto. Well known RDBMS systems are PostgreSQL, MySQL, Oracle, and Access. Almost all modern RDBMS use SQL for their statements.


RDBMS refers to a relational database plus supporting software for managing users and processing SQL queries, performing backups/restores and associated tasks.

RDBMS usually include an API so that developers can write programs that use them.

Typical RDBMS include

  • Microsoft Access
  • Microsoft SQL Server
  • Sybase (The forerunner of Microsoft SQL Server)
  • IBM DB2
  • Oracle
  • Ingres
  • MySQL
  • Postgresql
And many more.


History of RDBMS

E. F. Codd introduced the term in his seminal paper "A Relational Model of Data for Large Shared Data Banks", published in 1970. In this paper and later papers he defined what he meant by relational. One well-known definition of what constitutes a relational database system is Codd's 12 rules. However, many of the early implementations of the relational model did not conform to all of Codd's rules, so the term gradually came to describe a broader class of database systems. At a minimum, these systems:

  • presented the data to the user as relations (a presentation in tabular form, i.e. as a collection of tables with each table consisting of a set of rows and columns, can satisfy this property)
  • provided relational operators to manipulate the data in tabular form

The first systems that were relatively faithful implementations of the relational model were from the University of Michigan; Micro DBMS (1969) and from IBM UK Scientific Centre at Peterlee; IS1 (1970–72) and its followon PRTV (1973–79). The first system sold as an RDBMS was Multics Relational Data Store, first sold in 1978. Others have been Berkeley Ingres QUELIBM BS12. and

The most popular definition of an RDBMS is a product that presents a view of data as a collection of rows and columns, even if it is not based strictly upon relational theory. By this definition, RDBMS products typically implement some but not all of Codd's 12 rules.

A second, theory-based school of thought argues that if a database does not implement all of Codd's rules (or the current understanding on the relational model, as expressed by Christopher J Date, Hugh Darwen and others), it is not relational. This view, shared by many theorists and other strict adherents to Codd's principles, would disqualify most DBMSs as not relational. For clarification, they often refer to some RDBMSs as Truly-Relational Database Management Systems (TRDBMS), naming others Pseudo-Relational Database Management Systems (PRDBMS).

Almost all commercial relational DBMSes employ SQL as their query language. Alternative languages have been proposed and implemented, but very few have become commercial products.