Wednesday, 28 September 2016

Database Management System

In my last post,I wrote about database management system.So you may ask that what a database management system actually means??
A database management system(DBMS) is a collection of programs that enables users to create and maintain a database.The DBMS is a general purpose software system that facilitates the process of defining,constructing,manipulating and sharing databases among various users and applications.
  • Defining a database involves specifying the data types,structures and constraints of the data to be stored in the database.The database definition or descriptive information is also stored in the database in the form of a database catalog or dictionary,called metadata*.
  • Constructing the database is the process of storing the data on some storage medium that is controlled by the DBMS.
  • Manipulating a database includes functions such as querying the database to retrieve specific database to retrieve specific data,updating the database to reflect changes in the mini world and generating reports from the data.
  • Sharing a database allows multiple users and programs to access the database simultaneously.
An application program accesses the database by sending queries or requests for data to the DBMS.A query is typically a statement requesting the retrieval of information.



 A simplified database system environment.

*metadata: Generally known as data about data. So, it means that it stores various information like type of data, size of data, etc.

Saturday, 17 September 2016

View data from a Table

To view data of a table,
Here's the SYNTAXs for viewing the table data -

  1. Selected columns and All rows

    1: select column1,column2, column3, ..., columnN from <table_name>;
    

    Examples -

    1. select Roll_no,Name from student;
    


    1: select Name,Phone_Number from student;
    

  2. Selected rows and All columns

    1: select *from <table_name>
    2: where <condition>;
    

    Examples -

    1: select *from student 
    2: where Name='Trunks'; 
    

    1: select *from student 
    2: where Name='Naruto Uzumaki'; 
    

  3.  Selected rows and Selected columns

    1: select col1,col2,...,colN from <table_name>
    2: where <condition>;
    

    Examples -

    1: select Name,Phone_Number from student 
    2: where Name='Trunks'; 
    

    1: select Roll_no,Name from student 
    2: where Roll_no=15094; 
    

  4. All rows and All columns
    1: select *from <table_name>;
    

    Examples -

    1: select *from student;


Wednesday, 14 September 2016

Update

Update the application here.

Version  - 2.1.2
Download

Update Log -
  • Added category SQL
  • Added new splash screen
  • New icons
  • New header image
  • Other small tweaks

Insert data into Table

Here's how to insert data into a Table.
  • First create a table of suitable attributes. Here's how you create a table - Create a table.
  • Then here;'s the syntax for entering values into that table.
SYNTAX -
1: insert into <table_name>
2: (field names)
3: values (corresponding values);

Examples -
1: insert into student
2: (Roll_no,Name,Address,Phone_Number)
3: values(15121,'Trunks','Capsule Corps',1234567890);

1: insert into student
2: (Roll_no,Name,Address,Phone_Number)
3: values(15226,'Reas Grimmery','High School DxD',0198765432);

1: insert into student
2: (Roll_no,Name,Address,Phone_Number)
3: values(15094,'Naruto Uzumaki','Konohaghure','7777777779');


Create a Table

Here's the syntax of creating a table in SQL,

SYNTAX -
1:  create table <table_name>
2: ( column_name1 datatype(size),
3:   column_name2 datatype(size),
4:   column_name3 datatype(size),
5:   column_name4 datatype(size)); 

Example -
1:  create table student
2: ( Roll_no number(10),
3:   Name varchar2(20),
4:   Address varchar2(30),
5:   Phone_Number number(10)); 

Tuesday, 13 September 2016

SQL - Introduction

  • 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.

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?
  • A database is a collection of related data.By data,we mean known facts that can be recorded and that have implicit meaning.
For example, consider the names, telephone numbers, and addresses of people.
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.