User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 397,638 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,368 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 1144 | Replies: 13
Reply
Join Date: Dec 2007
Posts: 7
Reputation: hugvc333 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hugvc333 hugvc333 is offline Offline
Newbie Poster

SQL - questions .

  #1  
Dec 10th, 2007
Hi everybody,
I am Hugo . I want to know something more about SQL.
please can anybody give me some idea about some basic SQl questions?
First of all i want to know,
1.What is the SQL Data Manipulation Language(DML)?
2.What is the SQL Data Defenition Language(DDL)?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2007
Posts: 7
Reputation: ravisen22 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ravisen22 ravisen22 is offline Offline
Newbie Poster

Re: SQL - questions .

  #2  
Dec 10th, 2007
Hi Hug,
I think i can help you,
SQL is syntax for executing queries and updating,inserting and deleting records.These query and update commands together form the DML.
And, the DDL part of SQL provides syntax for creating or deleting database tables.Also define keys,specify links between tables and impose constraints between database tables.
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 238
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: SQL - questions .

  #3  
Dec 10th, 2007
DML or Data manipulation language is nothing but "How do you manipulate the data in a table". You can manipulate the data in these ways.
1. Selecting the data from the table (Select)
2. Inserting the data to the table (Insert)
3. Updating the data in the table (Update)
4. Deleting the data from the table (Delete)

Data definition language means how do you define/change the database objects. They are,
1. Creating a database object Eg.Table (Create)
2. Changing the table structure (Alter)
3. Deleting/Dropping the table (Drop).


Edit: ravisen22 you beat me by 2 mins.
Last edited by nav33n : Dec 10th, 2007 at 1:17 am.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Dec 2007
Posts: 7
Reputation: ravisen22 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ravisen22 ravisen22 is offline Offline
Newbie Poster

Re: SQL - questions .

  #4  
Dec 10th, 2007
Hello...Hug..
If you want , i will give some examples also.
DML part of SQL are:
1.SELECT-extracts data from a database table.
2.UPDATE-update data in a database table.
3.DELETE-delete data from a database table.
4.INSERT INTO-inserts new data into a database table.

DDL part of SQL are:
1.CREATE TABLE-creates a new database table.
2.ALTER TABLE-alters a database table.
3.DROP TABLE-deletes a database table.
4-CREATE INDEX-creates an index.
5.DROP INDEX-deletes an index.
Reply With Quote  
Join Date: Dec 2007
Posts: 7
Reputation: hugvc333 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hugvc333 hugvc333 is offline Offline
Newbie Poster

Re: SQL - questions .

  #5  
Dec 10th, 2007
Hi,
Thank you ravise22.
And thank you nav33n.
Both of you gave me some good knowledgeabout SQL languages like DDL and DML. At the same time both of you gave me suffiecient examples also. Thanx.
Reply With Quote  
Join Date: Dec 2007
Posts: 7
Reputation: hugvc333 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hugvc333 hugvc333 is offline Offline
Newbie Poster

Re: SQL - questions .

  #6  
Dec 10th, 2007
Hey,
I have some more doubts also.
One is ,
What r normalization and denormalization?
And,What is an index, and how is it used to improve perfomance?
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 238
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: SQL - questions .

  #7  
Dec 10th, 2007
Normalization is a difficult theory to explain. You should read it yourself to understand it better. But in short, normalization is a process following which, you can optimize the performance of your database. (Eg. By avoiding obsolete data, duplication, and by using primary keys, etc).

Index is just like the index of a book. If you want a particular topic in a book, you refer the index page of that book and go to that respective topic. Index in database, is kinda same. It increases the speed w.r.t the operations on a table.

You should go through http://w3schools.com/sql/sql_intro.asp
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Dec 2007
Posts: 7
Reputation: sitaag44 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sitaag44 sitaag44 is offline Offline
Newbie Poster

Re: SQL - questions .

  #8  
Dec 11th, 2007
What is an alternate key in a table ?
Please tell more about foreign key an primary key ?
Please show one example that how we can eliminate duplicate column(s) from one table?
Reply With Quote  
Join Date: Dec 2007
Posts: 7
Reputation: crys0011 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
crys0011 crys0011 is offline Offline
Newbie Poster

Re: SQL - questions .

  #9  
Dec 11th, 2007
Hi
In a database table,apart from primary key columns,other column, may need to be a key.These are alternate key.This column value may or may not be unique one.
A key column in a table that identifies records in a different table is called foreign key.
Reply With Quote  
Join Date: Nov 2007
Posts: 10
Reputation: techna is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
techna's Avatar
techna techna is offline Offline
Newbie Poster

Re: SQL - questions .

  #10  
Dec 11th, 2007
To avoid duplication in column(s) we can create it with unique costraint. Constraint is nothing but rules that you can impose on the columns to be unique or not null etc. To create a unique column you can have the codes like:
create table mytable(col1 datatype unique, col2 datatype,...)
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MySQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 10:23 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC