Institute of Aga. Network Database LECTURER NIYAZ M. SALIH

Size: px
Start display at page:

Download "Institute of Aga. Network Database LECTURER NIYAZ M. SALIH"

Transcription

1 2017 Institute of Aga Network Database LECTURER NIYAZ M. SALIH

2 Database: A Database is a collection of related data organized in a way that data can be easily accessed, managed and updated. Any piece of information can be a data, for example name of your school. Database is actually a place where related piece of information is stored and various operations can be performed on it. Database Management System (DBMS): A DBMS is software that allows creation, definition and manipulation of database. DBMS is actually a tool used to perform any kind of operation on data in database. DBMS also provides protection and security to database. It maintains data consistency in case of multiple users. Here are some examples of popular DBMS, MySQL, Oracle, Sybase, Microsoft Access and IBM DB2 etc. Components of Database System: The database system can be divided into four components.

3 Users: Users may be of various types such as DB administrator, System developer and End users. Database application: Database application may be Personal, Departmental, Enterprise and Internal. DBMS: Software that allow users to define, create and manages database access, Ex: MySQL, Oracle etc. Database: Collection of logical data. Functions of DBMS: Provides data Independence Concurrency Control Provides Recovery services Provides Utility services Provides a clear and logical view of the process that manipulates data. Advantages of DBMS: Segregation of application program. Minimal data duplicity. Easy retrieval of data. Reduced development time and maintenance need.

4 Data Abstraction: Database systems are made-up of complex data structures. To ease the user interaction with database, the developers hide internal irrelevant details from users. This process of hiding irrelevant details from user is called data abstraction. Levels of abstraction: We have three levels of abstraction: Physical level: This is the lowest level of data abstraction. It describes how data is actually stored in database. You can get the complex data structure details at this level. Logical level: This is the middle level of 3-level data abstraction architecture. It describes what data is stored in database. View level: Highest level of data abstraction. This level describes the user interaction with database system.

5 Database model: A database model is a type of data model that determines the logical structure of a database and fundamentally determines in which manner data can be stored, organized and manipulated. The most popular example of a database model is the relational model, which uses a table-based format. Types of database models: There are many kinds of data models. Some of the most common ones include: Relational model Hierarchical database model Network model Object-oriented database model Entity-relationship model Relational model: A relational database (RDB) is a collective set of multiple data sets organized by tables, records and columns. RDBs establish a well-defined relationship between database tables. Tables communicate and share information, which facilitates data search ability, organization and reporting.

6 Hierarchical model: A hierarchical database model is a data model in which the data is organized into a tree-like structure. The data is stored as records which are connected to one another through links. A record is a collection of fields, with each field containing only one value. The entity type of a record defines which fields the record contains. Network model: The network model builds on the hierarchical model by allowing many-to-many relationships between linked records, this model allows each child to have multiple parents.

7 Object-oriented database model: This model defines a database as a collection of objects, or reusable software elements, with associated features and methods. Entity Relationship model(er): An entity relationship model, also called an entity-relationship (ER) diagram is a way of graphically representing the logical relationships of entities (or objects) in order to create a database.

8 Entity: An entity in an ER Model is a real-world entity having properties called attributes. Every attribute is defined by its set of values called domain. For example, in a school database, a student is considered as an entity. Student has various attributes like name, age, class, etc. Relationship: The logical association among entities is called relationship. Relationships are mapped with entities in various ways. Mapping cardinalities define the number of association between two entities. Mapping cardinalities one to one one to many many to one many to many

9 Database Administrator: A Database Administrator is a person or a group of person who are responsible for managing all the activities related to database system. This job requires a high level of expertise by a person or group of person. There are very rare chances that only a single person can manage all the database system activities so companies always have a group of people who take care of database system. Role and duties of Database Administrator: Installing and Configuration of database: DBA is responsible for installing the database software. He configures the software of database and then upgrades it if needed. There are many databases software like oracle, Microsoft SQL and MySQL in the industry so DBA decides how the installing and configuring of these database software will take place. Deciding the hardware device Depending upon the cost, performance and efficiency of the hardware, it is DBA who have the duty of deciding which hardware devise will suit the company requirement. It is hardware that is an interface between end users and database so it needed to be of best quality. Managing Data Integrity Data integrity should be managed accurately because it protects the data from unauthorized use. DBA manages relationship between the data to maintain data consistency. Database design The logical design of the database is designed by the DBA. Also a DBA is responsible for physical design, external model design, and integrity control.

10 Decides Data Recovery and Back up method If any company is having a big database, then it is likely to happen that database may fail at any instance. It is require that a DBA takes backups of entire database in regular time span. DBA has to decide that how much data should be backed up and how frequently the back should be taken. Also the recovery of data base is done by DBA if they have lost the database. Tuning Database Performance Database performance plays an important role for any business. If user is not able to fetch data speedily then it may loss company business. So by tuning a modifying SQL commands a DBA can improves the performance of database. Capacity Issues All the databases have their limits of storing data in it and the physical memory also has some limitations. DBA has to decide the limit and capacity of database and all the issues related to it. Database accessibility DBA writes subschema to decide the accessibility of database. He decides the users of the database and also which data is to be used by which user. No user has to power to access the entire database without the permission of DBA. Improve query processing performance Queries made by the users should be performed speedily. As we have discussed those users need fast retrieval of answers so DBA improves query processing by improving their performance.

11 Decides validation checks on data DBA has to decide which data should be used and what kind of data is accurate for the company. So he always puts validation checks on data to make it more accurate and consistence. Monitoring performance If database is working properly then it doesn t mean that there is no task for the DBA. Yes of course, he has to monitor the performance of the database. A DBA monitors the CPU and memory usage. Decides content of the database A database system has many kind of content information in it. DBA decides fields, types of fields, and range of values of the content in the database system. One can say that DBA decides the structure of database files. Database implementation Database has to be implemented before anyone can start using it. So DBA implements the database system. DBA has to supervise the database loading at the time of its implementation.

12 Structured Query Language (SQL): What is SQL? SQL is Structured Query Language, which is a computer language for storing, manipulating and retrieving data stored in a relational database. SQL is the standard language for Relational Database System. All the Relational Database Management Systems (RDBMS) like MySQL, MS Access, Oracle, Sybase, Informix, Postgres and SQL Server use SQL as their standard database language. Why SQL? SQL is widely popular because it offers the following advantages: Allows users to access data in the relational database management systems. Allows users to describe the data. Allows users to define the data in a database and manipulate that data. Allows to embed within other languages using SQL modules, libraries & precompilers. Allows users to create and drop databases and tables. Allows users to create view, stored procedure, functions in a database. Allows users to set permissions on tables, procedures and views. SQL Commands: The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP. These commands can be classified into the following groups based on their nature

13 DDL - Data Definition Language: Data Definition Language (DDL) is a standard for commands that define the different structures in a database. DDL statements create, modify, and remove database objects such as tables, indexes, and users. DML - Data Manipulation Language: A data manipulation language (DML) is a family of syntax elements similar to a computer programming language used for selecting, inserting, deleting and updating data in a database.

14 DCL - Data Control Language: Data control language is a syntax similar to a computer programming language used to control access to data stored in a database (Authorization). Table: The data in an RDBMS is stored in database objects which are called as tables. This table is basically a collection of related data entries and it consists of numerous columns and rows.

15 Field: Every table is broken up into smaller entities called fields. The fields in the CUSTOMERS table consist of ID, NAME, AGE, ADDRESS and SALARY. A field is a column in a table that is designed to maintain specific information about every record in the table. Record: A record is also called as a row of data is each individual entry that exists in a table. For example, there are 7 records in the above CUSTOMERS table. Following is a single row of data or record in the CUSTOMERS table: Column: A column is a vertical entity in a table that contains all information associated with a specific field in a table. For example, a column in the CUSTOMERS table is ADDRESS, which represents location description and would be as shown in the CUSTOMERS table.

16 Oracle SQL Commands: SELECT statement The SELECT statement is used to select data from a database. SELECT Syntax SELECT department_id,department_name,manager_id,location_id FROM hr.departments SELECT * FROM hr.departments; DISTINCT The SELECT DISTINCT statement is used to return only distinct (different) values. Syntax SELECT DISTINCT department_id From hr.employees

17 Arithmetic Expression: SELECT last_name,salary,salary+300 From hr.employees SELECT last_name,salary,12*salary+100 From hr.employees SELECT last_name,salary,12*(salary+100) From hr.employees NULL Value: 0 (zero) means value. Space means character. Null means unknown value or missing value. Some fields may contains NULL value when there is no UNNULL constraint on it. SELECT last_name,job_id,salary,commission_pct From hr.employees SELECTlast_name,job_id,salary,12*salary*commission_pct From hr.employees ALIASES: Aliases are often used to make column names more readable. Syntax SELECT last_name as name,commission_pct comm From hr.employees SELECT last_name "Name",salary * 12 "Annual Salary From hr.employees

18 Concatenation Operator( ): SELECT last_name job_id as "Employees From employees SELECT last_name ' is a ' job_id as "Employees From employees SELECT last_name ': 1 Month Salary=' salary monthly From employees DESCRIBE: DESC employees SELECT * FROM tab WHERE clause: The WHERE clause is used to filter records. The WHERE clause is used to extract only those records that fulfill a specified condition. SELECT employee_id,last_name,job_id,department_id from employees WHERE department_id=90 SELECT last_name,job_id,department_id from employees WHERE job_id='sa_rep SELECT last_name,job_id,department_id from employees WHERE last_name='whalen SELECT employee_id,last_name,salary,manager_id FROM employees WHERE manager_id IN (100,101,102)

19 SELECT employee_id,last_name,salary,manager_id FROM employees WHERE manager_id =101 or manager_id =102 or manager_id =103 SELECT employee_id,last_name,salary,manager_id FROM employees WHERE last_name IN ('Hartstein','Vargas') SELECT first_name FROM employees WHERE first_name like 'S% SELECT last_name,hire_date FROM employees WHERE hire_date like '95% SELECT last_name FROM employees WHERE last_name like '_o%' LOGICAL PARAMETERS: AND Syntax SELECT employee_id,last_name,job_id,salary FROM employees WHERE salary>=10000 AND job_id like '%MAN%' OR Syntax SELECT employee_id,last_name,job_id,salary FROM employees WHERE salary>=10000 OR job_id like '%MAN%'

20 NOT Syntax SELECT last_name,job_id FROM employees where job_id NOT IN ('IT_PROG ) ORDER BY: The ORDER BY keyword is used to sort the result-set in ascending or descending order. Syntax SELECT last_name,job_id,department_id,hire_date FROM employees ORDER BY hire_date SELECT last_name,job_id,department_id,hire_date FROM employees ORDER BY hire_date DESC SELECT last_name,salary FROM employees ORDER BY 2 DESC SELECT last_name,department_id,salary FROM employees ORDER BY department_id,salary

21 CASE function The CASE function lets you evaluate conditions and return a value when the first condition is met (like an IF-THEN-ELSE statement). Syntax SELECT last_name,salary,job_id, CASE job_id WHEN 'IT_PROG' THEN 1.10*salary WHEN 'AD_VP' THEN 1.15*salary WHEN 'AD_PRES' THEN 1.20*salary ELSE salary END "Revised salary" FROM employees DECODE function The DECODE function has the functionality of an IF-THEN-ELSE statement. Syntax

22 SELECT last_name,salary,job_id, DECODE (job_id,'it_prog',1.10*salary, 'AD_VP',1.15*salary, 'AD_PRES',1.20*salary,salary) FROM employees Aggregation The following are the most commonly used SQL aggregate functions: AVG calculates the average of a set of values. COUNT counts rows in a specified table or view. MIN gets the minimum value in a set of values. MAX gets the maximum value in a set of values. SUM calculates the sum of values. SELECT AVG(salary),MAX(salary),MIN(salary),SUM(salary) FROM employees WHERE job_id LIKE '%REP%' SELECT MIN(hire_date),MAX(hire_date) FROM employees SELECT MIN(last_name),MAX(last_name) FROM employees SELECT COUNT(*) FROM employees WHERE department_id=50 SELECT COUNT(commission_pct) FROM employees WHERE department_id=80 SELECT COUNT(department_id) FROM employees SELECT COUNT(DISTINCT department_id) FROM employees SELECT AVG(commission_pct) FROM employees

23 SELECT department_id,avg(salary) FROM employees WHERE AVG(salary)>8000 GROUP BY department_id (Error) SELECT department_id,avg(salary) FROM employees HAVING AVG(salary)>8000 GROUP BY department_id SELECT department_id,max(salary) FROM employees GROUP BY department_id HAVING MAX(salary)>10000 SELECT MAX(AVG(salary)) FROM employees GROUP BY department_id

24 SQL Joins A JOIN clause is used to combine rows from two or more tables, based on a related column between them. Self-JOIN is a regular join, but the table is joined with itself. SELECT worker.last_name ' works for ' manager.last_name FROM employees worker, employees manager WHERE worker.manager_id= manager.employee_id Cross join: The SQL CROSS JOIN produces a result set which is the number of rows in the first table multiplied by the number of rows in the second table SELECT last_name,department_name FROM employees CROSS JOIN departments

25 (INNER) JOIN: Returns records that have matching values in both tables SELECT e.last_name, e.department_id,d.department_name FROM employees e INNER JOIN departments d ON (e.department_id=d.department_id) LEFT (OUTER) JOIN: Return all records from the left table, and the matched records from the right table SELECT e.last_name, e.department_id,d.department_name FROM employees e LEFT OUTER JOIN departments d ON (e.department_id=d.department_id) RIGHT (OUTER) JOIN: Return all records from the right table, and the matched records from the left table SELECT e.last_name, e.department_id,d.department_name FROM employees e RIGHT OUTER JOIN departments d ON (e.department_id=d.department_id)

26 FULL (OUTER) JOIN: Return all records when there is a match in either left or right table SELECT e.last_name, e.department_id,d.department_name FROM employees e FULL OUTER JOIN departments d ON (e.department_id=d.department_id)

Institute of Aga. Microsoft SQL Server LECTURER NIYAZ M. SALIH

Institute of Aga. Microsoft SQL Server LECTURER NIYAZ M. SALIH Institute of Aga 2018 Microsoft SQL Server LECTURER NIYAZ M. SALIH Database: A Database is a collection of related data organized in a way that data can be easily accessed, managed and updated. Any piece

More information

What Are Group Functions? Reporting Aggregated Data Using the Group Functions. Objectives. Types of Group Functions

What Are Group Functions? Reporting Aggregated Data Using the Group Functions. Objectives. Types of Group Functions What Are Group Functions? Group functions operate on sets of rows to give one result per group. Reporting Aggregated Data Using the Group Functions Maximum salary in table Copyright 2004, Oracle. All rights

More information

Oracle Database SQL Basics

Oracle Database SQL Basics Oracle Database SQL Basics Kerepes Tamás, Webváltó Kft. tamas.kerepes@webvalto.hu 2015. február 26. Copyright 2004, Oracle. All rights reserved. SQL a history in brief The relational database stores data

More information

Intermediate SQL: Aggregated Data, Joins and Set Operators

Intermediate SQL: Aggregated Data, Joins and Set Operators Intermediate SQL: Aggregated Data, Joins and Set Operators Aggregated Data and Sorting Objectives After completing this lesson, you should be able to do the following: Identify the available group functions

More information

Retrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved.

Retrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL

More information

KORA. RDBMS Concepts II

KORA. RDBMS Concepts II RDBMS Concepts II Outline Querying Data Source With SQL Star & Snowflake Schemas Reporting Aggregated Data Using the Group Functions What Are Group Functions? Group functions operate on sets of rows to

More information

Restricting and Sorting Data. Copyright 2004, Oracle. All rights reserved.

Restricting and Sorting Data. Copyright 2004, Oracle. All rights reserved. Restricting and Sorting Data Objectives After completing this lesson, you should be able to do the following: Limit the rows that are retrieved by a query Sort the rows that are retrieved by a query Use

More information

Retrieving Data Using the SQL SELECT Statement. Copyright 2009, Oracle. All rights reserved.

Retrieving Data Using the SQL SELECT Statement. Copyright 2009, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL SELECT statements Execute a basic SELECT statement

More information

Retrieving Data from Multiple Tables

Retrieving Data from Multiple Tables Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Database Lab (ECOM 4113) Lab 5 Retrieving Data from Multiple Tables Eng. Mohammed Alokshiya November 2, 2014 An JOIN clause

More information

Join, Sub queries and set operators

Join, Sub queries and set operators Join, Sub queries and set operators Obtaining Data from Multiple Tables EMPLOYEES DEPARTMENTS Cartesian Products A Cartesian product is formed when: A join condition is omitted A join condition is invalid

More information

Restricting and Sorting Data. Copyright 2004, Oracle. All rights reserved.

Restricting and Sorting Data. Copyright 2004, Oracle. All rights reserved. Restricting and Sorting Data Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Limit the rows that are retrieved by a query Sort

More information

Retrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved.

Retrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL SELECT statements Execute a basic SELECT statement

More information

GIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement

GIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement GIFT Department of Computing Science [Spring 2013] CS-217: Database Systems Lab-2 Manual Data Selection and Filtering using the SELECT Statement V1.0 4/12/2016 Introduction to Lab-2 This lab reinforces

More information

RETRIEVING DATA USING THE SQL SELECT STATEMENT

RETRIEVING DATA USING THE SQL SELECT STATEMENT RETRIEVING DATA USING THE SQL SELECT STATEMENT Course Objectives List the capabilities of SQL SELECT statements Execute a basic SELECT statement Development Environments for SQL Lesson Agenda Basic SELECT

More information

INDEX. 1 Basic SQL Statements. 2 Restricting and Sorting Data. 3 Single Row Functions. 4 Displaying data from multiple tables

INDEX. 1 Basic SQL Statements. 2 Restricting and Sorting Data. 3 Single Row Functions. 4 Displaying data from multiple tables INDEX Exercise No Title 1 Basic SQL Statements 2 Restricting and Sorting Data 3 Single Row Functions 4 Displaying data from multiple tables 5 Creating and Managing Tables 6 Including Constraints 7 Manipulating

More information

Reporting Aggregated Data Using the Group Functions. Copyright 2004, Oracle. All rights reserved.

Reporting Aggregated Data Using the Group Functions. Copyright 2004, Oracle. All rights reserved. Reporting Aggregated Data Using the Group Functions Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Identify the available

More information

Data about data is database Select correct option: True False Partially True None of the Above

Data about data is database Select correct option: True False Partially True None of the Above Within a table, each primary key value. is a minimal super key is always the first field in each table must be numeric must be unique Foreign Key is A field in a table that matches a key field in another

More information

Test Bank for Database Processing Fundamentals Design and Implementation 13th Edition by Kroenke

Test Bank for Database Processing Fundamentals Design and Implementation 13th Edition by Kroenke Test Bank for Database Processing Fundamentals Design and Implementation 13th Edition by Kroenke Link full download: https://testbankservice.com/download/test-bank-fordatabase-processing-fundamentals-design-and-implementation-13th-edition-bykroenke

More information

CGS 3066: Spring 2017 SQL Reference

CGS 3066: Spring 2017 SQL Reference CGS 3066: Spring 2017 SQL Reference Can also be used as a study guide. Only covers topics discussed in class. This is by no means a complete guide to SQL. Database accounts are being set up for all students

More information

Database Foundations. 6-9 Joining Tables Using JOIN. Copyright 2014, Oracle and/or its affiliates. All rights reserved.

Database Foundations. 6-9 Joining Tables Using JOIN. Copyright 2014, Oracle and/or its affiliates. All rights reserved. Database Foundations 6-9 Roadmap Introduction to Oracle Application Express Structured Query Language (SQL) Data Definition Language (DDL) Data Manipulation Language (DML Transaction Control Language (TCL)

More information

Database Foundations. 6-4 Data Manipulation Language (DML) Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Database Foundations. 6-4 Data Manipulation Language (DML) Copyright 2015, Oracle and/or its affiliates. All rights reserved. Database Foundations 6-4 Roadmap You are here Introduction to Oracle Application Express Structured Query Language (SQL) Data Definition Language (DDL) Data Manipulation Language (DML) Transaction Control

More information

Querying Data with Transact SQL

Querying Data with Transact SQL Course 20761A: Querying Data with Transact SQL Course details Course Outline Module 1: Introduction to Microsoft SQL Server 2016 This module introduces SQL Server, the versions of SQL Server, including

More information

Database Programming with SQL

Database Programming with SQL Database Programming with SQL 6-4 Objectives This lesson covers the following objectives: Construct and execute a SELECT statement to join a table to itself using a self-join Interpret the concept of a

More information

DUE: 9. Create a query that will return the average order total for all Global Fast Foods orders from January 1, 2002, to December 21, 2002.

DUE: 9. Create a query that will return the average order total for all Global Fast Foods orders from January 1, 2002, to December 21, 2002. CIS 207 Oracle - Database Programming and SQL HOMEWORK: # 10 DUE: Run the following queries in Oracle Application Express. Paste a copy of each query Into this word document below the questions or notepad.txt

More information

Oracle Database 11g: SQL and PL/SQL Fundamentals

Oracle Database 11g: SQL and PL/SQL Fundamentals Oracle University Contact Us: +33 (0) 1 57 60 20 81 Oracle Database 11g: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn In this course, students learn the fundamentals of SQL and PL/SQL

More information

Full file at

Full file at David Kroenke's Database Processing: Fundamentals, Design and Implementation (10 th Edition) CHAPTER TWO INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) True-False Questions 1. SQL stands for Standard

More information

Database Management Systems,

Database Management Systems, Database Management Systems SQL Query Language (3) 1 Topics Aggregate Functions in Queries count sum max min avg Group by queries Set Operations in SQL Queries Views 2 Aggregate Functions Tables are collections

More information

2) SQL includes a data definition language, a data manipulation language, and SQL/Persistent stored modules. Answer: TRUE Diff: 2 Page Ref: 36

2) SQL includes a data definition language, a data manipulation language, and SQL/Persistent stored modules. Answer: TRUE Diff: 2 Page Ref: 36 Database Processing, 12e (Kroenke/Auer) Chapter 2: Introduction to Structured Query Language (SQL) 1) SQL stands for Standard Query Language. Diff: 1 Page Ref: 32 2) SQL includes a data definition language,

More information

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 7 Introduction to Structured Query Language (SQL)

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management Tenth Edition Chapter 7 Introduction to Structured Query Language (SQL) Objectives In this chapter, students will learn: The basic commands and

More information

Database Programming with SQL

Database Programming with SQL Database Programming with SQL 2-1 Objectives This lesson covers the following objectives: Apply the concatenation operator to link columns to other columns, arithmetic expressions, or constant values to

More information

ÇALIŞMA TEST SORULARI

ÇALIŞMA TEST SORULARI 1. A table has the following definition: EMPLOYEES( EMPLOYEE_ID NUMBER(6) NOT NULL, LAST_NAME VARCHAR2(10) NOT NULL, MANAGER_ID VARCHAR2(6)) and contains the following rows: (1001, 'Bob Bevan', '200')

More information

Introduction to Oracle9i: SQL

Introduction to Oracle9i: SQL Oracle 1z0-007 Introduction to Oracle9i: SQL Version: 22.0 QUESTION NO: 1 Oracle 1z0-007 Exam Examine the data in the EMPLOYEES and DEPARTMENTS tables. You want to retrieve all employees, whether or not

More information

Aggregate Functions. Eng. Mohammed Alokshiya. Islamic University of Gaza. Faculty of Engineering. Computer Engineering Dept. Database Lab (ECOM 4113)

Aggregate Functions. Eng. Mohammed Alokshiya. Islamic University of Gaza. Faculty of Engineering. Computer Engineering Dept. Database Lab (ECOM 4113) Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Database Lab (ECOM 4113) Lab 4 Aggregate Functions Eng. Mohammed Alokshiya October 26, 2014 Unlike single-row functions, group

More information

Manipulating Data. Copyright 2004, Oracle. All rights reserved.

Manipulating Data. Copyright 2004, Oracle. All rights reserved. Manipulating Data Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Describe each data manipulation language (DML) statement

More information

ASSIGNMENT NO Computer System with Open Source Operating System. 2. Mysql

ASSIGNMENT NO Computer System with Open Source Operating System. 2. Mysql ASSIGNMENT NO. 3 Title: Design at least 10 SQL queries for suitable database application using SQL DML statements: Insert, Select, Update, Delete with operators, functions, and set operator. Requirements:

More information

SQL Interview Questions

SQL Interview Questions SQL Interview Questions SQL stands for Structured Query Language. It is used as a programming language for querying Relational Database Management Systems. In this tutorial, we shall go through the basic

More information

Jarek Szlichta

Jarek Szlichta Jarek Szlichta http://data.science.uoit.ca/ SQL is a standard language for accessing and manipulating databases What is SQL? SQL stands for Structured Query Language SQL lets you gain access and control

More information

An Introduction to Structured Query Language

An Introduction to Structured Query Language An Introduction to Structured Query Language Alexandra Roatiş David R. Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Winter 2016 CS 348 SQL Winter

More information

An Introduction to Structured Query Language

An Introduction to Structured Query Language An Introduction to Structured Query Language Grant Weddell Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Winter 2017 CS 348 (Intro to DB Mgmt) SQL

More information

An Introduction to Structured Query Language

An Introduction to Structured Query Language An Introduction to Structured Query Language Grant Weddell Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Spring 2016 CS 348 (Intro to DB Mgmt) SQL

More information

Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle Database: SQL and PL/SQL Fundamentals NEW Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the fundamentals of SQL and PL/SQL along with the

More information

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals

More information

Oracle SQL & PL SQL Course

Oracle SQL & PL SQL Course Oracle SQL & PL SQL Course Complete Practical & Real-time Training Job Support Complete Practical Real-Time Scenarios Resume Preparation Lab Access Training Highlights Placement Support Support Certification

More information

An Introduction to Structured Query Language

An Introduction to Structured Query Language An Introduction to Structured Query Language Grant Weddell David R. Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Spring 2012 CS 348 (Intro to DB

More information

1Z Oracle Database 11g - SQL Fundamentals I Exam Summary Syllabus Questions

1Z Oracle Database 11g - SQL Fundamentals I Exam Summary Syllabus Questions 1Z0-051 Oracle Database 11g - SQL Fundamentals I Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-051 Exam on Oracle Database 11g - SQL Fundamentals I 2 Oracle 1Z0-051 Certification

More information

An Introduction to Structured Query Language

An Introduction to Structured Query Language An Introduction to Structured Query Language Grant Weddell David R. Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Spring 2012 CS 348 (Intro to DB

More information

5. Single-row function

5. Single-row function 1. 2. Introduction Oracle 11g Oracle 11g Application Server Oracle database Relational and Object Relational Database Management system Oracle internet platform System Development Life cycle 3. Writing

More information

Oracle Syllabus Course code-r10605 SQL

Oracle Syllabus Course code-r10605 SQL Oracle Syllabus Course code-r10605 SQL Writing Basic SQL SELECT Statements Basic SELECT Statement Selecting All Columns Selecting Specific Columns Writing SQL Statements Column Heading Defaults Arithmetic

More information

Oracle Database: SQL and PL/SQL Fundamentals

Oracle Database: SQL and PL/SQL Fundamentals Oracle University Contact Us: 001-855-844-3881 & 001-800-514-06-9 7 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training

More information

CSC Web Programming. Introduction to SQL

CSC Web Programming. Introduction to SQL CSC 242 - Web Programming Introduction to SQL SQL Statements Data Definition Language CREATE ALTER DROP Data Manipulation Language INSERT UPDATE DELETE Data Query Language SELECT SQL statements end with

More information

Implementing Table Operations Using Structured Query Language (SQL) Using Multiple Operations. SQL: Structured Query Language

Implementing Table Operations Using Structured Query Language (SQL) Using Multiple Operations. SQL: Structured Query Language Implementing Table Operations Using Structured Query Language (SQL) Using Multiple Operations Show Only certain columns and rows from the join of Table A with Table B The implementation of table operations

More information

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1 Basic Concepts :- 1. What is Data? Data is a collection of facts from which conclusion may be drawn. In computer science, data is anything in a form suitable for use with a computer. Data is often distinguished

More information

Data Infrastructure IRAP Training 6/27/2016

Data Infrastructure IRAP Training 6/27/2016 Data Infrastructure IRAP Training 6/27/2016 UCDW Database Models Integrity Constraints Training Database SQL Defined Types of SQL Languages SQL Basics Simple SELECT SELECT with Aliases SELECT with Conditions/Rules

More information

Chapter 7. Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel

Chapter 7. Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel 1 In this chapter, you will learn: The basic commands

More information

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model Database Design Section1 - Introduction 1-1 Introduction to the Oracle Academy o Give examples of jobs, salaries, and opportunities that are possible by participating in the Academy. o Explain how your

More information

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 6 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA

More information

Oracle Database 10g: SQL Fundamentals I

Oracle Database 10g: SQL Fundamentals I Oracle Database 10g: SQL Fundamentals I Electronic Presentation D17108GC11 Production 1.1 August 2004 D39769 Author Nancy Greenberg Technical Contributors and Reviewers Wayne Abbott Christian Bauwens Perry

More information

SQL functions fit into two broad categories: Data definition language Data manipulation language

SQL functions fit into two broad categories: Data definition language Data manipulation language Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition Chapter 7 Beginning Structured Query Language (SQL) MDM NUR RAZIA BINTI MOHD SURADI 019-3932846 razia@unisel.edu.my

More information

Sun Certified MySQL Associate

Sun Certified MySQL Associate 310-814 Sun Certified MySQL Associate Version 3.1 QUESTION NO: 1 Adam works as a Database Administrator for a company. He creates a table named Students. He wants to create a new table named Class with

More information

MTA Database Administrator Fundamentals Course

MTA Database Administrator Fundamentals Course MTA Database Administrator Fundamentals Course Session 1 Section A: Database Tables Tables Representing Data with Tables SQL Server Management Studio Section B: Database Relationships Flat File Databases

More information

SQL Data Manipulation Language. Lecture 5. Introduction to SQL language. Last updated: December 10, 2014

SQL Data Manipulation Language. Lecture 5. Introduction to SQL language. Last updated: December 10, 2014 Lecture 5 Last updated: December 10, 2014 Throrought this lecture we will use the following database diagram Inserting rows I The INSERT INTO statement enables inserting new rows into a table. The basic

More information

Oracle 1Z Oracle Database 11g SQL Fundamentals I. Download Full Version :

Oracle 1Z Oracle Database 11g SQL Fundamentals I. Download Full Version : Oracle 1Z1-051 Oracle Database 11g SQL Fundamentals I Download Full Version : https://killexams.com/pass4sure/exam-detail/1z1-051 QUESTION: 238 You need to perform these tasks: - Create and assign a MANAGER

More information

Fundamentals of Information Systems, Seventh Edition

Fundamentals of Information Systems, Seventh Edition Chapter 3 Data Centers, and Business Intelligence 1 Why Learn About Database Systems, Data Centers, and Business Intelligence? Database: A database is an organized collection of data. Databases also help

More information

Advanced SQL Tribal Data Workshop Joe Nowinski

Advanced SQL Tribal Data Workshop Joe Nowinski Advanced SQL 2018 Tribal Data Workshop Joe Nowinski The Plan Live demo 1:00 PM 3:30 PM Follow along on GoToMeeting Optional practice session 3:45 PM 5:00 PM Laptops available What is SQL? Structured Query

More information

Lab # 6. Data Manipulation Language (DML)

Lab # 6. Data Manipulation Language (DML) Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Lab # 6 Data Manipulation Language (DML) Eng. Haneen El-Masry December, 2014 2 Objective To be more familiar

More information

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 4 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA

More information

1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data

1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data 1 Writing Basic SQL SELECT Statements Objectives 1-2 Capabilities of SQL SELECT Statements 1-3 Basic SELECT Statement 1-4 Selecting All Columns 1-5 Selecting Specific Columns 1-6 Writing SQL Statements

More information

RDBMS. SQL is Structured Query Language, which is a computer language for storing, manipulating and retrieving data stored in a relational database.

RDBMS. SQL is Structured Query Language, which is a computer language for storing, manipulating and retrieving data stored in a relational database. RDBMS What is RDBMS? RDBMS stands for Relational Database Management System. RDBMS is the basis for SQL, and for all modern database systems like MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access.

More information

Querying Data with Transact-SQL

Querying Data with Transact-SQL Course 20761A: Querying Data with Transact-SQL Page 1 of 5 Querying Data with Transact-SQL Course 20761A: 2 days; Instructor-Led Introduction The main purpose of this 2 day instructor led course is to

More information

Chapter. Relational Database Concepts COPYRIGHTED MATERIAL

Chapter. Relational Database Concepts COPYRIGHTED MATERIAL Chapter Relational Database Concepts 1 COPYRIGHTED MATERIAL Every organization has data that needs to be collected, managed, and analyzed. A relational database fulfills these needs. Along with the powerful

More information

Sql Server Syllabus. Overview

Sql Server Syllabus. Overview Sql Server Syllabus Overview This SQL Server training teaches developers all the Transact-SQL skills they need to create database objects like Tables, Views, Stored procedures & Functions and triggers

More information

DATABASE MANAGEMENT SYSTEMS PREPARED BY: ENGR. MOBEEN NAZAR

DATABASE MANAGEMENT SYSTEMS PREPARED BY: ENGR. MOBEEN NAZAR DATABASE MANAGEMENT SYSTEMS PREPARED BY: ENGR. MOBEEN NAZAR SCHEME OF PRESENTATION LAB MARKS DISTRIBUTION LAB FILE DBMS PROJECT INSTALLATION STEPS FOR SQL SERVER 2008 SETTING UP SQL SERVER 2008 INTRODUCTION

More information

Course Outline. MySQL Database Administration & Design. Course Description: Pre-requisites: Course Content:

Course Outline. MySQL Database Administration & Design. Course Description: Pre-requisites: Course Content: MySQL Database Administration & Design Course Description: MySQL is the open source community's most popular Relational Database Management System (RDBMS) offering, and is a key part of LAMP - Linux, Apache,

More information

COMP 244 DATABASE CONCEPTS & APPLICATIONS

COMP 244 DATABASE CONCEPTS & APPLICATIONS COMP 244 DATABASE CONCEPTS & APPLICATIONS Querying Relational Data 1 Querying Relational Data A query is a question about the data and the answer is a new relation containing the result. SQL is the most

More information

CS2 Current Technologies Lecture 2: SQL Programming Basics

CS2 Current Technologies Lecture 2: SQL Programming Basics T E H U N I V E R S I T Y O H F R G E D I N B U CS2 Current Technologies Lecture 2: SQL Programming Basics Dr Chris Walton (cdw@dcs.ed.ac.uk) 4 February 2002 The SQL Language 1 Structured Query Language

More information

Querying Data with Transact-SQL

Querying Data with Transact-SQL Querying Data with Transact-SQL Course: 20761 Course Details Audience(s): IT Professional(s) Technology: Microsoft SQL Server 2016 Duration: 24 HRs. ABOUT THIS COURSE This course is designed to introduce

More information

EXISTS NOT EXISTS WITH

EXISTS NOT EXISTS WITH Subquery II. Objectives After completing this lesson, you should be able to do the following: Write a multiple-column subquery Use scalar subqueries in SQL Solve problems with correlated subqueries Update

More information

ORACLE CERTIFIED ASSOCIATE ORACLE DATABASE 11g ADMINISTRATOR

ORACLE CERTIFIED ASSOCIATE ORACLE DATABASE 11g ADMINISTRATOR ORACLE CERTIFIED ASSOCIATE ORACLE DATABASE 11g ADMINISTRATOR The process of becoming Oracle Database certified broadens your knowledge and skills by exposing you to a wide array of important database features,

More information

Oracle Database 10g: Introduction to SQL

Oracle Database 10g: Introduction to SQL ORACLE UNIVERSITY CONTACT US: 00 9714 390 9000 Oracle Database 10g: Introduction to SQL Duration: 5 Days What you will learn This course offers students an introduction to Oracle Database 10g database

More information

Index. Bitmap Heap Scan, 156 Bitmap Index Scan, 156. Rahul Batra 2018 R. Batra, SQL Primer,

Index. Bitmap Heap Scan, 156 Bitmap Index Scan, 156. Rahul Batra 2018 R. Batra, SQL Primer, A Access control, 165 granting privileges to users general syntax, GRANT, 170 multiple privileges, 171 PostgreSQL, 166 169 relational databases, 165 REVOKE command, 172 173 SQLite, 166 Aggregate functions

More information

A Unit of SequelGate Innovative Technologies Pvt. Ltd. All Training Sessions are Completely Practical & Real-time

A Unit of SequelGate Innovative Technologies Pvt. Ltd. All Training Sessions are Completely Practical & Real-time SQL Basics & PL-SQL Complete Practical & Real-time Training Sessions A Unit of SequelGate Innovative Technologies Pvt. Ltd. ISO Certified Training Institute Microsoft Certified Partner Training Highlights

More information

II B.Sc(IT) [ BATCH] IV SEMESTER CORE: RELATIONAL DATABASE MANAGEMENT SYSTEM - 412A Multiple Choice Questions.

II B.Sc(IT) [ BATCH] IV SEMESTER CORE: RELATIONAL DATABASE MANAGEMENT SYSTEM - 412A Multiple Choice Questions. Dr.G.R.Damodaran College of Science (Autonomous, affiliated to the Bharathiar University, recognized by the UGC)Re-accredited at the 'A' Grade Level by the NAAC and ISO 9001:2008 Certified CRISL rated

More information

Querying Data with Transact SQL Microsoft Official Curriculum (MOC 20761)

Querying Data with Transact SQL Microsoft Official Curriculum (MOC 20761) Querying Data with Transact SQL Microsoft Official Curriculum (MOC 20761) Course Length: 3 days Course Delivery: Traditional Classroom Online Live MOC on Demand Course Overview The main purpose of this

More information

Chapter-14 SQL COMMANDS

Chapter-14 SQL COMMANDS Chapter-14 SQL COMMANDS What is SQL? Structured Query Language and it helps to make practice on SQL commands which provides immediate results. SQL is Structured Query Language, which is a computer language

More information

Data Manipulation Language

Data Manipulation Language Manipulating Data Objectives After completing this lesson, you should be able to do the following: Describe each data manipulation language (DML) statement Insert rows into a table Update rows in a table

More information

CS6312 DATABASE MANAGEMENT SYSTEMS LABORATORY L T P C

CS6312 DATABASE MANAGEMENT SYSTEMS LABORATORY L T P C CS6312 DATABASE MANAGEMENT SYSTEMS LABORATORY L T P C 0 0 3 2 LIST OF EXPERIMENTS: 1. Creation of a database and writing SQL queries to retrieve information from the database. 2. Performing Insertion,

More information

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course:

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course: Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course: 20762C Developing SQL 2016 Databases Module 1: An Introduction to Database Development Introduction to the

More information

RMOUG Training Days 2018

RMOUG Training Days 2018 RMOUG Training Days 2018 Pini Dibask Product Manager for Database Tools February 22 nd, 2018 Oracle Database Locking Mechanism Demystified About the Speaker Pini Dibask, Product Manager for Database Tools,

More information

RDBMS-Day3. SQL Basic DDL statements DML statements Aggregate functions

RDBMS-Day3. SQL Basic DDL statements DML statements Aggregate functions RDBMS-Day3 SQL Basic DDL statements DML statements Aggregate functions SQL SQL is used to make a request to retrieve data from a Database. The DBMS processes the SQL request, retrieves the requested data

More information

Why Relational Databases? Relational databases allow for the storage and analysis of large amounts of data.

Why Relational Databases? Relational databases allow for the storage and analysis of large amounts of data. DATA 301 Introduction to Data Analytics Relational Databases Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca DATA 301: Data Analytics (2) Why Relational Databases? Relational

More information

Relational Database Management Systems for Epidemiologists: SQL Part II

Relational Database Management Systems for Epidemiologists: SQL Part II Relational Database Management Systems for Epidemiologists: SQL Part II Outline Summarizing and Grouping Data Retrieving Data from Multiple Tables using JOINS Summary of Aggregate Functions Function MIN

More information

Unit Assessment Guide

Unit Assessment Guide Unit Assessment Guide Unit Details Unit code Unit name Unit purpose/application ICTWEB425 Apply structured query language to extract and manipulate data This unit describes the skills and knowledge required

More information

tablename ORDER BY column ASC tablename ORDER BY column DESC sortingorder, } The WHERE and ORDER BY clauses can be combined in one

tablename ORDER BY column ASC tablename ORDER BY column DESC sortingorder, } The WHERE and ORDER BY clauses can be combined in one } The result of a query can be sorted in ascending or descending order using the optional ORDER BY clause. The simplest form of an ORDER BY clause is SELECT columnname1, columnname2, FROM tablename ORDER

More information

CISC 3140 (CIS 20.2) Design & Implementation of Software Application II

CISC 3140 (CIS 20.2) Design & Implementation of Software Application II CISC 3140 (CIS 20.2) Design & Implementation of Software Application II Instructor : M. Meyer Email Address: meyer@sci.brooklyn.cuny.edu Course Page: http://www.sci.brooklyn.cuny.edu/~meyer/ CISC3140-Meyer-lec4

More information

WHAT IS SQL. Database query language, which can also: Define structure of data Modify data Specify security constraints

WHAT IS SQL. Database query language, which can also: Define structure of data Modify data Specify security constraints SQL KEREM GURBEY WHAT IS SQL Database query language, which can also: Define structure of data Modify data Specify security constraints DATA DEFINITION Data-definition language (DDL) provides commands

More information

ITCertMaster. Safe, simple and fast. 100% Pass guarantee! IT Certification Guaranteed, The Easy Way!

ITCertMaster.  Safe, simple and fast. 100% Pass guarantee! IT Certification Guaranteed, The Easy Way! ITCertMaster Safe, simple and fast. 100% Pass guarantee! http://www.itcertmaster.com IT Certification Guaranteed, The Easy Way! Exam : 1Z0-870 Title : MySQL 5.0, 5.1 and 5.5 Certified Associate Exam Vendors

More information

In This Lecture. Yet More SQL SELECT ORDER BY. SQL SELECT Overview. ORDER BY Example. ORDER BY Example. Yet more SQL

In This Lecture. Yet More SQL SELECT ORDER BY. SQL SELECT Overview. ORDER BY Example. ORDER BY Example. Yet more SQL In This Lecture Yet More SQL Database Systems Lecture 9 Natasha Alechina Yet more SQL ORDER BY Aggregate functions and HAVING etc. For more information Connoly and Begg Chapter 5 Ullman and Widom Chapter

More information

Creating Other Schema Objects

Creating Other Schema Objects Creating Other Schema Objects Objectives After completing this lesson, you should be able to do the following: Create simple and complex views Retrieve data from views Database Objects Object Table View

More information

SQL Commands & Mongo DB New Syllabus

SQL Commands & Mongo DB New Syllabus Chapter 15 : Computer Science Class XI ( As per CBSE Board) SQL Commands & Mongo DB New Syllabus 2018-19 SQL SQL is an acronym of Structured Query Language.It is a standard language developed and used

More information

Limit Rows Selected. Copyright 2008, Oracle. All rights reserved.

Limit Rows Selected. Copyright 2008, Oracle. All rights reserved. What Will I Learn? In this lesson, you will learn to: Apply SQL syntax to restrict the rows returned from a query Demonstrate application of the WHERE clause syntax Explain why it is important, from a

More information