1 / 24

DATABASE MANAGEMENT SYSTEMS -- (ITCS 385)

DATABASE MANAGEMENT SYSTEMS -- (ITCS 385). Mrs. Basma Alsadiq balsadiq@itc.uob.bh S40-1060. Database. Database is a collection of records. It is an organized collection of information. There are many types of database. Relational Database Management System. SQL.

acton
Download Presentation

DATABASE MANAGEMENT SYSTEMS -- (ITCS 385)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DATABASE MANAGEMENT SYSTEMS -- (ITCS 385) Mrs. Basma Alsadiq balsadiq@itc.uob.bh S40-1060

  2. Database • Database is a collection of records. • It is an organized collection of information. • There are many types of database.

  3. Relational Database Management System

  4. SQL • Structured Query Language (SQL) is the language used to manipulate relational database

  5. Database Queries • Structured Query Language (SQL) • Standard query language for relational databases • Query: command to perform operation on database object • Create • Modify • View • Delete

  6. Communicating with RDBMS Using SQL

  7. SQL Command Types • Data Definition Language (DDL) • Used to create and modify the structure of database objects • Data Manipulation Language (DML) • Used to insert, update, delete, and view database data

  8. DDL Commands Used to create and modify the structure of database objects CREATE ALTER DROP DDL commands execute as soon as they are issued, and do not need to be explicitly saved

  9. DML Commands Used to insert, view, and modify database data INSERT UPDATE DELETE SELECT DML commands need to be explicitly saved or rolled back COMMIT ROLLBACK Transaction control commands

  10. Database Objects • An Oracle database consists of multiple user accounts • Each user account owns database objects • Tables • Views • Stored programs • Etc.

  11. Start Using SQL & SQL*PLUS

  12. SQL*Plus • is a client terminal software allowing users to interact with Oracle server to manipulate data and data structures.

  13. DDL Commands

  14. Create tables Creating tables is the first step in making your own database, and it follows the syntax: CREATE TABLE tablename( Column1 datatype(size), Column2 datatype(size), ….. );

  15. Data Types

  16. Create tables (Example) CREATE TABLE student( ID Number(8), Name Varchar(15), GPA Decimal(3,2), Major Varchar(5), DOB Date);

  17. If a table in the database is not needed any longer , then we can delete it using DROP TABLE command Example: Drop TABLE employee Drop Tables Command

  18. Adding Columns Using ALTER TABLE command Syntax: ALTER TABLE <table_name> ADD <column_name> <datatype>(size)

  19. Modify Columns Using ALTER TABLE command Syntax: ALTER TABLE <table_name> Modify <column_name> <datatype>(size)

  20. Drop Columns Using ALTER TABLE command Syntax: ALTER TABLE <table_name> DROP COLUMN <column_name>;

  21. Changing the name of a table • To change the name of a table, use the following statement. • Syntax: ALTER TABLE <table_name> rename to <new-name>

  22. Changing the name of a column • To change the name of a table column, use RENAME statement. • Syntax: ALTER TABLE <table_name> rename column <old-name> to <new-name>

More Related