Tuesday, 17 July 2012

Databases!! Repository of all Data!

 Database!!! The word itself can be considered as both the most complex and the most simple concept.Creating tables,inserting records accessing records all this can be considered very simple if efficiency is not taken into account and if the structure is highly redundant.But then there is no point in creating one such storage for data .It can be made complex and more interrelated by the assigning of various constraints on the field ,removing redundancy in data,and achieving normalization.To achieve the complete purpose of the database It must be done in the most efficient method.


    Now let us start with installing mysql in the system.In an unix system the steps are as follows..
1) Run the following command from the command prompt,
sudo apt-get install mysql-server.
2)Give a password when you are prompted during the installation.
3)Type this to see if the mysql server on your system is running.
sudo netstat -tap | grep mysql
4)This is the command to start the server.

sudo /etc/init.d/mysql restart


Installing in mac system
There are 2 methods to achieve this
1)You can download XCODE and use the brew software to directly download it from the internet and run it.This will do everything automatically.
2)The other method is to download and run the DMG file for the appropriate version.Once its installed give 
cd /usr/local/mysql
sudo ./bin/mysqld_safe
Now give

/usr/local/mysql/bin/mysql -u root -p
Now enter the password and you can work on your mysql.

What is Dbms??
   A Dbms is a software package along with a set of  computer programs which can be used to create,store and manage data efficiently.It must satisfy the ACID properties
A-Atomicity
C-Confidentiality
I-Integrity
D-Durability
There are 2 kinds associated with it.The
DDL and the DML
DDL-data definition language,which defines how the schema of the system should be,like the no of columns ,no of tables the type of the attribute etc.Some commands used to achieve this is the CREATE TABLE,MODIFY TABLE etc.
DML-data manipulation language.This includes all the language that involves creation,editing and the altering of records in a database.

There are different kinds of tables available in sql.
They are
ISAM
MYISAM
INNODB
MERGE
HEAP
BERKLEY DB.

The default one in mysql is MYISAM.The different tables are selected based on the hard disk space and the portability.


 - Sourcebits University
Cloud Computing
www.sourcebits.com

No comments:

Post a Comment