Thursday, 6 October 2016

Program Data insulation and Data Abstraction

Program Data insulation and Data Abstraction

In traditional file processing,the structure of data files is embedded in the application programs,so the changes to the structure of a file may require changing all programs that access that file.By contrast,DBMS access programs do not require such changes in most cases.The structure of data files is stored in the DBMS catalog separately from the access programs.We call this property as program-data independence.

In some types of database systems,such as object oriented or object relational systems,users can define operations on data as part of the database definitions.An operation is specified into two parts that is the interface(or signature) and the implementation(or method).User application programs can operate on the data by invoking these operations through their names and arguments,regardless of how the operations are implemented.This property is termed as program-operation independence.

A major purpose of a database system is to provide users with an abstract view of the data.That is,a DBMS provides users with a conceptual representation of data that does not include many of the details of how the data is stored or how the operations are implemented.This property is termed as data abstraction.Usually,data abstraction is implemented at three levels:

  • Physical level:The lowest level of abstraction,describes how the data are actually stored.The physical level describes complex low-level data structures in detail.
  • Logical level:The next higher level of abstraction,describes what data are stored in the database and what relationships exist among those data.The user of the logical level does not need to be aware of this complexity,and is referred as physical data independence or program data independence.  
  • View level:The highest level of abstraction,describes only a part of the entire database.The system may provide multiple views for the same database. 


Characteristics of the Database Approach

 Characteristics of the Database Approach

Before the database systems were introduced,all the data were organised in file-processing system or file-based system.It gave rise to various problems which were solved with the introduction of database systems.So,the advantages of database system over file-based system or file-processing system are:

  • Controlled Data Redundancy:Data redundancy is a condition created within a database or data storage technology in which the same piece if data is held in two separate places .In DBMS,all data of an organisation is integrated into a single database file.The data is recorded in only one place in the database and it is not duplicated.
  • Data Consistency:By controlling the data redundancy,the data consistency is obtained.If a data item appears only once,any update to its value has to be performed only once and the updated value is immediately available to all users.So,as the DBMS has controlled redundancy,hence it enforces data consistency.
  • Easy Retrieval of data:As the data stored in a database system are tabular and interrelated ,so,it is easy to retrieve any information from the database.
  • Limited Data Isolation:As the data stored in a database system are consistent and non-redundant,hence data isolation is limited.
  • Multiple Users or Concurrent Access-function:In a database system,multiple users may work with the same database simultaneously.In this system,the user giving the first request gets the priority liable of the second.
  • Data Security:As the data is centrally stored,it is easy to enforce security standard.It is easy to monitor the users who are accessing the database.Further the Database Administrator (DBA) controls which users have access to what type of information.
  • Faster Processing:As the data are stored in interrelated tables in a database system,so the retrieval of the information becomes easier as compared to the file-based system or file-processing system.
  • Data independence:The separation of data structure of database from the application program that uses the data is called data independence.In DBMS,you can easily change the structure of database without modifying the application program.
There are many other advantages like Data Abstraction,Insulation between programs and data,Backup and Recovery procedures etc.

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));