rdbms practical file diploma

25
RELATIONAL DATABASE MANAGEMENT SYSTEM SUBMITTED TO: SUBMITTED BY: LECT. ROHIT GOYAL MUSTKEEM ADD.NO.:14S121 BRANCH: 5 CS. DIGAMBER JAIN POLYTECHNIC BARAUT BAGHPAT

Upload: mustkeem-khan

Post on 21-Apr-2017

91 views

Category:

Education


5 download

TRANSCRIPT

Page 1: Rdbms Practical file diploma

RELATIONAL DATABASE MANAGEMENT SYSTEM

SUBMITTED TO: SUBMITTED BY:

LECT. ROHIT GOYAL MUSTKEEMADD.NO.:14S121

BRANCH: 5 CS.

DIGAMBER JAIN POLYTECHNIC BARAUT BAGHPAT

Page 2: Rdbms Practical file diploma

Admission no.:14S121

Page | 1

INTRODUCTION OF RDBMS:

RDBMSs have been a common choice for the storage of information in new databases used forfinancial records, manufacturing and logistical information, personnel data, and other applicationssince the 1980s. Relational databases have often replaced legacy hierarchicaldatabases and network databases because they are easier to understand and use. However,relational databases have received unsuccessful challenge attempts by objectdatabase management systems in the 1980s and 1990s (which were introduced trying to addressthe so-called object-relational impedance mismatch between relational databases and object-oriented application programs) and also by XML database management systems in the 1990s.

REQUIREMENT OF RDBMS (11g Release 2 32 bit):

Hardware Requirement:

IBM- Intel Pentium 4 processor or AMD Athlon, 3.0 GHz or greater or Intel or AMD Dual Coreprocessor, 2.0 GHz or greater.

Minimum of 2 GB RAM. A CD-ROM drive or USB port. A hard disk of 9 GB for installation and 6 GB free hard disk available not including installation

requirements. A mouse.

Software Requirement:

Operating system- Window XP or higher. Browser- Internet Explorer® 7.0 or later. .NET Framework-.NET Framework Version 4.0 Update 1. 11g express release 2 32 bit.

Setup of 11g express release 2 32 bit:

Step 1:

Download 11g express release 2 32 bit from “http://www.oracle.com/downloads.”

Page 3: Rdbms Practical file diploma

Admission no.:14S121

Page | 2

Step 2:

Accept License Agreement and download zip file to click download button.

win32_11gR2_database_1of2.zip (1,625,721,289 bytes).

win32_11gR2_database_2of2.zip (631,934,821 bytes).

Page 4: Rdbms Practical file diploma

Admission no.:14S121

Page | 3

Step 3:

Unzip files and move 1 folder both two unzip files.

Step 4:

Start setup in open folder and run 11g setup.

Page 5: Rdbms Practical file diploma

Admission no.:14S121

Page | 4

Page 6: Rdbms Practical file diploma

Admission no.:14S121

Page | 5

Page 7: Rdbms Practical file diploma

Admission no.:14S121

Page | 6

Page 8: Rdbms Practical file diploma

Admission no.:14S121

Page | 7

Page 9: Rdbms Practical file diploma

Admission no.:14S121

Page | 8

Page 10: Rdbms Practical file diploma

Admission no.:14S121

Page | 9

Step 5:

Open SQL Developer and create a database connection.

Page 11: Rdbms Practical file diploma

Admission no.:14S121

Page | 10

Page 12: Rdbms Practical file diploma

Program 1: Creating database.

- Creating a database- Creating a table- Specifying relational data types- Specifying constraints- Creating indexes.

Creating a data base:

1. Start Database Configuration Assistant.This procedure varies by platform. In Windows, for example, choose Start > All Programs >Oracle - OraDb11g_home1 > Configuration and Migration Tools > Database ConfigurationAssistant.

2. Click Next to skip the Welcome page.3. On the Operations page, select Create a Database, and then click Next..

Database Configuration Assistant guides you through the steps needed to create a database.

4. On the Database Templates page, select General Purpose or Transaction Processing, and thenclick Next

Page 13: Rdbms Practical file diploma

5. On the Database Identification page, type books in the Global Database Name and SID boxes,and then click Next

6. On the Management Options page, accept the default settings, and then click Next.7. On the Database Credentials page, set the user password(s), and then click Next.8. On the Database File Locations page, select “File System” for the Storage Type, select “Use

Database File Locations from Template” for the Storage Locations, and then click Next.9. On the Recovery Configuration page, accept the default settings, and then click Next.10. On the Database Content page, accept the default settings, and then click Next.11. On the Initialization Parameters page, select the following options, and then click Next.12. On the Database Storage page, accept the default settings, and then click Next.

Page 14: Rdbms Practical file diploma

13. On the Creation Options page, select Create Database, and then click Finish.

14. In the Confirmation dialog box that opens, review the configuration options (and save them toan HTML file if you like), and then click OK.

15. Click Exit in the message box that opens when Oracle finishes creating the database.16. Start SQL*Plus (sqlplus) and connect to the books database.

At a command prompt, type:sqlplus user/password@dbname.

Page 15: Rdbms Practical file diploma

Create a table:

Create index:

Page 16: Rdbms Practical file diploma

Program 2: Table and Record Handling.

- INSERT statement- Using SELECT and INSERT together- DELETE, UPDATE, TRUNCATE Statement.- DROP, ALTER statement.

Insert statement:

Select and Insert together:

Page 17: Rdbms Practical file diploma

DELETE, UPDATE, TRUNCATE:

Delete:

Update:

Truncate:

Page 18: Rdbms Practical file diploma

DROP, ALTER:

Drop table:

Alter :

Page 19: Rdbms Practical file diploma

Program 3: Retrieving Data from a Database.

- The SELECT statement- Using the WHERE clause- Using Logical Operators in the WHERE clause- Using In, BETWEEN, LIKE, ORDER BY, GROUP BY & HAVING clause- Using Aggregate Functions- Combining Tables Using JOINS.

Select:

Where clause:

Page 20: Rdbms Practical file diploma

Using IN,BETWEEN,LIKE,ORDER BY,GROUP BY,AND,HAVING clause:

IN operator:

BETWEEN operator:

Page 21: Rdbms Practical file diploma

LIKE operator:

ORDER BY operator:

Page 22: Rdbms Practical file diploma

GROUP BY operator:

HAVING clause:

Page 23: Rdbms Practical file diploma

Using aggregate function :

Sum()

Count()

Page 24: Rdbms Practical file diploma

Avg():

Max():

Page 25: Rdbms Practical file diploma

Min():