The declaration statements are used to name and define procedures, variables, properties, arrays, and constants. When you declare a programming element, you can also define its data type, access level, and scope.
The programming elements you may declare include variables, constants, enumerations, classes, structures, modules, interfaces, procedures, procedure parameters, function returns, external procedure references, operators, properties, events, and delegates.
Following are the declaration statements in VB.Net:
|S.N||Statements and Description||Example|
Declares and allocates storage space for one or more variables.
|Dim number As IntegerDim quantity As Integer = 100Dim message As String = “Hello!”|
Declares and defines one or more constants.
|Const maximum As Long = 1000Const naturalLogBase As Object = CDec(2.7182818284)|
Declares an enumeration and defines the values of its members.
|Enum CoffeeMugSize Jumbo ExtraLarge Large Medium SmallEnd Enum|
Declares the name of a class and introduces the definition of the variables, properties, events, and procedures that the class comprises.
|Class BoxPublic length As DoublePublic breadth As Double Public height As DoubleEnd Class|
Declares the name of a structure and introduces the definition of the variables, properties, events, and procedures that the structure comprises.
|Structure BoxPublic length As Double Public breadth As Double Public height As DoubleEnd Structure|
Declares the name of a module and introduces the definition of the variables, properties, events, and procedures that the module comprises.
|Public Module myModuleSub Main()Dim user As String = InputBox(“What is your name?”) MsgBox(“User name is” & user)End Sub End Module|
Declares the name of an interface and introduces the definitions of the members that the interface comprises.
|Public Interface MyInterface Sub doSomething()End Interface|
Declares the name, parameters, and code that define a Function procedure.
|Function myFunction(ByVal n As Integer) As Double Return 5.87 * nEnd Function|
Declares the name, parameters, and code that define a Sub procedure.
|Sub mySub(ByVal s As String) ReturnEnd Sub|
Declares a reference to a procedure implemented in an external file.
|Declare Function getUserNameLib “advapi32.dll” Alias “GetUserNameA” ( ByVal lpBuffer As String, ByRef nSize As Integer) As Integer|
Declares the operator symbol, operands, and code that define an operator procedure on a class or structure.
|Public Shared Operator +(ByVal x As obj, ByVal y As obj) As obj Dim r As New obj’ implemention code for r = x + y Return r End Operator|
Declares the name of a property, and the property procedures used to store and retrieve the value of the property.
|ReadOnly Property quote() As String Get Return quoteString End Get End Property|
Declares a user-defined event.
|Public Event Finished()|
Used to declare a delegate.
|Delegate Function MathOperator( ByVal x As Double, ByVal y As Double ) As Double|
Posted By-: Vissicomp Technology Pvt. Ltd.
Website -: http://www.vissicomp.com
Components of the Database System Environment
There are five major components in the database system environment and their interrelationship are –
1. Hardware: The hardware is the actual computer system used for keeping and accessing the database.
2. Software: The software is the actual DBMS. Between the physical databases itself (i.e. the data as actually stored) and the users of the system is a layer of software, usually called the Database Management System or DBMS. All requests from users for access to the database are handled by the DBMS. One general function provided by the DBMS is thus the shielding of database users from complex hardware-level detail.
3. Data: It is the most important component of DBMS environment from the end users point of view. As shown in figure that data acts as a bridge between the machine components and the user components. The database contains the operational data and the meta-data, the ‘data about data’.
4. Users: There are a number of users who can access or retrieve data on demand using the applications and interfaces provided by the DBMS. Each type of user needs different software capabilities. The users of a database system can be classified in the following groups, depending on their degrees of expertise or the mode of their interactions with the DBMS. The users can be:
• Naive Users
• Online Users
• Application Programmers
• Sophisticated Users
• Data Base Administrator (DBA)
5. Procedures: Procedures refer to the instructions and rules that govern the design and use of the database. The users of the system and the staff that manage the database require documented procedures on how to use or run the system.
These may consist of instructions on how to:
• Log on to the DBMS.
• Use a particular DBMS facility or application program.
• Start and stop the DBMS.
• Make backup copies of the database.
• Handle hardware or software failures.
Posted by VissiComp Technology Pvt Ltd http://www.vissicomp.com