Course Hero Logo

DDL-DML-DCL-JOIN.Jaguar.pptx - ASSIGNMENT 3 Group...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 15 out of 108 pages.

ASSIGNMENT 3Group Name:JaguarMounika SadhuAastha ShahAarjav DuttNidhi MittalHiren Patel
We have textbook solutions for you!
/New-Perspectives-Microsoft-Office-365-Access-2019-Comprehensive-1st-Edition-9780357025758-1232/
The document you are viewing contains questions related to this textbook.
Chapter 10 / Exercise 3
New Perspectives Microsoft Office 365 & Access 2019 Comprehensive
Shellman/Vodnik
Expert Verified
Data DefinitionLanguage (DDL)
What Is DDL?DDL statementsare used to alter/modify a database or tablestructure and schema.These statements handle the design and storage of databaseobjects.Examples : CREATE,ALTER , DROP Statements.
CREATE COMMANDCREATE– To create objects in the database.Syntax :CREATE TABLE table_name{column_name1data_type(size),column_name2 data_type(size),column_name3 data_type(size),}
Example of Create Command:CREATE TABLE Persons (PersonID int,LastName varchar(255),FirstName varchar(255),Address varchar(255),City varchar(255));
ALTER COMMAND& DROPCOMMANDALTER– alters the structure of the database.Syntax:ALTER TABLE table_name ADDcolumn_name datatype;DROP– delete objects forom the databaseSyntax– DROP TABLE table_name;
TRUNCATE & COMMENTCOMMANDTRUNCATE– Remove all records from a table, including all spacesallocated for the records and removed.Syntax: TRUNCATE TABLE table_name;COMMENT– Add comments to the data dictionary.Syntax: --text_of_comment
RENAME COMMANDRENAME– rename an object.Syntax: RENAME TABLE old table name TO new table name;
What is DCL?TheData Control Language (DCL)component of the SQLlanguage is used to create privileges to allow users access to, andmanipulation of, the database. There are two main commands:GRANT to grant a privilege to a user.REVOKE to revoke (remove) a privilege from a user.
GRANT commandIn order to do anything within an SQL database you must be giventhe appropriate privileges.SQL operates a closed system in that you cannot perform any actionat all unless you have been authorised to do so.This includes logging onto the database, creating tables, views,indexes and synonyms, manipulating data (ie select, insert, updateand delete) in tables created by other users, etc.
The SQL command to grant a privilege on a table is:GRANT SELECT, INSERT, UPDATE, DELETE ON tablename TOusername;There are many more forms of the GRANT command, but this issufficient for this Unit.
Any combination of the above privileges is allowed. You can issuethis command on any tables that you have created.For example:GRANT SELECT ON employee TO hn23;GRANT SELECT, UPDATE, DELETE ON employee TO hn44;
REVOKE commandThe SQL command to revoke a privilege on a table is:REVOKE SELECT, INSERT, UPDATE, DELETE ON tablename FROMusername;For example:REVOKE SELECT ON employee FROMhn23;REVOKE SELECT, UPDATE, DELETE FROM hn44;
Data ManipulationLanguage(DML)

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 108 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
Chaiyaporn Mutsalklisana
Tags
Salary
We have textbook solutions for you!
The document you are viewing contains questions related to this textbook.
New Perspectives Microsoft Office 365 & Access 2019 Comprehensive
The document you are viewing contains questions related to this textbook.
Chapter 10 / Exercise 3
New Perspectives Microsoft Office 365 & Access 2019 Comprehensive
Shellman/Vodnik
Expert Verified

Newly uploaded documents

Show More

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture