08_DDL.pdf - CITS1402 Relational Database Management...

This preview shows page 1 - 6 out of 18 pages.

The preview shows page 4 - 6 out of 18 pages.
CITS1402Relational Database Management SystemsVideo 08 — DDLGordon RoyleDepartment of Mathematics & Statistics
Data Definition LanguageTraditionally, SQL commands are divided intogroupsaccording totheir purposeIDDL — Data Definition LanguageCommand used todefine the structureof the database, suchas the tables, the attributes and their types (and moreadvanced structural properties).IDML — Data Manipulation LanguageCommands used tomanipulate the datain the database,including the CRUD operations
Reminder
DDL commandsICREATE TABLECreate a new (empty) tableIDROP TABLEDelete a table (and all its data)IALTER TABLE1Rename a table or a column or add a new column1only partially implemented in SQLite
A student databaseTo illustrate the DDL and for future use, we’ll build a toy databaseto store student marks, according to the following requirements:A student has a name and a unique student number. Aunit has a name and a unique unit code. Students enrolin units in a particular year and on completion they get a

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 18 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
One
Professor
N/A
Tags

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture