0% found this document useful (0 votes)
4 views

Database lab task 1 (24011556_054)

The document provides an overview of Oracle Database, a widely used multi-model database management system developed by Oracle Corporation. It outlines key features, advantages, and disadvantages of Oracle Database, as well as different types of SQL statements with examples. Additionally, it includes specific SQL queries to perform various data retrieval and manipulation tasks.

Uploaded by

Zaman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Database lab task 1 (24011556_054)

The document provides an overview of Oracle Database, a widely used multi-model database management system developed by Oracle Corporation. It outlines key features, advantages, and disadvantages of Oracle Database, as well as different types of SQL statements with examples. Additionally, it includes specific SQL queries to perform various data retrieval and manipulation tasks.

Uploaded by

Zaman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

DATABASE MANAGEMENT SYSTEM

SUBMMITED BY:
HIRA BINT-E- RAZZAQ
ROLL NO:
2011556-054
SUBBMITED TO:
MAM HIRA TARIQ
COURSE CODE:
IT-244.
DEPARTMENT OF
INFORMATION TECHNOLOGY
Question 1:
What is Oracle Database?
Oracle Database is a multi-model database management system (DBMS) developed and
marketed by Oracle Corporation. It is one of the most widely used relational database systems in
the world. Oracle Database is designed to store, organize, and retrieve data efficiently,
supporting a variety of data types, including structured, semi-structured, and unstructured data.
Key features of Oracle Database include:
 Relational Database Management System (RDBMS): It organizes data into tables with
rows and columns, allowing for efficient data retrieval and manipulation using SQL
(Structured Query Language).
 Scalability: Oracle Database can handle large volumes of data and supports high-
performance applications, making it suitable for enterprises of all sizes.
 High Availability: Features like Real Application Clusters (RAC), Data Guard, and
backup/recovery options ensure minimal downtime and data loss.
 Security: Oracle provides robust security features, including encryption, access controls,
and auditing, to protect sensitive data.

Question 2:
What are pros and cons of oracle database?
Pros and Cons of Oracle Database
Pros:
1. Performance & Scalability
o Oracle is optimized for high performance with features like Real Application
Clusters (RAC) and in-memory processing.
o Scales well for large enterprise applications and supports distributed databases.
2. Security
o Advanced security features such as Transparent Data Encryption (TDE), Virtual
Private Database (VPD), and Data Masking.
o Ensures compliance with industry security standards.
3. High Availability & Reliability
o Features like Data Guard, Flashback Technology, and Automatic Storage
Management (ASM) provide continuous availability and disaster recovery.
4. Multi-Platform Support
o Runs on multiple operating systems, including Windows, Linux, and UNIX.
o Supports hybrid cloud environments (on-premises & cloud deployment).
5. Strong Support & Documentation
o Extensive community and enterprise support from Oracle.
o Regular updates and improvements.
Cons:
1. High Cost
o Licensing and maintenance costs are expensive, making it less ideal for small
businesses.
o Additional costs for advanced features (e.g., RAC, Partitioning).
2. Complexity
o Requires highly skilled DBAs for setup, tuning, and management.
o Steep learning curve for new users.
3. Resource-Intensive
o Demands high CPU and memory resources, leading to higher hardware costs.
o Can be overkill for small applications.
4. Vendor Lock-in
o Switching to another database can be challenging due to proprietary technologies
and PL/SQL dependency.
5. Frequent Patches & Updates
o Regular updates require careful planning and testing to avoid downtime or
compatibility issues.

Question 3:
What are different types of SQL Statements? Explain with examples
Types of SQL Statements with Examples
SQL statements are categorized into five main types:
1. Data Query Language (DQL)
Used to retrieve data from a database.
 Example (SELECT Statement):
SELECT * FROM employees;
 Retrieves all columns from the employees table.
 Can include filtering using WHERE, sorting using ORDER BY, etc.
2. Data Definition Language (DDL)
Used to define and manage database structures. These commands are autocommitted (changes
cannot be rolled back).
 Example (CREATE Statement - Creates a Table):
CREATE TABLE employees (
emp_id INT PRIMARY KEY,
name VARCHAR (100),
salary DECIMAL (10,2),
department VARCHAR (50)
);
 Example (ALTER Statement - Modifies a Table):
ALTER TABLE employees ADD COLUMN age INT;
o Adds a new column age to the employees table.
 Example (DROP Statement - Deletes a Table):
DROP TABLE employees;
o Deletes the employees table permanently.

3. Data Manipulation Language (DML)


Used to manipulate data within tables. DML commands can be rolled back (not auto-
committed).
 Example (INSERT Statement - Adds Data):
INSERT INTO employees (emp_id, name, salary, department)
VALUES (101, 'John Doe', 60000, 'HR');
 Example (UPDATE Statement - Modifies Data):
UPDATE employees SET salary = 70000 WHERE emp_id = 101;
DELETE FROM employees WHERE emp_id = 101;
4. Transaction Control Language (TCL)
Used to manage transactions in SQL.
 Example (COMMIT Statement - Saves Changes):
COMMIT;
o Saves all changes made during the current transaction.
 Example (ROLLBACK Statement - Reverts Changes):
ROLLBACK;
o Undoes all uncommitted changes in the current transaction.
 Example (SAVEPOINT Statement - Creates a Save point in a Transaction):
SAVEPOINT sp1;
o Creates a save point sp1 in the transaction, allowing a rollback to this point.

QUESTION 4:
Perform following Sql queries.

 Retrieve all data of Employee from database.


 Retrieve and display DEPARTMENT data from Oracle.

 Describe EMPLOYEE data


by performing Sql query.

 Display all data from EMPLOYEE where COMM is unknown.


 Arrange EMPLOYEE table by setting lines and pages.

 Display HIRING DATE from EMPLOYEE


table.

 Display all the data from EMPLOYEE table whose Department number is 30.
 Display all the data from DEPARTMENT table whose Department number is 10.

 Display Department Name and Location of DEPARTMENT table.

 Fetch and Display Employee Name column from EMPLOYEE table.

 Retrieve and display Job, Hire Date and Salary columns from EMPLOYEE table.

You might also like