Sunday, 30 September 2012

Simple SQL scripts for beginners that allows to manage database easily

SQL i.e. Structured Query language is used to access the database. It is also used to build various websites. There are various commands used in sql are: Create, Insert, Delete, Update, Select, Join, Distinct, etc.  
SQL scripts/codes for:
  1. Creating table in SQL.
  2. Inserting data into table.
  3. Selecting data from table.
  4. Updating data into table.
  5. Deleting table.

1. Code for creating a table in SQL:


/*   Table Name: T_Person   */

CREATE TABLE T_Person
(
P_ID int,
LastName  varchar(50),
FirstName  varchar(50),
Address  varchar(50),
City  varchar(50)
)

P_ID        LastName        FirstName        Address        City         

2. Code for inserting data into table:


/*   Table Name: T_Person   */

INSERT INTO T_Person
VALUES(1, 'utreja', 'jeenu', 'Anand Nagar', 'Rajpura')

P_ID        LastName        FirstName        Address                City
1               utreja                jeenu                 Anand Nagar        Rajpura

3. Code for selecting data from table:


/*   Table Name: T_Person   */

SELECT * FROM T_Person

P_ID        LastName        FirstName        Address                 City
1               utreja                jeenu                 Anand Nagar         Rajpura
2               kapoor             pihu                   Bakken 22             Stavanger
3               sharma            pooja                 Storgt 20                Sandnes

4. Code for updating data into table:


/*   Table Name: T_Person   */

UPDATE T_Person
SET Address='Timoteivn 10', City='Sandnes'
WHERE LastName='gupta' AND FirstName='khushi'


P_ID        LastName        FirstName        Address                 City
1               utreja                jeenu                 Anand Nagar         Rajpura
2               kapoor             pihu                   Bakken 22             Stavanger
3               sharma            pooja                 Storgt 20                Sandnes
4               gupta               khushi                Timoteivn 10          Sandnes

5. Code for deleting data from table:


/*   Table Name: T_Person   */

DELETE * FROM T_Person




Wednesday, 19 September 2012

Collecting Data Items

Computers are usually good at dealing with large amounts of data. In our daily work as developer, we will find it necessary to store data in an orderly way. The .NET framework supports dealing with data in the way by providing a wide range of collections to store our data in. For every collection job, the .NET Framework supplies a solution. 

Types of Collections

The .NET Framework's System.Collections namespace supports several types of collections. These collections are classes that support the gathering of information in an orderly way. Various types of collections are:

        Name                                                         Description 

  • ArrayList                                                  A simple resizable, index-based collection of bytes
  • SortedList                                               A sorted collection of name/value pairs of objects.
  • Queue                                                     A first-in, first-out collection of objects.
  • Stack                                                      A last-in, first-out collection of objects.
  • BitArray                                                  A compact collection of Boolean values.
  • StringCollection                                    A simple resizeable collection of strings. 
  • LastDictionary                                      An efficient collection to store small lists of objects.

Adding and Removing Items

The ArrayList class is a simple, unordered container for objects of any type. Adding items to and removing items from the class is very straightforward. The Add method allows us to add a single object to the collection. We can use the Add method to store any object in .NET. For example:
In C#
coll.Add("hi");
In contrast, the RemoveAt method removes an item at a particular index within the collection. For example:
In C#
coll.RemoveAt(0);

Iterating Over Items

A collection is not very useful unless we can walk through the items in it. The ArrayList supports several ways to iterate over its contents. The ArrayList supports a numeric indexer that allows us to writesimple code to show the items in order. For example: 
In C#
for(int x=0; x<coll.count; ++x)
{
Console.WriteLine(coll[x]);
}

Sunday, 2 September 2012

Multimedia Presentation and Authoring

The digital representation of multimedia data simplifies many of the problems that have limited the use of analog audio and video editing systems to specialists. The most powerful contemporary authoring tools use a programming paradigm to allow complex interaction and synchronization relationships to be defined. These programming facilities are typically provided through either a scripting language or an iconic visual programming interface. Individual media types are edited using separate media-specific editors. 

Introduction:

Authoring and presentation systems are the software programs that allow people to create and deliver an experience for an end user. This experience can take many forms, from a computer based training course to a room-sized presentation or a virtual- reality environment requiring head mounted displays and spatial input gloves. The common denominator across all of these forms is that the experience is an interactive one: the end user interacts with the programs on the computer by providing input which affects the output from the computer. Authoring software is designed to support the creation of an interactive nonlinear experience in the sense that there are several pathways through the material , so the end user can make choices about where to go in the presentation, as well as how long to view each screen. There are often a variety of statistical reporting utilities included for the trainer as well. Presentation packages are designed to support the same media types, but without support for testing, scorekeeping, or tracking of end users. Presentation packages usually have a single price and simply offer different modes for creation and playback.