Thursday, April 30, 2009

Basics of Database System & DBMS

The DBMS is an interface between DB and users.
User<---->DBMS<---->OS<---->Database.
Database System vs File System
Disadv of file system includes-
1. Dependency of file system on program and vice-versa.
2. Data Redundancy- same piece of data may be stored at more than one place or file.
3. Difficulty in accessing data
4. Data Isolation- data issolated in different file system, may not be retrieved by other programs.
5. Data Integrity issue-
6. Atomicity Problem- It is crucial that whenever a failure occurs, data be restored at consistent state that existed prior to the failure. It is difficult to ensure atomicity on conventional file system.
7. Security Problem- Not much security option is available for conventional file system.

Database system and DBMS overcomes all the above limitations and also allows data abstraction. Data abstraction can be done on physical, logical and view level.

Database Instance- The collection of information at any given point in time is called instance of the database.
The overall design of a database is called Database Schema. Each database may have several schemas that are partitioned according to the level of abstration.
Data Models-It is defined as the structure of the database. It is collection of conceptual tools like for describing data, data relationships, data semantics and consistancy constraints.
Type of data models:
ER Model(Entity relationship), Relational model, object oriented, network data model are few to name.
Database users and administrators-
Users type are naive, application programmers, sophisticated users and specialized user.
Sophisticated users interacts with system without writing application programs. Specialized users are sophisticated users who write specialized DB program that do no fit into tradional data processing framework.
Roles of DBA:
Schema definition, Storage structure and access method definition, Granting of authorization for for data access and Routine management like regular DB backup, ensuring enough free space, monitoring jobs running and ensuring the performance of the database.

Transaction Management:
Transaction management forms the main component of DBMS since each and every query is considered to be a transaction.

SQL

SQL has two streams: DML-Data manipulation language and DDL-Data definition language.

A database may have many tables. These tables may be interlinked with each other using some KEY field, which must be unique, and should not be left blank.This linking has given birth to RDBMS. Other characteristics of RDBMS are Normalization, Concurrent execution of transactions etc.
Data Manipulation Language
The basic structure of SQL contains three clauses: SELECT, FROM and WHERE
Examples:
SELECT fieldname1, fieldname2, fieldname3 FROM tablename;
SELECT * FROM tablename;
For all columns * is used, there should not be any space in tablename and fieldname. They are typed as one word.
SELECT employeeidno FROM employeestatisticstable WHERE salary >=5000;
SELECT employeeidno FROM employeestatisticstable WHERE position='manager';
Text are given in single quotes ' '.
SELECT employeeidno FROM employeestatisticstable WHERE salary >=5000 AND position='staff';
SELECT employeeidno FROM employeestatisticstable WHERE position='manager' OR (salary>50000 AND benefit>10000);
OR is performed before AND. Use paraenthesis if you want otherwise.
IN and BETWEEN are used for range. NOT IN and NOT BETWEEN are also used for opposite result of IN and BETWEEN.
SELECT employeeidno FROM employeestatisticstable WHERE position IN('manager','staff');
SELECT employeeidno FROM employeestatisticstable WHERE position NOT IN('manager','staff');
SELECT employeeidno FROM employeestatisticstable WHERE salary BETWEEN 30000 AND 50000;
SELECT employeeidno FROM employeestatisticstable WHERE salary NOT BETWEEN 30000 AND 50000;
Using LIKE and underscore(_)
SELECT ssn FROM employee WHERE lastname LIKE 'L%';
This gives all names starting with L. If you want names ending with L, use'%L'. If you want R anywhere in the name use '%R%'.
_ matches any character. '___' will match any string with exactly 3 chars. '___' will match any string with at least 3 chars.
SELECT ssn FROM employee WHERE lastname LIKE '___%';
Ordering the display in ascending or descending order.
SELECT fieldname1, fieldname2, fieldname3 FROM tablename ORDER BY fieldname1;
SELECT fieldname1, fieldname2, fieldname3 FROM tablename ORDER BY fieldname1 DESC;

Joins:
A database may have many tables. These tables may be interlinked with each other using some KEY field, which must be unique, and should not be left blank.This linking has given birth to RDBMS. Primary Key is a column or set of columns that uniquely identifies the rest of the data in any given row. A Foriegn Key is a colum in a table where that column is primary key for another table, which means that any data in a foreign key column must have a corresponding data in the other table where that column is primary key. In DBMS speak-this correspondence is known as referential integrity.
For example, there are three tables. AntiqueOwners, Orders and Antiques.
AntiqueOwners
OwnerID OwnerLastName OwnerFirstName

Orders
OwnerID ItemDesired

Antiques
SellerID BuyerID Item

SELECT antiqueowners.ownerlastname, antiqueowners.ownerfirstname FROM antiqueowners, antiques WHERE antiques.buyerid=antiqueowners.ownerid AND antiques.item='chair';

Aggregate Functions- gives sum average min etc for the entire column for matching condition.
SELECT SUM(salary), AVG(salary) FROM employeestatiscticstable;
SELECT MIN(benefits)FROM employeestatiscticstable WHERE position='manager';
SELECT COUNT(*)FROM employeestatiscticstable WHERE position='staff';

Data Definition Language:

CREATE TABLE tablename (column definition list);
CREATE TABLE airport (airport char(4) not null, aname varchar(20), checkin varchar(50));
Copying table:
CREATE TABLE ticket2(ticketno, ticketdate, pid) AS SELECT ticketno, ticketdate, pid FROM ticket;
CREATE TABLE ticket3 AS SELECT * FROM ticket;
DROP TABLE table2;
INSERT INTO is used to insert new rows into a table.
INSERT INTO tablename VALUES(value1, value2,...);
You need to provide value for all columns. If you do not want to then see below.
INSERT INTO tablename (cloumn1, column2,...)VALUES(value1, value2,...);
UPDATE tablename SET columnname=newvalue WHERE columnname=somevalue;
UPDATE person SET lastname='Ratna' WHERE firstname='Anupama';
UPDATE person SET address='ancd', city='Mumbai' WHERE lastname='sharma';
Delete is used to delete the rows from the table.
DELETE FROM tablename WHERE columnname=somevalue;
To delete all the rows in a table
DELETE * FROM tablename;

Friday, April 24, 2009

Unified Communication: Tele-Presence

Unified Communication: Tele-Presence

Video Conference: Audio and video conference over not a very good bandwidth network.

Tele-Presence: Using a very high definition video conferencing with excellent quality of sound and video. Also, the positioning of chairs and tables in the room is taken into consideration. Virtual presence can also be felt on the right or left side of you. Yes, very advance form of video conference.

Types of Tele-Conference:

1. Personal- where a person on laptop or television is available.

2. Room tele-presence- A large television in the room and more than 1-2 person having on tele-presence with similar group on the other side.

3. Immersive tele-presence- Is advanced form of tele-presence, where people of different location comes on different TV in a large room, may be.

4. Fully immersive tele-presence- Is where alignment of table and chairs are also taken into consideration. TV or other screens are placed in such a manner that it feels like round table conference or similar. Audio is stereo and can be felt as if person from right and left is speaking.

All tele-presence uses SIP or H.323 as the standard prtocol for audio-visual communication. Of these SIP is mostly used these days.

Minimum bandwidth required for tele-presence is not less than 15-20mbps.

Implementation cost of tele-presence may vary from $9000 to $500000 depending on the type of tele-presence is being used.

**Source: PC World- April 2009

Tuesday, April 14, 2009

BOOTMGR Image

All of a sudden my PC, while booting said- “BOOTMGR image is corrupt. The system can not boot”
I came to know the following. PC startup comes in the following order.

1. POST- Power on self test- Press tab to see the details. This takes care of all the basic things- including basic hardware in place.
2. Booting Preocess: Boot sector keeps all the details of booting. If more than one OS is present then, dual booting will also keep such information in boot sector. It keeps the address of the operating system. This is most imp part of Hard disk. All sector can be repaied or set aside if got damaged, but if boot sector is damaged, HDD can not be used for booting anymore. Data however, can still be recoved from the HDD.

Any embedded technology like HCL EC2. Have to find out if RAID controller acts at this place.
OS loads in memory and computer starts.

If boot sector gets damaged (not physically), may be because of some virus etc, you have the following options:
1. Re-install OS from scratch, format or may not format the C drive. All data will be lost of C drive. Other drive data will remain intact. C drive format is advisable if you are going for OS reinstall. This process overwrites boot sector as well.
2. However, option1 is not advisable to try at first. If you have OS recovery CD(usually comes when you buy a new PC), you can boot from the disc and repair the damage. Please note if the repair option is not coming, your disk may be OS reinstall disk but not the recovery disk. OS disk and recovery disk are different.

Choose Startup Repair



BOOTMGR(MBR) are the same.
When I got rid of damaged BOOTMGR, and my PC started, my HCL EC2 automatically got un-installed. This means, it also wrote something in boot sector.
Also after that, I turned on boot sector virus protection as ENABLED in the BIOS. This will protect any changes being done in boot sector. I also think, this will not let you do any further change like- dual boot, any RAID etc, because it will change the boot sector.

Friday, April 10, 2009

Security Basics


Usually all the components of security basics- with respect to the non technical language are:
- Block hackers from entering your PC Firewall
- Prevent unknown threats from entering your PC Firewall
- Virus AntiVirus & Antispyware
- Worm AntiVirus & Antispyware
- Spyware from tracking you online AntiVirus & Antispyware
- Spyware from hijacking your computer AntiVirus & Antispyware
- Guard against online identity theft IE Security, Cookies, Philishing
- Inspect websites to make sure they are not fakes IE Security, Cookies, Philishing
- Block suspecious programs UAC of Vista, AV
- Allow only authorised programs to connect to Interent
- Backup of imp files
- Tuneup your PC and optimize its performance
Most Imp of these are those which any good AntiVirus provides. Rest can be used with some OS features like firewall, UAC, PEC(Program execution Control), Windows Defender, Automatic Updates.
Automatic updates is something which is not covered in any of the security software. It is actually a fix in the base, the OS.

Security of browser also play a very imp role in providing these securities. Features like phishing filter, protected mode etc provides those securities.

Based on the combination of these security threats, different security softwares are packaged.
e.g Nortan AV provides the securities as mentioned in the AV section. Nortan Internet Security provides the service of Firewall and other browser security options. It also provides some other OS security features; whereas Nortan 360 provides all the features of Nortan Internet Security as well as backup and performance tuning of your machine.

Using the good AV and using security feature of browser and OS, can serve the purpose of Nortan Internet Security or any similar Internet security suite.
For backup and performace enhancement, some other utility may be used like Vista's backup feature for backup and Disk cleanup and disk defrag for performance. Other OS feature for performance may also be used. Other freeware can also be used for antivirus, firewall and antispyware.
Freeware utility for backup (backup for all) and disk degrament is also available.
Security Administration address on Windows machine:
Control Panel-->Security Center
Windows Firewall-If more than one firewall running then there are chances of conflict.
Automatic Updates
Malware and spyware protection
Anti-Virus
Windows Defender
Other Security Settings
Internet Security Settings(for IE security settings)
User Account Control.

However different icon for firewall and defender is also there in control panel. You can switch on and switch off from there. Security center is only for consolidated view.

Internet Explorer security tools:Tools ->Internet Options -> Securities Tab
Plishing(Tools--> Advanced Tab)
Web sites list on your computer
Characteristics
Online chekcing if enabled.If not enabled manual checking is also possible.
Protected Mode
Addon or ActiveX Controls
Open browser with all addons disabled. Can also use add on manager.

Certificate:
SSL, Secure connection, Encryption
Lock
Meaning of colour
Management of Cookies

Web Technologies

Scope of this notes:
webpage design, upload the wesite at some shared webspace available from some ISP. Simple form and multimedia in your website.
Out of scope:
Web server itself, webserver programs like Apache and IIS, web sevrer interaction with DB server. User interation with forms etc. Database query.
Website construction tool:
Adobe Photoshop:
used for photo and images. Like cut a plane from somewhere and put it in other image of cloud etc. File type .psd. This file type contains diiferent layers and other characteristics of Photoshop. Therefore, before using that as an image, one must save it as .jpg.
Micromedia Dreamweaver or Adobe Go Live or Microsoft FrontPage:
Used to create a webpage. Also called as website construction tool. They generate the correct code for the table.Similarly, they will generate code for rollover, image maps etc. Therefore, each line of HTML code writting is not required. Wasting hours in aligning is also not required. These tools do the reverse job. Create table- they will create code automaticlly. Other thing that Dreamweaver do is placing the images made by photoshop at the right aligment, adding text and hyperlink on it, etc.
Web design combines number of disciplines:
Graphics design
Interface design- method of doing things. How page works etc.
Prgramming and scripting- Forms and interactivity. Writing scripts, programs and application for working with database, servers and so on.
Information design- organisation of content and you get it.flowchart and diagram.
HTML Production- using Dreamweaver or Golive.
Multimedia- Using Micromedia Flash and Director
ISP and buy space on the web server:
Hosting / FTP user name: Testing
Hosting / FTP password: password
Website URL: http://www. Testwebsite.com
FTP Site URL: ftp://www. Testwebsite.com
FTP site, username and password are used for site admin. You will have to use FTP client like SmartFTP or Internet explorer for uploading content to the site.
Sound and video clips are stored in one folder. Images are stored in other folder. Other HTML pages are stored in mail folder.
Some Technicalities:
HTMLcodetutorial.com
yourhtmlsource.com
webopedia.coma.ratna
DHTML: eg- changing of image on mouse rollover. Life and fun on the webpage. Supported only on version 4 and above browser.
Javascript: Scripting language developed by Netscape. Client side programming language. Used for form validation etc. Can not be used for anything else outside browser.Can be embedded in the webpage.
ASP:
Active Server pages
Runs inside IIS
IIS is free component of W2k and above.
PWS is a smaller but fully functional version of IIS
Chili and Instant ASP runs without Windows
ASP file is just same as the HTML file except it has .asp extension.
ASP file contains- HTML, XML and scripts. Scripts on ASP file runs on server.
How ASP different from HTML?
When browser requests an HTML file, server returns HTML file. When browser requests ASP file, IIS passes the request to ASP engine. ASP engine reads the ASP file line by line, executes the script in the file. Finally ASP file is retured to the browser as a plain HTML file.
PHP:
Again a scripting language, especially suited for web development and can be embedded into HTML.It is HTML embedded scripting language.
What it does?
Anything! Other CGI program can do. However there are three main things where PHP is used.
Server side scripting
Command line scripting
Writing desktop applications

Test Your PC

HDD:
Altrixsoft.com
Gives everything about your hard drive. Also identifies 20+ potential probelm spots. Not free, but 15 days trial version of Hard Drive Inspector is available.

Datacent's Hard Drive Sounds:
datacent.com

Broadband speed test:
dslreports.com/tools
speedtest.net

Internet Connection Quality:
VoIP test- voipreview.org
Down for everyone or just me- downforeveryoneorjustme.com

Inside your PC:
SIW- System Information for Windows- gtopala.com

BugMeNot

Get into free sites without registering:
www.bugmenot.com
It provides username and password to enter into free sites without giving your personal information. This prevents spams and SMS on your mobile phones.

PC Security, AV, AntiSpyware, Firewall, Suite

Build your own security suite for free:
Clearing doubts:
1. Many security companies use the same signature base for paid as well as free version. Paid version may have some more feaures.
2. Two antivirus may not conflict always, if they are compatible and light on PC resourse.
Make suite:
Use AVG 8.0 free version for base antivirus. Light on system resourse. Anti spyware also.
AVG does not detect a rootkit if already entered in the PC.
Use ThreatFire 4.0 in association with AVG. ThreatFire removes already entered rootkit also. Also has behavioural analysis and identify Trojan Horse based on that.
Use OnLine Armor 3.0 as a Firewall. Limit on XP firewall- only prevent incoming connection. Vista prevents out connection also but not ON by default. Be sure to turn off Windows firewall. Both can not work together.
Use Super Antispyware 4.25 - Acts as a supplement to antispyware of AVG. Handles stubborn spyware and adware.

Alternatevely, a free all in one security suite is COMODO Internet Security. This does not include antispyware.
If you are a little bit techy, you shoud use the combination of all 4 components.

Saturday, April 4, 2009

Disk Defragmentation

AbelsSoft- 'JetDrive 2009 Professional' is a freeware disk defrag utility. This is available free with PC World's March-09 issue. You need to obtain keys online to activate.
My Windows Vista Home Premium disk defrag does not work properly. Scheduled defrag should have PC powered on. 'Defrag now' does not give any result and is over in few seconds.

Using AbelsSoft- 'JetDrive 2009 Professional' - do not defrag memory or registry. It is not recommended.