160 likes | 329 Views
Oracle & SQL Introduction. LAB 7. Oracle. Oracle is a powerful relational database management system (RDBMS) that offers a large feature set . Oracle is widely regarded as one of the popular full-featured database systems on the market today .
E N D
Information Systems Department Oracle & SQL Introduction LAB 7
Oracle • Oracle is a powerful relational database management system (RDBMS) that offers a large feature set. • Oracle is widely regarded as one of the popular full-featured database systems on the market today. • In almost all relational databases, data is accessed through Structured Query Language (SQL), and Oracle is one of them.
SQL • Structured Query Language • The standard for relational database management systems (RDBMS). • SQL is relatively easy to learn. • Basic command set has vocabulary of less than 100 words. • Case insensitive. • SQL is nonprocedural language that represents a combination of DDL and DML.
What can ORACLE SQL Plus do? DDL, DML, DCL, and the database development process
Database Design Revision Steps in building a database for an application: • Analysis: • Understand real-world domain being captured. • Design: • Specify it using a database conceptual model (ER). • Translate specification to model of DBMS (Relational). • Implementation (using DBMS): • Create schema using DBMS commands (DDL). • Load data (DML).
Relational Database • A relational database is a DB that stores the data in the form of tables/relations with rows and columns. Every table shares at least one column with another table (Relationships). • A table/Relation is the category of data, like Staff. The columns are information about the category (Attributes), like name or address and the rows are the actual data or records.
Data Definition Language (DDL) • DDL is a descriptive language for defining the database schema. • Some of the main SQL-DDL commands are: • CREATE TABLE • ALTER TABLE • DROP TABLE
Data Definition Language: CREATE TABLE {table} ( {column datatype [DEFAULT expr] [column_constraint] ... | table_constraint} [, { column datatype [DEFAULT expr] [column_constraint] ... ) ALTER TABLE {table} [ADD|MODIFY {column datatype [DEFAULT expr] [column_constraint]} [DROP drop_clause] DROP TABLE {table} [cascade constraints] DESC {table}
Data Manipulation Language (DML) • The SQL data-manipulation language (DML)provides the ability to query information, and insert, delete and update tuples. • A typical SQL query has the form:select A1, A2, ..., Anfromr1, r2, ..., rmwhere P • Ai represents an attribute • Rirepresents a relation • P is a predicate. • The result of an SQL query is a relation/table.
Starting (Logging into) SQL*plus • To Start Oracle Database (you must do this first!!): • Go to Start and click each of the following:…All Programs……Oracle 10g XE…………….SQL Plus • Connecting : Now the SQL command window requests your user-name, PW.