Tuesday, March 5, 2013

About Database Tables


Database tables will most likely be the area you'll become most familiar with after working with databases for a while. Now, before we go ahead and start adding tables to our new database, let's have a look at what a database table actually is.

What is a Table?

In database terms, a table is responsible for storing data in the database. Database tables consist of rows and columns.
In the following example, the second row is highlighted in black:
Database row
In the next example, the second column is highlighted in black. This column has been given a name of "FirstName":
Database column
A row contains each record in the table, and the column is responsible for defining the type of data that goes into each cell. Therefore, if we need to add a new person to our table, we would create a new row with the person's details.

Creating a Database


With database management systems, many tasks can be done either via programatically or a user interface. Creating databases is no exception.

Option 1: Programatically

Many database administrators (DBAs) use Structured Query Language (SQL) to perform many of their database tasks. To enter SQL, you need to open an interface that allows you to enter your code. For example, if you use SQL Server, you would normally use Query Analyzer.
The following example is the basic code for creating a new database. Parameters can be added to this example if your requirements are more specific.
Code

Note: This example assumes you know how to use your database system to run scripts like this. If you don't you, will probably find it easier to use the user interface method (below).

Option 2: User Interface

Most database systems make it very easy to create a database via a user interface. Generally, it's just a matter of selecting an option from a menu, then providing a name for your database.
The following examples demonstrate how to create a database in Microsoft Access.
  1. From the "File" menu, click on "New Database":
    Creating a new database in Access - step 1
  2. Choose "Blank Database". (MS Access also gives you the ability to choose from a template, but we'll just use a blank database here):
    Creating a new database in Access - step 2
  3. Choose a location to save the database:
    Creating a new database in Access - step 3

Your New Database

Once you've completed the above tasks, you should see a blank database, like this:
Creating a new database in Access - step 4
We know this database is blank because it doesn't have any tables. If it did, you would see these tables in the middle pane of the table tab. Now that we have our blank database, we can start adding some tables.

Database Management Systems


Database Management System (DBMS), is a software program that enables the creation and management of databases. Generally, these databases will be more complex than the text file/spreadsheet example in the previous lesson. In fact, most of today's database systems are referred to as a Relational Database Management System (RDBMS), because of their ability to store related data across multiple tables.
Some of the more popular relational database management systems include:
  • Microsoft Access
  • Filemaker
  • Microsoft SQL Server
  • MySQL
  • Oracle
Throughout this tutorial, you will become familiar with some of the key concepts of database management systems. These include:
  • Database creation
  • Tables
  • Adding data to your database
  • Querying a database
  • Relational database design

What Does a Database Management System Look Like?

Different database management systems look different, but generally, there are a number of common features that you'll usually see across most of them.

Microsoft Access

Microsoft Access Database Management System
This is the main screen you'll see when opening up Access to view an existing database. The outer part is the database management system and it's menu, the middle part is the actual database. In this example, the database is called "dateSite" and has 20 tables. If you were to open a different database, the name of the database would be different and you would see different tables, but the available options would be the same (i.e. Tables, Queries, Forms, Reports, Macros, Modules, Open, Design, New).
Some of these options are common across all database management systems. All database systems allow you to create tables, build queries, design a new database, and open an existing database.

Microsoft SQL Server

Microsoft SQL Server - Enterprise Manager
Microsoft SQL Server is a more robust database management system than Access. While Access is better suited to home and small office use, SQL Server is more suited to enterprise applications such as corporate CRMs and websites etc.
The above screen is what you see when you open SQL Server through Enterprise Manager. Enterprise Manager is a built-in tool for managing SQL Server and its databases. In this example, there are 6 databases. Each database is represented down the left pane, and also in the main pane (with a "database" icon).

Which Database System to Use?

If you are using a database for home or small office use, Microsoft Access or Filemaker should be fine. If you need to create a database driven website, then you're better off using a more robust system such as SQL Server, Oracle, or MySQL.
The examples in this tutorial use Microsoft Access. If you don't have Microsoft Access, you should still be able to follow the examples. The tasks we perform are the same tasks you would need to perform regardless of which database management system you use. The key goal with this tutorial is to provide you with an overview of what is involved in creating and maintaining a database.

What is a Database?


A database is a collection of data. That may sound overly simplistic but it pretty much sums up what any database is.
A database could be as simple as a text file with a list of names. Or it could be as complex as a large, relational database management system, complete with in-built tools to help you maintain the data.
Before we get into dedicated database management systems, let's start with the basics - let's look at a simple text file example.

Text File

Imagine we have a text file called "Individual.txt", and that the contents look like this:
Notepad text file
We could use this information to do things such as send an email to everyone on our list. We could do this because, due to the way we designed the list, we know that each row contains a different individual, and the information on that row is related to that individual. Also, the items in each row are separated by commas. Therefore, we know that the email address next to "Homer" is his email address. We could also call each row a record. Therefore, we currently have 4 records in our database.
With a small list like this, a text file may serve our purposes perfectly.

Spreadsheet

Another option would be to store it in a spreadsheet using spreadsheet software (for example, Microsoft Excel). That way, we could do some extra things with our list (such as format it, or sort by first name/surname etc).
A spreadsheet program like Excel makes these tasks relatively easy to do. Also, programs like Excel organize the data into rows and columns, making your data easier to comprehend. Something like this:
Excel spreadsheet

Database Software

A better option would be to store the data in a database table using specialized database software, such as Microsoft Access. Something like this:
Microsoft Access database table

So What's the Difference?

You may be wondering what the difference is between the last two examples (Excel vs Access). After all, both examples have the data organized into rows and columns.
There are many differences between spreadsheet software and database software. The rest of this tutorial will show you why database software is a much better option for creating databases.

Friday, October 12, 2012

Hot Backup and a Cold Backup

Cold Backup- We can take the Backup while DB(eg. Oracle) is down. 
Hot Backup-We can take the Backup while DB(eg. Oracle) is running. 

Cold backup is a physical backup. During a cold backup the database is closed and not available to users. All files of the database are copied (image copy). The datafiles do not change during the copy so the database is in sync upon restore. 
Used when: Service level allows for some down time for backup 


Hot backup is a physical backup. In a hot backup the database remains open and available to users. All files of the database are copied (image copy). There may be changes to the database as the copy is made and so all log files of changes being made during the backup must be saved too. Upon a restore, the changes in the log files are reapplied to bring the database in sync. Used when:A full backup of a database is needed Service level allows no down time for the backup

Package and Language?

Package:

It is a well defined program used to manipulate the data. Eg. Ms- Office

Language:

Using language we can create package as well as other application programs.

Eg. Java, C++...

Computer Organization and Computer Architecture

Computer Organization is how operational attributes are linked together and contribute to realise the architectural specifications.
Computer architecture is the architectural attrributes like physical address memory,CPU and how they should be made and made to coordinate with each other keeping the future demands and goals in mind.
Computer Architecture comes before computer organiation.Its like building the design and architecture of house takes maximum time and then organisation is building house by bricks or by latest technology keeping the basic layout and architecture of house in mind.  

DBMS and Data warehouse

A DBMS is a Database management System, it consists of the tools needed to access or build a database. A Data Warehouse is merely a collection of data from one or more sources collected together to enhance the the activities of data mining, which is performed with a DBMS or a RDBMS*.

Information Systems and Information Technology?

Information Systems is a large umbrella referring to systems designed to create, store, manipulate, or disseminate information. Example of an information system is a pencil and a piece of paper. The two objects themselves are just tools, but together they create a system for writing (information). The term Information systems has been around a lot longer than the computer, or the term information technology. These days the two are sometimes thought to be synonymous, but that, in most cases is a misconception. 

Information technology falls under the information systems umbrella, but has nothing to do with systems per say. IT deals with the technology involved in the systems themselves, e.g. an information system like wiki.answers.com contains many information technologies. Servers, server operating systems, web-server software (IIS, Apache, et al), and code written for the web-server software (PHP, C#, VB, PERL, Ruby, et al). Even your computer and browser make up part of this information system. Like the pencil and paper example, each one of the mentioned parts of this information system in itself is an information technology. 

That being said, most people in the profession no longer make a distinction. Moreover, companies call their IS/IT department a wide range of titles based on more on culture and tradition than anything else.

Wednesday, September 26, 2012

Understand Ranges in Microsoft Excel


Two Types of Range
There are two types of ranges in Excel -- contiguous and noncontiguous. These are described below:
Contiguous Range -- A contiguous range is a simple connected rectangular group of one or more cells.
Noncontiguous Range -- A noncontiguous range consists of two or more non-connected contiguous ranges.
Range Addresses
Single Cell Range Address-- A single cell range address consists of a column address followed by a row address. For example, the range address D16 means the cell at column D and row 16.
Multi-Cell Range Address-- A multi cell range consists of the starting corner of a range, followed by a colon, and then the ending corner of a range. It typically defines a rectangle in multiple rows and multiple columns, but it could be just a portion of a row or a portion of a column. See the examples below:
A1:C3 is an example of a typical multi-row multi-column range; it defines a 3 x 3 connected group of cells that extends from cell A1 to cell C3 inclusive.
A1:J1 is an example of a single-row multi-column range; it defines a 10 x 1 connected group of cells that extends from cell A1 to cell J1 inclusive.
A1:A10 is an example of a typical multi-row single-column range; it defines a 1 x 10 connected group of cells that extends from cell A1 to cell A10 inclusive.
Range Address Including Sheet -- Both single cell and multi-cell range addresses can contain a sheet name. If the sheet name is not included, the range is assumed to refer to the current sheet. Examples follow:
Sheet3!D16is an example of a single cell range that is located on worksheet 3.
Sheet3!A1:C3 is an example of a multi-row multi-column range that is located on worksheet 3.
Noncontiguous Range Addresses -- Noncontiguous range addresses consist of a comma separated group of range addresses. An example follows:
Sheet1!A1:C3, Sheet2!A1:C3, Sheet3!A1:C3 is an example of a noncontiguous range address that consists of the cells in the range A1:C3 on each of Sheet1, Sheet2, and Sheet3.
Selecting a Range
There are several ways to select a range. Descriptions follow:
-- Click on a cell, hold the left mouse button down, and drag to select a range.
-- Select a cell, press [F8], and use the arrow keys to select the range.
Selecting a Noncontiguous Range
To select a noncontiguous range, select the first part of the range with the mouse, then hold down the[Ctrl] key and select the second group of cells in the range. Repeat until you have selected all portions of the range.
Summary
This article defined the different types of ranges in Excel, gave some examples, and described basic methods for selecting ranges.

Sunday, May 20, 2012

Glossary


Glossary
(Chapter-11)

Algorithm
A series of instructions or procedural steps for the solution of a specific problem.


Algorithm Code
A system of coding data by the use of combination of letters to represent item of information.


Alphanumeric Code
Pertaining to character set or field of data in which the coded characters may represent numerals or letters of the alphabets.


Analog Computers
Analog computers are machines designed to perform arithmetical functions upon numbers where the numbers are represented by some physical quantity.

Introduction to Windows Operating System

Introduction to Windows Operating System
(Chapter-10)



Windows Desktop
Windows “Desktop” is like a working surface of a desk. Desktop is where your applications, folders and shortcuts are located. Desktop contains the following items.
1. Icons
2. Taskbar
3. Start Button
The function of these desktop items is given below:



1. Icon
An icon is a small colourful graphical picture that represents an object like a file, folder, program or any hardware components of the computer. Every icon has a lable, which identifies it. The labels can be changed.

Computer Software

Computer Software
(Chapter-9)



Machine Language
Machine language is the only language that a compute understands directly without any translation, it is the binary language. It is the language of 0’s and 1’s . It consists of strings of binary numbers.
The binary codes are very difficult to memorize for human beings that is why a machine language is cumbersome for a user.



Difference Between a High-Level Language and Low-Level Language
High-Level Languages
High-Level language are more suitable for human use than machine languages and enable the programmer to write instructions easily using English words and familiar mathematical symbols. These symbolic languages are called High-Level languages. These high-level languages consist of simple English sentences, which are very easy to understand and memorize for human being.

Saturday, May 19, 2012

Boolean Algebra

Boolean Algebra
(Chapter-8)


Boolean Algebra
The Boolean algebra was developed by the English mathematician George Boole; it deals with statements in mathematical logic, and puts them in the form of algebraic equations. The Boolean algebra was further developed by the modern American mathematician Claude Shannon, in order to apply it to computers. The basic techniques described by Shannon were adopted almost universally for the design and analysis of switching circuits. Because of the analogous relationship between the actions of relays, and of modern electronic circuits, the same techniques which were developed for the design of relay circuits are still being used in the design of modern high speed computers. Thus the Boolean algebra founds its applications in modern computers after almost one hundred years of its discovery.
Boolean algebra provides an economical and straightforward approach to the design of relay and other types of switching circuits. Just as an ordinary algebraic expression may be simplified by means of the basic theorems, the expression describing a given switching circuit network may also be reduced or simplified using Boolean algebra.

Data Representation

Data Representation 
(Chapter-7)


Data
The word data is derived from Latin language. It is plural of Datum (But Data is usually used as a singular term.) Datum (singular) – Data (plural). Data is any collection of facts of figures. The data is the raw material to be processed by a computer.
Example
Names of students, marks obtained in the examination, designation of employees, addresses, quantity, rate, sales figures or anything that is input to the computer is data. Even pictures, photographs, drawings, charts and maps can be treated as data. Computer processes the data and produces the output or result.