- SQL stands for Structure Query Language. It is also known as SEQUEL.
- In SEQUEL, we use simple English keywords to interact with the database and get information.
- A SQL, is used to create a table or a database. It is also used to store data into the database, also to modify data in database.
- It is also used to manipulate data in the database. We can use truncate, delete, drop data from the database for manipulation.
- A table is a database object which can store the information in the form of rows and columns.
- Table holds user data.
- Every column of the table has a specific datatype.
- Oracle ensures that, the data which is stored is identical with the datatype of the column.
- The SQL language has several parts -
- Data Definition Language(DDL) - It provides commands for defining relation schemas, deleting relations and modifying relation schemas.
- Data Manipulation language(DML) - It provides the ability to query information from the database and to insert tuples into, delete tuples from, and modify tuples in database.
- Integrity - It includes commands for specifying integrity constraints that the data stored in the database must satisfy. Updates that violate integrity constraints are disallowed.
- View Definition - It includes commands for defining views.
- Transaction Control - It includes commands for specifying the beginning and the ending of transaction.
We present you with an opportunity to know about a lot of things as we progress into the world of Digitization.
Tuesday, 13 September 2016
SQL - Introduction
Monday, 12 September 2016
[program] Hello World
[program 1]
Hello guys, today we will try the famous "Hello World" program. Here's the code:
1: #include<stdio.h>
2: void main()
3: {
4: printf("Hello World");
5: }
Okay, now lets understand the program.
- As stated earlier, "#" is a pre-processor directive. It says the compiler to perform a task before any further execution. "include" is the type of work that is to be done in pre-processing. It includes the header file "stdio.h" with the source code. "stdio.h" is a library header file which contains the codes to implement various input/output operations.
- Then comes the main() function. We know that al lfunctions are user defined functions, but this isn't entirely true. The main function is different. In C programming Language main function is user implemented (user defined) whose declaration is fixed in the compiler. hence we can say that main() is predefined and user defined too because programmer has to write function's body.
Actually
main() is an entry point of a program, from where program’s execution starts.
Program’s execution starts from main(). Main is a thread/process/function which is invoked by operating system automatically when program is being executed.
There are many flavors of main function, flavors means prototypes. One that we used commonly
int main(void)
– it means main will return an integer value after or between in the program’s execution and void represents that there are no argument passing.
You can also pass arguments while writing main the syntax is
int main(int argc, char **argv){...}
One can also use,
void main()
- it means the main function will return void to the OS. - Printf is a function, a library function at that which is provided by stdio.h header file. When declared it prints the desired information in the console's screen. Note that it is terminated with a semicolon(;), this is a terminator. It terminates the line there. Every line in a program should be terminated with a semicolon.
In case if you want to write the program using int main(),here is the code:
1: #include<stdio.h>
2: int main()
3: {
4: printf("Hello world");
5: return 0;
6: }
In case you are wondering, what is this "return 0 "and why didn't we write earlier.
Well we used void main() earlier. It is the same as int main() with return 0 . As we don't want the program to return anything to the OS, we can use void main() or use int main() with return 0.
Note -:
Void main() is only used by some compilers in C. Make sure your compiler supports it to use it.
Turbo C supports void main() for C programming.
Sunday, 11 September 2016
Database: Introduction
Hello guys,
We all use computers today.With this growing use of the computers,it is fair to say that databases play a critical role in almost all areas where computers are used,including business,electronic commerce,engineering,medicine,law,education and library science.So,starting with what is a database?
These data are mostly stored in a indexed address book or using software such as Microsoft access or excel.This collection or related data with an implicit meaning is a database.
We all use computers today.With this growing use of the computers,it is fair to say that databases play a critical role in almost all areas where computers are used,including business,electronic commerce,engineering,medicine,law,education and library science.So,starting with what is a database?
- A database is a collection of related data.By data,we mean known facts that can be recorded and that have implicit meaning.
These data are mostly stored in a indexed address book or using software such as Microsoft access or excel.This collection or related data with an implicit meaning is a database.
- A database can be of any size and complexity.An example of a large commercial database is Amazon.com.
- A database may be generated and maintained manually or it may be computerized.A computerized database may be created and maintained either by a group of application programs written specifically for that task or by a database management system.
Tuesday, 16 August 2016
Variable Declaration and Initialization
Variable Declaration
The general form is-
data_type variablename1, variablename2, variablename3, ..., variablenameN;
Initialization
When a variable is declared, the C compiler doesn't assign any value to the variable, unless it is instructed to do so. Such declaration is called a tentative declaration. When such declaration is made garbage value(a random value) is stored in the variable.
for example-
int i; // This declaration is tentative
int x;
x=i+5;
Variable is not assigned any known value and contains a garbage value. Therefore the vlaue of x is not defined. This is a bug in the program.
To prevent such pitfalls, always assign a value to the variable during the declaration of the variables. This is known as Initialization.
for example-
int i=10;
int x;
x=i+5;
In this declaration the value of x is 15.
- Declaration introduces one or more variables within a program. it reserves memory for the variable.
- A declaration statement begins with the type, followed by the name of one or more variables.
The general form is-
data_type variablename1, variablename2, variablename3, ..., variablenameN;
- Variables are declared a three basic places.
- When these are declared inside a function, they are called local variables.
- When the variables are declared in the definition of the function parameters, these are called formal parameters.
- When variables are declared outside all functions, the are called global variables.
![]() |
| Local Variable Declaration |
![]() |
| Formal Parameter |
![]() |
| Global Variable Declaration |
- Variables when used in expressions are also referred to as operands.
Initialization
When a variable is declared, the C compiler doesn't assign any value to the variable, unless it is instructed to do so. Such declaration is called a tentative declaration. When such declaration is made garbage value(a random value) is stored in the variable.
for example-
int i; // This declaration is tentative
int x;
x=i+5;
Variable is not assigned any known value and contains a garbage value. Therefore the vlaue of x is not defined. This is a bug in the program.
To prevent such pitfalls, always assign a value to the variable during the declaration of the variables. This is known as Initialization.
for example-
int i=10;
int x;
x=i+5;
In this declaration the value of x is 15.
Saturday, 13 August 2016
Representation of a variable in memory
- It may be mentioned that a computer provides a Random Access Memory (RAM) for storing the executable program code and the data the program manipulates.
- This memory can be thought of as a contiguous sequence of bits, each o which is capable storing a binary digit .
- Typically, the memory is also divided into groups of eight consecutive bits (called bytes). These bytes are sequentially addressed.
int salary = 65000;
It causes the compiler to allocate a few bytes to represent salary. The binary conversion of 65000 is 1111110111101000. the compiler uses the addresses of the first byte at which salary is allocated to refer to it. As it is int 2 bytes of memory is allocated.
![]() |
| A two-byte integer whose address is 1215 |
Thursday, 11 August 2016
Data Types of C
![]() | ||
| Classification Of data types |
- C has five Basic data types -
- Character - keyword used is char.
- Integer - keyword used is int.
- Floating Point - keyword used is float.
- Double precision floating point - keyword used is double.
- Void - keyword used is void.
- C has four type qualifiers also known as type modifiers. They precede the basic data types.
- short
- long
- signed
- unsigned
- A type modifier alters the meaning of the base data type to yeild a new type. The following points should be noted.
- Each of these modifiers can be applied to the base type int .
- The modifiers signed and unsigned can also be applied to the base type char.
- In addition long can be applied to double.
- When the base type is omitted from a declaration, int is assumed.
- A complete list of possible data types is mentioned below.
- bool
- char
- unsigned char
- signed char
- int
- unsigned int
- signed int
- short int
- unsigned short int
- long int
- unsigned long int
- signed long int
- float
- double
- long double
- Then there are three types of Derived data types -
- Array
- It is a collection of similar type of data (or data types) stored in contiguous memory location
- Function
- A function is a group of statements that together perform a task. Every C program has at least one function, which is main(), and all the most trivial programs can define additional functions. You can divide up your code into separate functions.
- Pointer
- A pointer is a variable which contains the address in memory of another variable. We can have a pointer to any variable type.
- Array
- Then there are also three types of User-defined data types -
- Union
- A union is a special data type available in C that allows to store different data types in the same memory location. You can define a union with many members, but only one member can contain a value at any given time. Unions provide an efficient way of using the same memory location for multiple-purpose.
- Structure
- A structure in the C programming language is a complex data type declaration that defines a physically grouped list of variables to be placed under one name in a block of memory, allowing the different variables to be accessed via a single pointer or variable of type struct. "Class" is c++ is an advanced version of structure.
- Enumeration
- Enumerated Types allow us to create our own symbolic names for a list of related ideas. The keyword for an enumerated type is enum.
- Union
Monday, 8 August 2016
Tokens, Keywords, Identifiers and Variables
Tokens
In a passage of text and usual words and punctuation marks are called Tokens. In a C program the smallest individual unit are also known as Tokens.
- Keywords have predefined uses and cannot be used for any other purpose in a C program.
- They are used by compiler to compile the program.
- They are always written in lowercase letters.
- There are Thirty two (32) keywords defined in C.
Identifiers
An identifier is a sequence of characters created by the programmer to identify or name a specific object. The sequence of characters may be letters, digits, and the special character ('_' )known as an underscore. They include variables, arrays,functions, pointers, etc.
Rules for creating Identifiers
- Identifiers are case sensitive.
- Only alphabets can be used as the first character of the identifier.
- An identifier should not be a keyword
Variables
- A variable is an identifier for a memory location in which data can be stored and recalled.
- Variables are used for holding data values so that they can be utilized in various computations in a program.
- All variables have two different attributes -
- A data type is established when a variable is defined. Once defined, the type of C variable cannot be changed.
- The value can be changed by assigning new value to the variable. The type of the values depends upon the data type of the variable.
Subscribe to:
Posts (Atom)






