Monday, 13 October 2014

What are the types of data communication modes?

The manner in which the communications take place between sender and receiver is called transmission mode. In the language of communications transmission mode is said to be Simplex, Half duplex, Full duplex and Full/full duplex. There are four ways for transmitting data from one point to another. 
  1. Simplex
  2. Half-Duplex
  3. Full-duplex
  4. Full/full-duplex 


Simplex
Simplex is the one-way process of data transmission and one-way communication. In simplex mode communication can take place only in one direction. The receiver receives the signal from transmission device. In this mode the flow of information is uni-directional. Examples: TV, Radio, Newspaper etc. 

Half-Duplex
In half-duplex we use two ways process of data and two way communication but the restriction is that we use only one way at a time. Examples: Wire less, fax machine etc 

Full Duplex
In this technique of networking modes we have two ways data transmission and communication. There is no any restriction we can use both directions at the same time. In full duplex transmission two stations can send and receive data from each other. Examples:  Telephone, cell phone etc.

Full/Full-Duplex
In full/full-duplex we use two way communications. In full/full-duplex transmission mode two stations will communicate with each other but with the help of third station. Example: Internet. 

What is ISO and OSI Model?

What is the ISO?
The ISO stands for International Stranded Organization, establish in 1947. That is multinational company to word wide agreement on international stranded and ISO stranded that cover all aspects of network communication is the OSI mode.

What is OSI Model?
OSI stands for Open System Interconnection. In this model we use different layers for transfer of data using multiple protocols at a time. Combining several protocols each with their own dedicated purpose is not easy hence the concept of layered structure was developed to help keep each protocol in its place and to define the manner of interaction between each protocol. The data sent between layers is called a services data unit (SDU) so OSI defines the analogous (similar) data between two machines (systems) as a protocol data unit (PDU). For the purpose of quick result we divide the work between different groups, similarly with open system interconnection, one group deals with the transport of data, another with the packaging of messages, another with end-use application, and so on. Each group of related tasks is called Layer. The Open System Interconnection Reference Model (OSI-RM) uses seven layers. The TCP/IP architecture is similar but involves only five layers because it combines some of the OSI functionality in two layers into one. The three layer i.e. application layer, presentation layer and session layer are called Upper Layers. These all layers are independent. The next four layers are called lower layers.

THE OSI MODEL
OSI stand for open system Interconnection. The OSI model is layers. The ISO standard for worldwide communications that defines a networking framework for implementing protocols in seven layers, control is passed from one layer to the next starting at the application layer in one station, proceeding to the bottom layer, over the channel to the next station and back up the hierarchy. That allows for communication across all types of computers systems. It consists of seven layers.
1. Application layer
2. Presentation layer
3. Session layer
4. Transport layer 
5. Network layer
6. Data link layer
7. Physical layer 



What are the OSI seven layers?
1. Application layer
2. Presentation layer
3. Session layer
4. Transport layer 
5. Network layer
6. Data link layer
7. Physical layer

Application Layer
The application layer enables the user withers human and software to access the network. It provides user interface and support for services for example: email, remote file access and transfer and share the data pose management. The application layer is the end-user interface of the OSI model. It is where the application such as electronic mail, newsreaders, or database displays models. The application layer’s task is to display received information and send the user’s new data to the lower layers. It communicates through the lower to the server.

Presentation Layer
The presentation layer is considering with the syntax and semantics of information Exchange between two systems. The presentation layer convert the data from the application into a common format it processes the machine-dependent data from the lower layers. The presentation layer is where file formats and even character formats are lost. This layer reverses for incoming data. It is converted from the common format into application specific formats based on the types of application.

Session Layer
The session layer services provided by the first three layers physical, data link and networks are not sufficient for some process. The session layer is the network dialog controller. It establishes and maintains the interaction between communicating system. The work of Session Layer is that organizes the exchange of data between application processes. It works with the application layer to provide simple data sets called Synchronization (management) Points that let an application know how the transmission and reception of data are progressing. In simple words the session layer is known as a timing and flow control layer. It involved in co-ordination communications between different applications, letting each know the status of the other.

Transport Layer
The transport layer is represents able for source to destination delivery of the entire message it dose not recognize any relationship between packets. The transport layer as its name suggest is designed to provide the Transport transfer of data a source and open system to a destination end open system. Regarding the OSI references model the transport layer establishes maintains and terminates communications between two machines (system). The transport layer is responsible for ensuring that data sent and received correctly. It not only manages the sending of data but also determining its order and its priority.

Network Layer
The network layer is responsible for the source to destination delivery of a packet. Possibly across multi networks, were as data link layer oversees the delivery of Packet between two systems on the same network. The same Network layer insures that each packets gets from its point of origin to its final destination. The network layer provides the physical routing of the data, determining the path between the machines (systems). The network layer handles all these routing issues and examines the network topology to determine the best route to send a message. It is only layer that sends a message from source to target system.

Data Link Layer
The data link layer is a new transmission to a relay able link and is response able for node-to-node delivery. The Data Link Layer regarding the OSI provides for the control of the physical layer, detects and possibly correct errors that can occur. It responsible for usually concerned with signal interference on the physical transmission media.

Physical Layer
The physical layer coordinates the physical medium. It deals with the mechanical and Electrical specification of interface and transmission. It also defines the progress and function that physical devices and interface have to perform for transmission to Acer. The physical layer is the lowest layer of the OSI model with the Mechanical, Electrical, Functional and Procedural means required for transmission of data. This is really the wiring or other transmission form.

Memory Terminologies

What is memory cell?
This is a device or electrical circuit used to store a single bit (0 or 1)

What is memory word?
This is a group of bits (cells) in a memory that represents information or data of some type. Word size in modern computers typically ranges from 4 to 64 bits, depending on the size of the computer.

What is byte?
This is a special term used for a 8-bit word. In modern digital computers the word size is usually a multiple of 8-bits such as 2 bytes or 4 bytes.

What is the memory capacity or unit of memory?
This is a way of specifying how many bits can be stored in a particular memory device or complete memory system. To illustrate suppose that we have a memory device this can store 4096 20-bits words. This represents a total capacity of 81,920 bits. We could also express this memory's capacity as 4096 x 20. When expressed this way the first number (4096) is the number of words and the second number (20) is the number of bits per word (word size). Computer memory is measured in terms of bytes. The larger units are kilobyte, megabyte, gigabyte and terabyte. The relationship between these is shown below:
1 Byte             = 8 Bit
1 Kilobyte   = 1204 Bytes
1 Megabyte   = 1024 kilobytes (1048576 bytes)
1 Gigabyte   =  1024 megabyte (1048576 kilobytes)
1 Terabyte   = 1024 Gigabyte (1048576 megabyte)

What is memory address?
Memory address is a number that is assigned to each byte in a computer’s memory that the CPU uses to track where data and instructions are stored in RAM. Each byte is assigned a memory address whether or not it is being used to store data. The computer’s CPU uses the address bus to communicate which memory address it wants to access and the memory controller reads the address and then puts the data stored in that memory address back onto the address bus for the CPU to use.

What is read operation?
When reading from memory the CPU specifies an address in memory plus the number of consecutive bytes it wants usually 1, 2, 4, 8 bytes are the only possibilities starting at the address specified plus the fact that it wants to read from memory. The address is sent to memory via the address bus. The number of bytes can be sent in a signal through the control bus. Also the fact that the computer wants to do a read operation can be sent through the control bus. Once memory has received the signals it retrieves the data from memory and outputs the data to the data bus and alerts the CPU that the quantity is now available at which point the CPU will then read the data off the data bus and store the information internally in a register. 

What is write operation?
For a write operation the CPU specifies an address in memory plus the number of consecutive bytes it wants to store usually 1, 2, 4, 8 bytes are the only possibilities starting at the address specified plus the fact that it wants to write from memory plus the data it wants to write to memory. The address is sent to memory via the address bus. The number of bytes can be sent in a signal through the control bus. The CPU also informs memory it wants to do a write operation through the control bus. Finally it places the data from the CPU onto the data bus usually from a register. Once memory has received the signals it reads the data off the data bus and then stores the data at the address specified.

What is memory access time?
The average period of time in nanoseconds, it takes for RAM to complete one access and begin another. Access time is composed of latency the time it takes to initiate a request for data and prepare to access it and transfer times. DRAM chips for personal computers have accessing times of 50 to 150 nanoseconds (billionths of a second). Static RAM (SRAM) has access times as low as 10 nanoseconds. Ideally the accessing times of memory should be fast enough to keep up with the CPU. If not the CPU will waste a certain number of clock cycles which makes it slower. A nanosecond (ns or nsec) is = 10-9 one billionth of a second.

What is memory cycle time?
Memory cycle time is a measurement of how quickly two back-to-back accesses of a memory chip can be made. A DRAM chip's cycle time is usually much longer than its access time which measures only a single access. This is because there is latency between successive memory accesses. Cycle time is the time usually measured in nanosecond s between the start of one random access memory (RAM) access to the time when the next access can be started. Cycle time consists of latency the overhead of finding the right place for the memory access and preparing to access it and transfer time. Cycle time should not be confused with processor clock cycles or clock speeds which have to do with the number of cycles per second in megahertz or MHz to which a processor is paced.

What is the difference between random access memory and sequential access memory?

Random Access Memory
This memory is used for temporary storage. This is volatile memory all the data vanishes from the RAM as the computer off. Random access means that because each memory location has an individual the computer can go directly to the instruction and data it wants using that address rather than searching each individual location one after another. RAM memory is both readable and writeable meaning that the contents of any memory location can be changed and read at any time. RAM is volatile meaning that is a computer loses power the contents of its memory are lost. Therefore it is important to frequently save any valuable work to secondary disk storage. RAM is farther divided into: SRAM Static Random Access Memory, DRAM Dynamic Random Access Memory. Random access memory (RAM) is what is most often referred to when PC memory is discussed. RAM is the form of volatile memory used to hold temporary instructions and data for manipulation while the system is running. The term random is applied because the CPU can access or place data to and from any addressable RAM on the system. If power to the system is lost, all RAM is lost as well. Usually, when referring to RAM, we are speaking of some variation of DRAM (Dynamic RAM) or the newer SDRAM (Synchronous DRAM). These are the most common forms of RAM used in the modern PC.

Sequential Access Memory
Sequential Access Memory (SAM) is a class of data storage devices that read their data in sequence. This is in contrast to Random Access Memory (RAM) where data can be accessed in any order. Sequential access devices are usually a form of magnetic memory. While sequential access memory is read in sequence accesses can still be made to arbitrary locations by seeking to the requested location. This operation however is often relatively inefficient. Magnetic sequential access memory is typically used for secondary storage in general-purpose computers due to their higher density at lower cost compared to RAM as well as resistance to wear and non-volatility. Examples of SAM devices still in use include hard disks, CD-ROMs and magnetic tapes.

What are difference between Static memory devices and dynamic memory devices?

Static Memory Device
These are those semiconductor memory devices in which the stored data will remain permanently stored as long power is supplied without the need for periodically rewriting the data into memory.

Dynamic Memory Device
These are those semiconductor memory devices in which the stored data will not remain permanently stored even with power applied unless the data is periodically rewritten into memory. This operation is called a refresh operation.

What is the memory test?
A computer memory test evaluates your computer’s memory to see if it is working correctly. The computer memory is the part of the computer in which files and programs are stored and retrieved for the user’s use. Therefore, it is important to be sure that the computer's memory is working correctly. A computer memory test should be done if a user suspects that there is a problem with their computer’s memory. It should also be run when a user purchases new memory.

Information Technology and its Revolution

What is information technology (IT)?
Information Technology consists of two words and a single term but it encloses in itself a vast measuring relating to any country’s development and progress, since it’s an era of computer the introduction of IT has proved to be quit useful. When the field of communication science was near to decline, another field of computer sciences arose which was felt beneficial in uprising the level of communication sciences; then they were being merged into one-another to form a new field called information technology or info tech or IT. In this technology computer is being used as a useful tool. We are living in an information age, bombarded with loads of information around us. Information technology is the use of science to store, handle, process and transmit information. Rapid changes are taking place in information technology every movement all over the world. Not too long ago, the telephone was once of the few means which we can use to communicate with a friend over seas. Today’s we have many other choices such as the fax machine and the computer Internet.

Definitions
When we learn study the latest information about the technology which is now-a-days enhanced to utilize these information’s practically and solve the requirement of the casual person is called as IT. Information Technology is the methods, for using modern technology for storing, processing, analyzing and communication of information. Modern technology includes big Networks on which data can process, store and travel from one location to other location. IT is the technology that mergers computing with high-speed communication link carrying data, sound and video. The Technology to store, send, receive, process and present the information is called Information Technology. Information Technology is now as vital as the air we breathe. Information technology is changing conventional meaning of time, distance, and space with cell phones, pages, machines and portable computers. IT is the mergers of two Sciences, i.e. Computer Sciences & High-speed Communication Sciences.

What is computer science?
Computer science is the field of study that deals with the structure and operations of computer systems, the study of computers including both hardware and software design. Computer sciences are composed of many board disciplines, including artificial and software engineering. Computer sciences were established as a discipline around the early 1960s. Most universities now offer bachelor, master and doctorate degrees in computer sciences.

What is communication science?
Communication science is the field of study that deals with the structure and operations of communication system. The external architecture of a computer involves electronic signals being passed from component to component. It is a natural extension of this idea to send signals out of the computer to another computer perhaps thousands of kilometers away, the field of study that deals with the exchange of information & ideas and data transmission accurse between two transmitters or receivers with the help of some medium. 

What is IT Revolution?
The growth in electronics over the past quarter century has been phenomenal. What we have seen is not an evolution in technology but a revolution. Our society, our businesses, our homes and our leisure activities are being transformed. Modern electronics is based upon the microprocessor; one form of microchip winch consists of miniature logic circuits etched onto the surface of a silicon chip. I these tiny circuits replace the enormous banks of glass valves used in the earliest computers of the 1940s and 19:50s. 

A computer that uses a microprocessor as its central processing unit is known as microcomputer or personal computer (PC). A microprocessor controls the entire operation of a microcomputer. Thus it is the brain of the microcomputer. The early computers processed information in the form of data. Modern computers are more powerful and can handle information in other forms, including graphics and speech. However they work on the same principles as the early models. The main difference between the computer of 30 years ago and the microchips of today lies in the tact that the latter are very small, very cheap, very reliable and very powerful. In fact, ever since the first chips were made in the early 1960s their power has increased every year while their cost has decreased. It is this fact continued over a quarter of a century that has caused the information revolution.

Microprocessors are now incorporated not just into computers but also into a wide range of other products from cameras to washing machines and cars. But what has an information processing device to do with a camera, washing machine or car? The answer is that the microprocessor is used as a control mechanism in many of these products. Microprocessors are now so cheap and so small that they can he incorporated into any device that can benefit from the power of the computer. The IT revolution is the fastest emerging revolution seen by the human race. And the Internet surpasses all. Electricity was first introduced in 1873 and it took 46 years for its mass scale use, telephone introduced in 1876 and took 35 years for mass use. Television introduced in 1926 took 26 years for mass use. PC introduced in 1975 took 16 years; mobile phone in 1983 took 13 years for mass use while the web introduced in 1994 took only 4 years for mass use. While in the United States 57 per cent Americans have Internet access, it is said that only 0.6 per cent people living in the developing countries can access the Internet. In Pakistan, Information Technology is fast becoming a necessity. With the shrinking global scenario, Pakistan urgently needs to revolutionize its Information Technology infrastructure.

What is the role of microprocessor in IT revolution?
Information Technology is based upon the microprocessor. A microprocessor is a single IC chip that performs all the processing on data and controls the operation of the entire computer system. Modern digital computers are very powerful electronic machines and have the capabilities to handle data in graphics and speech forms also. Today's microcomputers are very small very cheap, very reliable and very powerful. Since the first IC chips were made in early 1960s, their power has increased every year while their cost has decreased and this has caused the information revolution.

The role of Microprocessor in all industries is well established. They are used in instrumentation, transportation, military equipments like tanks, radars etc. communication, automatic testing products, lift control, speed control of motors, automatic control of generator's voltage, fuel control of furnaces etc. Microcomputers play a dominant role in all spheres of our life and outcome is the evolution of microprocessors itself.

Some Basic Programs of C Language


1. Write a program to print “Assalam-O-Alaikum” on the screen.
Code
#include<stdio.h>
#include<conio.h>
void main(void)
{
printf("Assalam-O-Alaikum");
getch();
}
Output
Assalam-O-Alaikum

2. Write a program to print your name and address into two lines. Using of new line escape sequence.
Code
#include<stdio.h>
#include<conio.h>
void main(void)
{
clrscr();
printf("My name is Zaffar Shah. \nI live in Quetta city.");
getch();
}
Output
My name is Zaffar Shah.
I live in Quetta city.

3. Write a program to read three integers values and print their sum.
Code
#include<stdio.h>
#include<conio.h>
void main(void)
{
int v1, v2, v3, sum;
v1=10;
v2=20;
v3=30;
printf("\nFirst value is %d",v1);
printf("\nSecond value is %d",v2);
printf("\nThird value is %d",v3);
sum=v1+v2+v3;
printf("\nThe sum is %d",sum);
getch();
}
Output
First value is 10
Second value is 20
Third value is 30
The sum is 60

4. Write a program which prints a text of 4 lines consisting of characters, integer values and floating point values using print statement.
Code
#include<stdio.h>
#include<conio.h>
void main(void)
{
int y=2009, m=10;
float r1=3.70, r2=4.90;
clrscr();
printf("\n\nBalochistan is the largest province of Pakistan.\n");
printf("According to %d estimates Balochistan has \na population of roughly %d million.\n",y,m);
printf("Balochistan share of the National Economy has\n");
printf("historically ranged between %.2f percent to %.2f percent.",r1,r2);
getch();
}
Output
Balochistan is the largest province of Pakistan.
According to 2009 estimates Balochistan has
a population of roughly 10 million.
Balochistan share of the National Economy has
historically ranged between 3.70 percent to 4.90 percent.

5. Write a program that calculates the area of a rectangle. Area = Width x Length
Code
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a,w,l;
printf("Enter value of rectangle width= ");
scanf("%d",&w);
printf("Enter value of rectangle length= ");
scanf("%d",&l);
a=w*l;
printf("The area of rectangle is %d.",a);
getch();
}
Output
Enter value of rectangle width= 12
Enter value of rectangle length= 15
The area of rectangle is 180.

6. Write a program to calculate the area of a circle. A = pi x r^2
Code
#include<stdio.h>
#include<conio.h>
void main(void)
{
float pi=3.14;
float r,a;
clrscr();
printf("\nEnter Radius of a Circle= ");
scanf("%f",&r);
a=pi*r*r;
printf("\nThe Area of a Rectangle is= %.3f",a);
getch();
}
Output
Enter Radius of a Circle= 12
The Area of a Rectangle is= 452.160

7. Write a program uses the single character format specifier %c.
Code
#include<stdio.h>
#include<conio.h>
void main(void)
{
char c1, c2;
clrscr();
c1=‘S’;
c2=‘H’;
printf(“The simple characters %c and %c.”,c1,c2);
getch();
}
Output
The simple characters S and H.

8. Write a program that performs all arithmetical operations on two variables.
Code
#include<stdio.h>
#include<conio.h>
void main()
{
int s,h;
clrscr();
printf("\nEnter First Value= ");
scanf("%d",&s);
printf("\nEnter Second Value= ");
scanf("%d",&h);
printf("\nAddition = %d",s+h);
printf("\nSubtraction = %d",s-h);
printf("\nMultiplication = %d",s*h);
printf("\nDivision = %d",s/h);
printf("\nReminder = %d",s%h);
getch();
}
Output
Enter First Value= 5
Enter Second Value= 2
Addition = 7
Subtraction = 3
Multiplication = 10
Division = 2
Reminder = 1

9. Write a program that reads and prints using Escape Sequence (asking the name, age, height and gender) of the students using printf and scanf statements.
Code
#include<stdio.h>
#include<conio.h>
void main(void)
{
char nam[20], g[6];
int age;
float h;
clrscr();
printf("Enter Your Name: ");
scanf("%s",&nam);
printf("Enter Your Age: ");
scanf("%d",&age);
printf("Enter Your Height: ");
scanf("%f",&h);
printf("Enter Your Gender [Male/Female]: ");
scanf("%s",&g);
printf("\nYour name is %s.\nYou are %d years old.\n",nam,age);
printf("Your height is %.1f.\n",h);
printf("You are a %s student.\n",g);
getch();
}
Output
Enter Your Name: Maria
Enter Your Age: 19
Enter Your Height: 4.7
Enter Your Gender [Male/Female]: Female
Your name is Maria.
You are 19 years old.
Your height is 4.7.
You are a Female student

10. Write a program in for loop that can print 10 to 1.
Code
#include<stdio.h>
#include<conio.h>
void main()
{
int m;
clrscr();
for(m=10;m>=1;m--)
printf("\n%d",m);
getch();
}
Output
10
9
8
7
6
5
4
3
2
1

12. Write a program which uses for loop statement to generate the multiplication table from 2 to 20.
Code
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,ab;
clrscr();
for(a=2;a<=20;a++)
{
for(b=1;b<=10;b++)
{
ab=a*b;
printf("\n%d x %d = %d",a,b,ab);
}
}
getch();
}
Output
2 x 1 = 2
2 x 2 = 4


2 x 10 = 20
3 x 1 = 3
3 x 2 = 6


20 x 10 = 200

13. Write a program that displays the given star output using nested for loop.
*
* *
* * *
* * * *
* * * * *
Code
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
printf("*");
printf("\n");
}
getch();
}

14. Write a program that displays your name for five time using while loop.
Code
#include<stdio.h>
#include<conio.h>
void main()
{
int zs;
zs=1;
clrscr();
while(zs<=5)
{
printf("\nSalman Danish");
zs++;
}
getch();
}
Output
Salman Danish
Salman Danish
Salman Danish
Salman Danish
Salman Danish

15. Write a program to print the corresponding Celsius to Fahrenheit table using while loop.
Code
#include<stdio.h>
#include<conio.h>
int main(void)
{
  float fahr,celsius;
  int lower,upper,step;
  lower=0;
  upper=70;
  step=10;
  clrscr();
  printf("\nC     F\n\n");
  celsius = lower;
  while(celsius <= upper)
  {
  fahr = (9.0/5.0) * celsius + 32.0;
  printf("%3.0f %6.1f\n", celsius, fahr);
  celsius = celsius + step;
  }
getch();
}
Output
C F
0 32.0
10 50.0
20 68.0
30 86.0
40 104.0
50 122.0
60 140.0
70 158.0

Short Questions about Database and DBMS

What is data?
Raw facts & figures are called data. Unorganized facts which are to be proceeds in order to get some meanings, data are simply value or sets of values. The data can denote a collection of facts that can serve as a base to the computer program. 

What is information?
The processed and manipulated form of data is called information. It is more meaningful than data. It is used for making decisions. Data is used as input for processing and information is the output of this processing.

What is data processing?
Data processing is any computer process that converts data into information or knowledge. The processing is usually assumed to be automated and running on a computer. The processing of manipulating data to achieve the required objective and results is called data processing. The software is used to process raw data. The software converts raw data into meaningful information.

What is data manipulation?
The process of applying different operations on data is called data manipulation. It includes the operations of classifying, calculating, sorting and summarizing. Data manipulation is the way in which data can be manipulated and changed.

What is field?
A field is a combination of one or more character. It is the smallest unit of data that can be accessed by the user. A field is identified uniquely by field name.

Why it is important to specify data type and size of a field?
The data type of a filed specifies the type of data that can be stored in the field. The field size defines the maximum number of character that can be stored in a field.

What is meant by a record?
A collection of related fields treated as a single unit is called record. For example, a Student Record includes a set of fields about the student such as Roll Number, Student Name, Class, Section, Phone No and Address etc.

What is a file?
A collection of related records treated as a single unit is called file. Files are stored in disk like hard disk, CD, DVD or USB etc. a student file may contain the many records of students.

What is file name and file extension?
The file name is consists of file name with its extension. The name and extension of file is separated by dot. The extension is normally assigned by the software in which it is created such as student.doc.

What is an index?
An index consists of key values and the corresponding disk address for each record in the file. Index refers to the place on a disk where a record is stored. The index file is updated whenever a record is added or deleted from the file.

What is database?
A database is a collection of logically related data sets or files. These files are normally of different natures and are used for specific purposes. The files may be organized in different ways to meet different processing and retrieval requirements of the users.

What is the meaning of related database?
The word related means that a database is normally created to store the data about a particular topic.

What is the meaning of efficient database?
The word efficient means that the user can search the required data quickly.

What are the four major components of database system?
The four major components of the database systems are data, hardware, software and personnel.

What are the different objectives of the database?
There are three basic objective of the database. These objectives are as follows:
  • Data Integration: It means that data is logically centralized even if it may be located at different locations.
  • Data Integrity: It means the reliability and accuracy of data.
  • Data Independence: It means that the data and the application program are separated from each other.

What are types of logical database models?
There are three types of logical database models. These models are as follows:
  • Hierarchical Model
  • Network Model
  • Relational Model

What is Database Management System (DBMS)?
A database management system (DBMS) is a collection of programs that are used to create, maintain and access database in a convenient and efficient manner. DBMS uses database manager software to control the overall structure of a database.

What are the main objectives of DBMS?
The important objectives of the DBMS are shareability, availability, evolvability and database integrity.

What are the features of DBMS?
The important features of the DBMS are data dictionary, utilities, query language, report generator, access security, backup and recovery.

What is data dictionary?
Data dictionary is used to store data definitions or describes of the structures of data used in database. It may also monitor the data that is entered. It endures that data is according to the data definition rules.

What is the purpose of backup and recovery?
Backup is used to store a copy of important data in database. The recovery process uses the data in backup if the original data is damaged due to any reason.

What are the advantages of DBMS?
Advantages of DBMS are data independence, support of complex data relationship, data security, backup and recovery.

What is the meaning of data independence?
Data independence means that data and application programs are separate from each other. The user can change data storage structures and operations without changing the application programs. The user can also modify programs without reorganization of data.

What are the disadvantages of DBMS?
Disadvantages of DBMS are additional system overhead, additional training, need for data dictionary and possible problems due to wrong type of database.
Give some names of the large databases.
The databases are NADRA, ATM machines, Google database etc.

What is entity?
An entity is any thing about which information is stored in the database. The entity must have a unique identifier. The identifier is composed of one or more attributes.

What is view? Also define its purpose.
A view is also called virtual table. The basic purpose of using views is to keep data safe and secure from unauthorized and illegal users. A view can also display records from multiple tables. The views provide more flexibility and security in displaying data.

What is a key? Also define its purpose.
Single or combination of multiple fields is called key. Its purpose is to access or retrieve data rows from table according to the requirement. The key are defined in tables to access or sequence the stored data quickly and smoothly. Key is also use to create links between different tables.

What are the types of Keys?
Different types of keys are use in databases. These keys are as follows:
  • Primary Key
  • Secondary Key
  • Candidate Key
  • Alternate Key
  • Composite Key
  • Sort Key
  • Foreign Key


What is primary key?
The attributes or combination of attributes that uniquely identifies a row or record in a relation is called primary key.

Who is a user or end user?
A user or end user is a person who uses computers for his specific needs. He/She might have a moderate knowledge of computers, computer science and information technology. He/She does not need to know in-depth knowledge of computer system.

Who is data administrator?
A data administrator is a person uses computers for his specific needs. He might have a moderate knowledge of computers, computer science and information technology. He does not need to know in-depth knowledge of computer system.

Who is database administrator?
A database administrator is responsible for the design, implementation, operation, management and maintenance of database. Database administrator is responsible to ensure proper database access and security.

What is analysis?
A process of studying the existing system is called analysis. The basic purpose of analysis is to know which activities are performed in the current system. The analysis also determines what should take place in the new system.

What is entity or object?
Anything that is participating in the system is known as data entity or object. Some examples of entities are TEACHER, STUDENT, CLASS etc. An entity represent by a rectangle.

What is an attribute or property?
The characteristics of an entity are called attributes or properties. Some examples of attributes of TEACHER are Teacher ID, Teacher Name, Phone No etc. An attributes is represent by an oval.

What is a relationship?
A logical connection between different entities is called relationship. For example, a relationship exists between a TEACHER and STUDENT because teacher teaches student. The entities that participate in a relationship are called participants.

What is cardinality?
The number of entity occurrences associated with one occurrence of the related entity is called cardinality. It specifies how many instances of an entity relate to one instance of another entity. It means that cardinality specifies the maximum number of relationships.

What are the types of relationship?
The relationship can be:
  • One to one
  • One to many
  • Many to many

What is modality?
Modality describes relationship as either mandatory or optional. It specifies absolute minimum number of relationships. The relationship is called optional if minimum number is zero. The relationship is called mandatory if minimum number is one or more.

What is an Entity-Relationship (ER) diagram?
A graphical representation of entities in a database and relationships between them is called Entity-Relationship Diagram or ER-Diagram. The rectangle is commonly used to represent entities. The diamonds are normally used to represent relationships and ovals are used to represent attributes.

What is meant by database integrity?
Database integrity means the correctness and consistency of data. It is another form of database protection. Security means data must be protected from unauthorized operations.

What is a synonym?
A type of problem that exists in relations is called synonym. A synonym is creates when two different names are used for the same information or attribute. The name of attribute must be same if it exists in two or more entities.

What is meant by redundancy?
Duplication of data in multiple files is called redundancy. It is a type of problem that exists in relations. It is created when the same information is unnecessary stored in two different ways or forms.

What is normalization?
A process of converting complex data structure into simple and stable data structure is called normalization. It is a process of analyzing the dependencies of attribute with in entities. The attributes for each entity checked against three sets of rules connectively.

What is partial dependency?
A type of dependency in which one or more non-key attribute are functionally dependent on part of primary key is called partial dependency.

What is transitive dependency?
The transitive dependency is a type of functional dependency between two or more non-key attributes. It exists if a non-key attribute depends on any another non-key attribute.

What is meant by RDBMS?
RDBMS stands for Relational Database Management System. It is a collection of programs that manages the complexity of a relation database. A database in which data is stored in relations called RDBMS.

Sunday, 12 October 2014

Truth, Magic, and the Internet

Readers of this column understand the inner  workings of their computer and the Internet. But many people don’t understand these and most other modern technologies. The general public considers these technologies magic, although nobody would admit that publicly. Let’s look at it from the perspective of someone with no cultural clues—say, an alien or a hermit. You have a screen, a keyboard, and a mouse. You move the mouse, and a cursor magically moves around the screen. You have a keyboard on which you push buttons in various sequences, commanding something somewhere to produce a visual image on screen. This image may contain information you seek. It may show you a movie. People from other parts of the world can talk to you. By any traditional definition, this is magic. Real magic, not trickery or stage magic. 

Subconscious magic, too.  Is it possible that even though you and I know how this all works more or less), our brains are actually interpreting it as magic? This means that on some deeper level, we also perceive it as magic. In other words, you know this isn’t magic, but still react to it as if it were. I only bring this up since it may explain certain phenomena that seem to be exaggerated in an online “magical” environment. I have always been fascinated  by the ease with which  people believe  bogus  information when it comes over the computer, especially over the Internet.  

Mysterious reaction to e-mail. Add to this the strange phenomenon of e-mail. E-mail should be exactly like something written on paper, only written on the screen and delivered over the magical network. After years of using e-mail, it’s obvious that e-mail is different. Unlike regular mail, it requires  all sorts of etiquette. You can misinterpret it more easily. It encourages the use of emoticons, because no matter how hard you try, you cannot make clear your level of seriousness. Emoticons are used to transmit this information. Over the years people have tried to rid e-mail of emoticons. The English professors were the first to grouse, saying that there is no reason to use them since a well-structured sentence could do the trick. This reasoning made sense until you tried to build that well-structured sentence. There are hidden attributes in the structure  and delivery of e-mail that make the use of emoticons imperative in many instances. I’m convinced that this  is part of the magic. If you took  the exact wording of the e-mail and handwrote it on a piece of paper, an emoticon would be out of place. If you used one, you’d seem like a silly high-school girl. Try it. 

E-mail causing IQ to fall.  Even more interesting was some largely ignored research out of King’s College, London, into the effects of e-mail. The study claimed that e-mail use has addictive aspects and that it causes a temporary IQ drop of up to 10 points —a bigger drop than that caused by inveterate pot-smoking. Have you noticed that your addicted boss who is forever hammering away on his BlackBerry is acting a little flakier than usual? The BlackBerry incorporates both e-mail and an addictive mechanism. That mechanism is the click-reward system that works with slot machines and pigeon feeders. It’s highly addictive to humans. This is exacerbated by its ritualistic nature—and ritualism is often found with addictions. I have never known a BlackBerry user who has not pulled out the device numerous times in my presence, almost like a cigarette smoker fiddling with a pack. When combined with the apparently IQ-sapping e-mail delivery, it begins to sound like something from a creepy science fiction story where an alien device enslaves a population. The magical aspect of this little device cannot be ignored either. IQ is bound to drop when we turn ourselves over to magic. 

Gullibility up. The other  important aspect is the gullibility factor. People believe what they read on the Internet more easily than what they see in print. People talk a big game about Internet skepticism, but still fall for bunkum. There are more hoaxes than ever. The Nigerian scam letter is now distributed like mad, with incredible variations. A number of issues concerns me. The first is that the IQ of the general public may spiral downward. The second is the potential for targeted abuse by an insidious government or entity that could take full advantage of the weaknesses inherent in the system and exploit the public at large. It’s possible that we’ve created some sort of monster here with our technology, and we don’t even know it.