SlideShare a Scribd company logo
1 of 2
Download to read offline
our company has an opening for a junior database administrator. As a senior database
administrator, your manager has developed the following questions to ask potential new hires
and he wants you to provide the answers to the following questions so they can be forwarded to
Human Resources: Explain Data Manipulation Language (DML). What is the difference between
Data Definition Language (DDL) and Data Control Languages (DCL)? Provide an example of an
SQL query that creates and executes four individual tables; Student, Class, InstructorID, and
Room Number with not null and default constraints.
Solution
Data Manupulation Language(DML):
-->It permits the users to manipulate data in database.
-->manupulation involves in inserting data into database tables,retrieving existing data,
deleting data from eisting tables and modifying existing data.
-->It is mostly incorporated in SQL databases.
-->SELECT,UPDATE,INSERT INTO,DELETE commands comes under DML.
------------------------------------------------------------------------------------------------------
DDL: Data definition language
-->It is used to define the database structure or schema.
1)CREATE-It is used to create objects in database
2)ALTER - It is used to alters the structure of the database
3)DROP - It is used to delete objects from the database
4)TRUNCATE -It is used to remove all records from a table, including all spaces allocated
for the records are removed
5)RENAME - It is used to rename an object
DCL:data control language
-->It is used to control the data in database
1)GRANT - It gives users access privileges to database.
2)REVOKE - It withdraw access privileges given with the GRANT command
----------------------------------------------------------------------------------------------------------
1)CREATE TABLE Student{
Student_name varchar(50) NOT NULL DEFAULT 'Mouni',
Student_Id int NOT NULL DEFAULT 10
}
CREATE TABLE Class{
Class_name varchar(15) NOT NULL DEFAULT 'CSE'
InstructorId int NOT NULL DEFAULT '100'
}
CREATE TABLE InstructorID{
InstructorID int NOT NULL DEFAULT '100'
Instructor_name varchar(15) NOT NULL DEFAULT 'Thomson'
}
CREATE TABLE Room{
Room_number int NOT NULL DEFAULT '12A'
Room_naem varchar(10) DEFAULT 'omega'
}

More Related Content

Similar to our company has an opening for a junior database administrator. As a.pdf

Similar to our company has an opening for a junior database administrator. As a.pdf (20)

Database Management System (DBMS).pptx
Database Management System (DBMS).pptxDatabase Management System (DBMS).pptx
Database Management System (DBMS).pptx
 
Data Ware Housing through SQL concept
Data Ware Housing through SQL conceptData Ware Housing through SQL concept
Data Ware Housing through SQL concept
 
ppt.pdf
ppt.pdfppt.pdf
ppt.pdf
 
Sql queries
Sql queriesSql queries
Sql queries
 
Sql
SqlSql
Sql
 
IM02: Database Language
IM02: Database LanguageIM02: Database Language
IM02: Database Language
 
SQL_NOTES.pdf
SQL_NOTES.pdfSQL_NOTES.pdf
SQL_NOTES.pdf
 
COMMANDS PPT(1).pdf
COMMANDS PPT(1).pdfCOMMANDS PPT(1).pdf
COMMANDS PPT(1).pdf
 
Ddl vs dml
Ddl vs dmlDdl vs dml
Ddl vs dml
 
Sql and Sql commands
Sql and Sql commandsSql and Sql commands
Sql and Sql commands
 
Sql
SqlSql
Sql
 
Test labs 2016. Тестирование data warehouse
Test labs 2016. Тестирование data warehouse Test labs 2016. Тестирование data warehouse
Test labs 2016. Тестирование data warehouse
 
Database system
Database systemDatabase system
Database system
 
Database system-DBMS
Database system-DBMSDatabase system-DBMS
Database system-DBMS
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
LEC 2.pptx
LEC 2.pptxLEC 2.pptx
LEC 2.pptx
 
Database system
Database systemDatabase system
Database system
 
Database system
Database systemDatabase system
Database system
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
DDL And DML
DDL And DMLDDL And DML
DDL And DML
 

More from arshiartpalace

Write a C++ program to get input of a data set of 14 double valu.pdf
Write a C++ program to get input of a data set of 14 double valu.pdfWrite a C++ program to get input of a data set of 14 double valu.pdf
Write a C++ program to get input of a data set of 14 double valu.pdfarshiartpalace
 
Which plants contain lignified vascular tissue (Select all that appl.pdf
Which plants contain lignified vascular tissue (Select all that appl.pdfWhich plants contain lignified vascular tissue (Select all that appl.pdf
Which plants contain lignified vascular tissue (Select all that appl.pdfarshiartpalace
 
Which of the neurotransmitters are metabotropic and which are ionotr.pdf
Which of the neurotransmitters are metabotropic and which are ionotr.pdfWhich of the neurotransmitters are metabotropic and which are ionotr.pdf
Which of the neurotransmitters are metabotropic and which are ionotr.pdfarshiartpalace
 
What is the range of y= absolute value f(x) if f(x) = -x^2 And can .pdf
What is the range of y= absolute value f(x) if f(x) = -x^2 And can .pdfWhat is the range of y= absolute value f(x) if f(x) = -x^2 And can .pdf
What is the range of y= absolute value f(x) if f(x) = -x^2 And can .pdfarshiartpalace
 
G. Will a pumping test that is run for seven days give more informati.pdf
G. Will a pumping test that is run for seven days give more informati.pdfG. Will a pumping test that is run for seven days give more informati.pdf
G. Will a pumping test that is run for seven days give more informati.pdfarshiartpalace
 
What challenges, strengths, or weaknesses do you see Baxter Internat.pdf
What challenges, strengths, or weaknesses do you see Baxter Internat.pdfWhat challenges, strengths, or weaknesses do you see Baxter Internat.pdf
What challenges, strengths, or weaknesses do you see Baxter Internat.pdfarshiartpalace
 
Three historical figures were identified as working with vita statist.pdf
Three historical figures were identified as working with vita statist.pdfThree historical figures were identified as working with vita statist.pdf
Three historical figures were identified as working with vita statist.pdfarshiartpalace
 
What are postretirement benefits other than pensionsSolutionB.pdf
What are postretirement benefits other than pensionsSolutionB.pdfWhat are postretirement benefits other than pensionsSolutionB.pdf
What are postretirement benefits other than pensionsSolutionB.pdfarshiartpalace
 
There are parts of a true sustained competitive advantage Ther.pdf
There are parts of a true sustained competitive advantage Ther.pdfThere are parts of a true sustained competitive advantage Ther.pdf
There are parts of a true sustained competitive advantage Ther.pdfarshiartpalace
 
Frequency .java Word frequency counter package frequ.pdf
Frequency .java  Word frequency counter  package frequ.pdfFrequency .java  Word frequency counter  package frequ.pdf
Frequency .java Word frequency counter package frequ.pdfarshiartpalace
 
The alternative hypothesis typically Corresponds to the presumed def.pdf
The alternative hypothesis typically  Corresponds to the presumed def.pdfThe alternative hypothesis typically  Corresponds to the presumed def.pdf
The alternative hypothesis typically Corresponds to the presumed def.pdfarshiartpalace
 
Suppose the continuous random variable X has probability density func.pdf
Suppose the continuous random variable X has probability density func.pdfSuppose the continuous random variable X has probability density func.pdf
Suppose the continuous random variable X has probability density func.pdfarshiartpalace
 
Drag and drop the phrases to the appropriate status during the cockin.pdf
Drag and drop the phrases to the appropriate status during the cockin.pdfDrag and drop the phrases to the appropriate status during the cockin.pdf
Drag and drop the phrases to the appropriate status during the cockin.pdfarshiartpalace
 
Some bacteria have one or more flagella. What is true about these st.pdf
Some bacteria have one or more flagella. What is true about these st.pdfSome bacteria have one or more flagella. What is true about these st.pdf
Some bacteria have one or more flagella. What is true about these st.pdfarshiartpalace
 
Part ABriefly, explain the current hypotheses about how brown alg.pdf
Part ABriefly, explain the current hypotheses about how brown alg.pdfPart ABriefly, explain the current hypotheses about how brown alg.pdf
Part ABriefly, explain the current hypotheses about how brown alg.pdfarshiartpalace
 
Please show the whole code... Im very confused. Matlab code for ea.pdf
Please show the whole code... Im very confused. Matlab code for ea.pdfPlease show the whole code... Im very confused. Matlab code for ea.pdf
Please show the whole code... Im very confused. Matlab code for ea.pdfarshiartpalace
 
Monomeric single pass trans-membrane proteins generally span the bil.pdf
Monomeric single pass trans-membrane proteins generally span the bil.pdfMonomeric single pass trans-membrane proteins generally span the bil.pdf
Monomeric single pass trans-membrane proteins generally span the bil.pdfarshiartpalace
 
Match the following to one or more layers of the Internet protocol st.pdf
Match the following to one or more layers of the Internet protocol st.pdfMatch the following to one or more layers of the Internet protocol st.pdf
Match the following to one or more layers of the Internet protocol st.pdfarshiartpalace
 
Kent and Emily have a baby boy Dustin by in vitro fertilization. Dust.pdf
Kent and Emily have a baby boy Dustin by in vitro fertilization. Dust.pdfKent and Emily have a baby boy Dustin by in vitro fertilization. Dust.pdf
Kent and Emily have a baby boy Dustin by in vitro fertilization. Dust.pdfarshiartpalace
 
Isabel Lopez started Biz Consulting, a new business, and completed th.pdf
Isabel Lopez started Biz Consulting, a new business, and completed th.pdfIsabel Lopez started Biz Consulting, a new business, and completed th.pdf
Isabel Lopez started Biz Consulting, a new business, and completed th.pdfarshiartpalace
 

More from arshiartpalace (20)

Write a C++ program to get input of a data set of 14 double valu.pdf
Write a C++ program to get input of a data set of 14 double valu.pdfWrite a C++ program to get input of a data set of 14 double valu.pdf
Write a C++ program to get input of a data set of 14 double valu.pdf
 
Which plants contain lignified vascular tissue (Select all that appl.pdf
Which plants contain lignified vascular tissue (Select all that appl.pdfWhich plants contain lignified vascular tissue (Select all that appl.pdf
Which plants contain lignified vascular tissue (Select all that appl.pdf
 
Which of the neurotransmitters are metabotropic and which are ionotr.pdf
Which of the neurotransmitters are metabotropic and which are ionotr.pdfWhich of the neurotransmitters are metabotropic and which are ionotr.pdf
Which of the neurotransmitters are metabotropic and which are ionotr.pdf
 
What is the range of y= absolute value f(x) if f(x) = -x^2 And can .pdf
What is the range of y= absolute value f(x) if f(x) = -x^2 And can .pdfWhat is the range of y= absolute value f(x) if f(x) = -x^2 And can .pdf
What is the range of y= absolute value f(x) if f(x) = -x^2 And can .pdf
 
G. Will a pumping test that is run for seven days give more informati.pdf
G. Will a pumping test that is run for seven days give more informati.pdfG. Will a pumping test that is run for seven days give more informati.pdf
G. Will a pumping test that is run for seven days give more informati.pdf
 
What challenges, strengths, or weaknesses do you see Baxter Internat.pdf
What challenges, strengths, or weaknesses do you see Baxter Internat.pdfWhat challenges, strengths, or weaknesses do you see Baxter Internat.pdf
What challenges, strengths, or weaknesses do you see Baxter Internat.pdf
 
Three historical figures were identified as working with vita statist.pdf
Three historical figures were identified as working with vita statist.pdfThree historical figures were identified as working with vita statist.pdf
Three historical figures were identified as working with vita statist.pdf
 
What are postretirement benefits other than pensionsSolutionB.pdf
What are postretirement benefits other than pensionsSolutionB.pdfWhat are postretirement benefits other than pensionsSolutionB.pdf
What are postretirement benefits other than pensionsSolutionB.pdf
 
There are parts of a true sustained competitive advantage Ther.pdf
There are parts of a true sustained competitive advantage Ther.pdfThere are parts of a true sustained competitive advantage Ther.pdf
There are parts of a true sustained competitive advantage Ther.pdf
 
Frequency .java Word frequency counter package frequ.pdf
Frequency .java  Word frequency counter  package frequ.pdfFrequency .java  Word frequency counter  package frequ.pdf
Frequency .java Word frequency counter package frequ.pdf
 
The alternative hypothesis typically Corresponds to the presumed def.pdf
The alternative hypothesis typically  Corresponds to the presumed def.pdfThe alternative hypothesis typically  Corresponds to the presumed def.pdf
The alternative hypothesis typically Corresponds to the presumed def.pdf
 
Suppose the continuous random variable X has probability density func.pdf
Suppose the continuous random variable X has probability density func.pdfSuppose the continuous random variable X has probability density func.pdf
Suppose the continuous random variable X has probability density func.pdf
 
Drag and drop the phrases to the appropriate status during the cockin.pdf
Drag and drop the phrases to the appropriate status during the cockin.pdfDrag and drop the phrases to the appropriate status during the cockin.pdf
Drag and drop the phrases to the appropriate status during the cockin.pdf
 
Some bacteria have one or more flagella. What is true about these st.pdf
Some bacteria have one or more flagella. What is true about these st.pdfSome bacteria have one or more flagella. What is true about these st.pdf
Some bacteria have one or more flagella. What is true about these st.pdf
 
Part ABriefly, explain the current hypotheses about how brown alg.pdf
Part ABriefly, explain the current hypotheses about how brown alg.pdfPart ABriefly, explain the current hypotheses about how brown alg.pdf
Part ABriefly, explain the current hypotheses about how brown alg.pdf
 
Please show the whole code... Im very confused. Matlab code for ea.pdf
Please show the whole code... Im very confused. Matlab code for ea.pdfPlease show the whole code... Im very confused. Matlab code for ea.pdf
Please show the whole code... Im very confused. Matlab code for ea.pdf
 
Monomeric single pass trans-membrane proteins generally span the bil.pdf
Monomeric single pass trans-membrane proteins generally span the bil.pdfMonomeric single pass trans-membrane proteins generally span the bil.pdf
Monomeric single pass trans-membrane proteins generally span the bil.pdf
 
Match the following to one or more layers of the Internet protocol st.pdf
Match the following to one or more layers of the Internet protocol st.pdfMatch the following to one or more layers of the Internet protocol st.pdf
Match the following to one or more layers of the Internet protocol st.pdf
 
Kent and Emily have a baby boy Dustin by in vitro fertilization. Dust.pdf
Kent and Emily have a baby boy Dustin by in vitro fertilization. Dust.pdfKent and Emily have a baby boy Dustin by in vitro fertilization. Dust.pdf
Kent and Emily have a baby boy Dustin by in vitro fertilization. Dust.pdf
 
Isabel Lopez started Biz Consulting, a new business, and completed th.pdf
Isabel Lopez started Biz Consulting, a new business, and completed th.pdfIsabel Lopez started Biz Consulting, a new business, and completed th.pdf
Isabel Lopez started Biz Consulting, a new business, and completed th.pdf
 

Recently uploaded

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Recently uploaded (20)

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

our company has an opening for a junior database administrator. As a.pdf

  • 1. our company has an opening for a junior database administrator. As a senior database administrator, your manager has developed the following questions to ask potential new hires and he wants you to provide the answers to the following questions so they can be forwarded to Human Resources: Explain Data Manipulation Language (DML). What is the difference between Data Definition Language (DDL) and Data Control Languages (DCL)? Provide an example of an SQL query that creates and executes four individual tables; Student, Class, InstructorID, and Room Number with not null and default constraints. Solution Data Manupulation Language(DML): -->It permits the users to manipulate data in database. -->manupulation involves in inserting data into database tables,retrieving existing data, deleting data from eisting tables and modifying existing data. -->It is mostly incorporated in SQL databases. -->SELECT,UPDATE,INSERT INTO,DELETE commands comes under DML. ------------------------------------------------------------------------------------------------------ DDL: Data definition language -->It is used to define the database structure or schema. 1)CREATE-It is used to create objects in database 2)ALTER - It is used to alters the structure of the database 3)DROP - It is used to delete objects from the database 4)TRUNCATE -It is used to remove all records from a table, including all spaces allocated for the records are removed 5)RENAME - It is used to rename an object DCL:data control language -->It is used to control the data in database 1)GRANT - It gives users access privileges to database. 2)REVOKE - It withdraw access privileges given with the GRANT command ---------------------------------------------------------------------------------------------------------- 1)CREATE TABLE Student{ Student_name varchar(50) NOT NULL DEFAULT 'Mouni', Student_Id int NOT NULL DEFAULT 10
  • 2. } CREATE TABLE Class{ Class_name varchar(15) NOT NULL DEFAULT 'CSE' InstructorId int NOT NULL DEFAULT '100' } CREATE TABLE InstructorID{ InstructorID int NOT NULL DEFAULT '100' Instructor_name varchar(15) NOT NULL DEFAULT 'Thomson' } CREATE TABLE Room{ Room_number int NOT NULL DEFAULT '12A' Room_naem varchar(10) DEFAULT 'omega' }