Friday, February 1, 2013

How to Install Windows 7 From a USB Drive


How to Install Windows 7 From a USB Drive




Installing Windows from a USB flash drive has several advantages – First of all, the overall speed of the installation process will increase significantly, carrying a USB stick is much more convenient than a DVD, and finally it becomes possible to install the OS even on those systems that do not have a DVD drive, such as a netbook.
In this post, I will show you how to load the Windows installation on to your USB flash drive and make it bootable just like the DVD.
Tools Required:
1. USB flash drive with a minimum capacity of 4 GB.
2. Windows 7 set-up DVD.

Step-1: Plug-in your USB flash drive and backup all the existing data in it.

Step-2: Open the command prompt. If you are using Windows 7/Vista then open it with administrator rights*.
* Goto Start -> All Programs -> Accessories -> Right-click on “Command Prompt” and select “Run as Administrator”.

Step 3: In the command prompt, type in the following command:
DISKPART

This will start the
 Microsoft DiskPart utility as shown below:

Now issue the following command:
LIST DISK

This will show you a list of  available disks on your system.
 Disk 0 is usually the hard disk. In my case, Disk 5 is the USB drive (this can be a different one in your case). Now issue the command as shown below:
SELECT DISK 5
NOTE: In the above command, 5 is the USB drive number on my system. If you have a different number on your system, then you need to replace 5 with that number.

Step-4: Now issue the following list of commands one by one as shown below:
CLEAN

CREATE PARTITION PRIMARY

SELECT PARTITION 1

ACTIVE

FORMAT FS=NTFS QUICK

ASSIGN

EXIT
Minimize the command prompt and proceed to the next step.

Step 5: Insert the Windows 7/Vista installation disc and note down the “drive letter” of your DVD drive. In my case, it is “H:”. Now type the following list of commands as shown below:
H: CD BOOT
CD BOOT
BOOTSECT.EXE /NT60 M:(NOTE: M: is your USB drive letter)
EXIT

Step-6: Copy the contents of your Windows 7/Vista installation disk into the USB flash drive.
That’s it! Your USB stick is now ready to boot and install the OS for you. Don’t forget to enable the “USB Boot” option and change the “boot priority to USB device from hard disk” in your BIOS settings.

DDL COMMANDS AND KEY CONSTRAINTS


DDL COMMANDS AND KEY CONSTRAINTS
AIM
To execute DDL commands andkey constraints using oracle.

syntax of the DDL commands;
1.To create a table.
create table <table name>(<col1><datatype>(size),<col2><datatype>(size));
2.modify the table.
i)Alter table <table name>add ()<new col><datatype>(size), <new col> datatype(size));
ii)Alter table <table name>modify(<col><new datatype>(new size));
3.Dropping a column from table.
i)Alter table<table name>drop column<col>;
ii)drop table<table name>;
4.Renameing the table.
Rename <old table>to<new table>;
5.Truncating the table.
Truncate table<table name>;
 Example of DDL commands;
SQL>create table emp(empname char(20),empid number(4),desn varchar(10),salary number(5),doj date);
     Table created.
SQL>alter table emp add(age number(2));
   Table altered.
SQL>alter table emp modify(empname varchar(25) );
   Table altered.
SQL>rename emp to employee;
   Table renamed.
SQL>alter table emp drop column desn;
   Table altered.
SQL>truncate  table employee;
   Table truncated.
SQL>drop table employee;
   Table droped.
syntax of the type of constraints;
(a).Not null constraint at column level
<col> <datatype> (size) not null;
(b).unique  constraint at column level
<col> <datatype> (size) unique;
(c).unique  constraint at table level
create table  <table name> (col=format,col=format unique(<col1>,<col2>));
(d)primary key constraint at column level
<col> <datatype> (size) primary key;
(e)primary key constraint at table level
create table <table name>(col=format,col=format primary key(<col1>,<col2>));
(f)foreign key constraint at column level
<col> <datatype> (size)  reference<table name>(<col1>);
(g)foreign key constraint at table level
foreign key (<col1>,<col2>) reference <table name>(<col1>,<col2>);
(h)check constraint at column level
<col> <datatype> (size) check(<logical expression>);
(i)check constraint at table level
 check(<logical expression>);

 Example of constraints
SQL>create table pdept(dno number(5),dname char(20),loc varchar(20),primary key(dno));
     Table created.
SQL>insert into pdept values(134,'IT','sss');
     1 row inserted.
SQL>insert into pdept values(111,'CEVIL','rrr');
     1 row inserted.
SQL>alter table pdept modify(loc varchar2(20)not null);
    Table altered.
SQL>drop table pdept;
SQL>create table pdept(dno number(5),dname char(10),loc varchar2(20));
     Table created.
SQL>alter table pdept add primary key(dno));
    Table altered.
SQL>create table fdept(did number(5)reference pdept(dno),ename varchar2(20),salary number(7));
   Table created.
SQL>insert into fdept values(202,'ECE',100);
   1 row inserted.
SQL>insert into fdept values(134,'IT',1000);
   1 row inserted.

SQL>create table customer(cnum number(5)not null,state varchar2(20)default(‘TN’),constraint cnum-pkkey primary key(cnum);
    Table created.
SQL> insert into customer(cnum)values(11);
     1 row inserted.
SQL> create table emp1(eid number(5)unique,ename varchar(20)default(‘unknow’),age number(4)not null,esal number(7) check(esal>10000));
    Table created.
SQL>insert into emp1(eid,age,esal)values(1,23,15000);
   1 row inserted.

SQL>insert into emp1(eid,age,esal)values(2,13,5000);
   1 row inserted.




                     
RESULT
                  Thus the DDL commands and key constraints were executed  successfully.