Course Hero Logo

05 - Lecture Part 1 (Introduction to SQL).pdf - CST 403...

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 - 10 out of 64 pages.

CST 403Principle of Database SystemLecture FiveIntroduction to SQL(Part 1)Dr. Ahmed K. Al-AniEmail: [email protected]Room No.: 1A410
05 - OutlineIntroduction to SQL StatementSQL statement2
Introduction to SQL StatementSQLis a standard language for accessing and manipulatingdatabases.What isSQL?
3
Introduction to SQL StatementSQL languageConsidered one of the major reasons for the commercialsuccess of relational databases.Now popularly known asStructured Query language.Terminology:Table,row, andcolumnused for relational model termsrelation,tuple, andattribute4
Introduction to SQL StatementWhat CanSQLdo?SQLcan execute queries against a databaseSQLcan retrieve data from a databaseSQLcan update/insert records in a databaseSQLcan delete records from a databaseSQLcan create new databasesSQLcan create/delete tables in a databaseSQLcan create stored procedures in a databaseSQLcan create views in a databaseSQLcan set permissions on tables, procedures, and views5
Introduction to SQL StatementRDBMSstands forRelational Database Management System.RDBMSis the basis forSQL, and for all modern databasesystems such asMS SQL Server,IBM DB2,Oracle,MySQL,andMicrosoft Access.The data inRDBMSis stored indatabaseobjects called tables.A table is a collection of related data entries and it consists ofcolumns and rows.6
Introduction to SQL StatementEvery table is broken up into smaller entities called fields. E.g.The fields in theCustomers tableconsist ofCustomerID,CustomerName,ContactName,Addressand so on..A field is a column in a table that is designed to maintainspecific information about every record in the table.A record, also called a row, is each individual entry that existsin a table.For example, there are 91 records in the above Customerstable. A record is a horizontal entity in a table.A column is a vertical entity in a table that contains allinformation associated with a specific field in a table.7
Introduction to SQL StatementSQLkeywords are NOT case sensitive:selectis the same asSELECTSemicolonafterSQLStatements?Some database systems require a semicolon at the end ofeachSQLstatement.Semicolon is the standard way to separate eachSQLstatement indatabasesystems that allow more than oneSQLstatement to be executed in the same call to theserver.In this class, we will use semicolon at the end of eachSQLstatement.8
The SQL CREATE DATABASE StatementTheCREATE DATABASEstatement is used to create a newSQL database.

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

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
N/A
Tags

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