abhay singh

Upload: vision2050

Post on 05-Apr-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 Abhay Singh

    1/28

    A Summer Training Presentation

    on Oracle 9i and Database

    Administration

    Presented By:Name-Abhay Singh

    Roll no.-0812710401

    Branch-CSE(7th Semester )

  • 8/2/2019 Abhay Singh

    2/28

    Database Management System

    Database

    A set of inter-related data acting as a central reservoir of datathat can be accessed by many users

    DBMSThe software that manages database. A computer-based recordkeeping system which consists of software for processing acollection of interrelated data.

    Database Administrator

    Centrally manages the database. The DBA initially studies theSystem and accordingly decides its various process.

  • 8/2/2019 Abhay Singh

    3/28

    Oracle Internet Platform

    Clients

    Systemmanageme

    nt

    Network services

    DatabasesApplication

    servers

    Developme

    nttools

    Internet applications

    Presentation andbusiness logic

    Business logicand data

    Any browser Any FTP clientAny mailclient

    Java

    SQL

    PL/SQL

  • 8/2/2019 Abhay Singh

    4/28

    Introduction to SQL

    SQL is used to make a request to retrieve data from a database.

    The DBMS processes the SQL request, retrieves the requested

    data from the database, and returns it.

    This process of requesting data from a database and receivingback the results is called aDatabase Query and hence the

    name Structured Query Language.

    Efficient, easy to learn and use.

  • 8/2/2019 Abhay Singh

    5/28

    SQL Statements

    Data retrieval

    Select.

    Data manipulation language (DML)

    Insert,delete,update,merge.

    Data definition language (DDL)

    Create,alter,drop,rename,truncate.

    Transactional control

    Commit,rollback,savepoint.

    Data control language (DCL)

    grant,revoke.

  • 8/2/2019 Abhay Singh

    6/28

    SQL and iSQL*Plus Interaction

    SQL statements

    Oracleserver

    Query resultsiSQL*Pluscommands

    Client

    Formatted report

    InternetBrowser

    iSQL*Plus

  • 8/2/2019 Abhay Singh

    7/28

    SQL Statements Versus

    iSQL*Plus Commands

    SQL A language

    ANSI standard

    Keyword cannot beabbreviated

    Statements manipulate dataand table definitions in thedatabase

    iSQL*Plus An environment

    Oracle proprietary

    Keywords can beabbreviated

    Commands do not allowmanipulation of values inthe database

    Runs on a browser

    Centrally loaded, does nothave to be implemented oneach machine

  • 8/2/2019 Abhay Singh

    8/28

    Controlling User Access

    Databaseadministrator

    Users

    Username and passwordPrivileges

  • 8/2/2019 Abhay Singh

    9/28

    Privileges

    Database security:- System security

    - Data security

    System privileges: Gaining access to the database

    Object privileges: Manipulating the content of the database objects

    Schemas: Collections of objects, such as tables, views, andsequences

    The database administrator has high-level system privileges for taskssuch as:

    Creating new users

    Removing users Removing tables

    Backing up tables

  • 8/2/2019 Abhay Singh

    10/28

    Creating Users

    CREATE USER user

    IDENTIFIED BY password;

    CREATE USER scottIDENTIFIED BY tiger;

    User created.

    The DBA creates users by using theCREATEUSERstatement.

  • 8/2/2019 Abhay Singh

    11/28

    User System Privileges

    Once a user is created, the DBA can grant specific system privileges to auser.

    GRANT privilege[, privilege...]TO user[, user| role, PUBLIC...];

    An application developer, for example, may have the followingsystem privileges: CREATE SESSION

    CREATE TABLE

    CREATE SEQUENCE

    CREATE VIEW

    CREATE PROCEDURE

  • 8/2/2019 Abhay Singh

    12/28

    What is a Role?

    Allocating privilegeswithout a role

    Privileges

    Users

    Manager

    Allocating privilegeswith a role

  • 8/2/2019 Abhay Singh

    13/28

    Creating and Granting Privileges to a Role

    Create a role

    Grant privileges to a role

    Grant a role to users

    CREATE ROLE manager;

    Role created.

    GRANT create table, create view

    TO manager;

    Grant succeeded.

    GRANT manager TO DEHAAN, KOCHHAR;

    Grant succeeded.

  • 8/2/2019 Abhay Singh

    14/28

    Changing Password

    The DBA creates your user account and initializes your

    password.

    You can change your password by using the ALTER USER

    statement.

    ALTER USER scott

    IDENTIFIED BY lion;

    User altered.

  • 8/2/2019 Abhay Singh

    15/28

    Oracle 9i Enterprise

  • 8/2/2019 Abhay Singh

    16/28

    Primary Components of Oracle Server

    Architecture Oracle server: There are several files, processes and memory

    structures in an oracle server, not all of them are used whenprocessing a SQL statement. The oracle server consists of an oracleinstance and an oracle database.

    Oracle instance: An oracle instance is the combination of thebackground processes and memory structures.

    Oracle database: An oracle database consists of operating system

    files, also known as database files that provide the actual physicalstorage for database information. The database files are used toensure that the data is kept consistent and can be recovered in theevent of a failure of a instance.

  • 8/2/2019 Abhay Singh

    17/28

    Database Administrator

    A database administrator (DBA) is a person who is

    responsible for the environmental aspects of a database. Ingeneral, these include:

    a) Recoverability - Creating and testing backups

    b) Integrity - Verifying or helping to verify dataintegrity

    c) Security - Defining and/or implementing access

    controls to the data

    d) Performance - Ensuring maximum performance

  • 8/2/2019 Abhay Singh

    18/28

  • 8/2/2019 Abhay Singh

    19/28

    PROJECT ON

    LIBRARY MANAGEMENT SYSTEM

    The objective of this project is the development of a system which couldovercome the problem of handling the large data manually

    Present Library system is totally handled through pen and paper .Bigand thick register are being used to maintain the book records .Onebook is entered in different registers to maintain proper records .Thiscauses a lot of data redundancy .This make the updating of books verydifficult i.e. if changes are done there is greater probability of datainconsistency which causes a lot of problem.

  • 8/2/2019 Abhay Singh

    20/28

    APPLICATION THAT ARE PERFORMEDBY THIS PROGRAM IS SHOWN AS-In books record in library

    ADD NEW RECORDDELETE RECORDMODIFY RECORDSHOW RECORD

    In membership record in library

    ADD NEW MEMBERDELETE MEMBERMODIFY RECORDSHOW MEMBER RECORD

    In issue return

    TO ISSUE BOOKSTO RETURN BOOKSTOSHOW ISSUED BOOKS

  • 8/2/2019 Abhay Singh

    21/28

    TABLE DESIGN

    Account : Table

    S.No.

    FieldName

    Data Type

    1 Accno Number2 Total_limit Number3 Books_left Text4 Status Text

    Issue : Table

    S.No.

    Field Name DataType

    1 Bno Number2 Id Number

    3 Issue_date Date/time4 Due_date Date/tim

    e5 Copies_avail

    ableNumber

  • 8/2/2019 Abhay Singh

    22/28

    User : Table

    S.No.

    FieldName

    Data Type

    1 Id Number2 Roll_no Number3 Name Text4 Branch Text

    Book : Table

    S.No

    .

    Field

    Name

    Data Type

    1 B_no Number2 ISBN Number3 Subject Text4 Name Text5 Author Text6 Publisher Text7 Editor Number8 Copies Number9 Cost Number

    Issue_return : Table

    S.No.

    FieldName

    Data Type

    1 B_no Number

    2 Id Number

    3 Issue_date Date/Time4 Due_date Date/Time

    5 Return_date

    Date/time

    6 Fine Number

    7 Copies_av

    ailable

    Number

  • 8/2/2019 Abhay Singh

    23/28

    PROJECT DETAILS

  • 8/2/2019 Abhay Singh

    24/28

  • 8/2/2019 Abhay Singh

    25/28

  • 8/2/2019 Abhay Singh

    26/28

  • 8/2/2019 Abhay Singh

    27/28

    MAIN MENU

    ADMINISTRATIVEWORK

    ISSUE/

    RETURN

    Issue

    View

    Members

    EXITSEARCH

    ADD/

    DELETE

    VIEW

    DELETED

    ITEMS

    MODIFY

    EXIT

    ADDITION

    DELETE

    RETURN

    VIEW

    PACK

    RETREIVE

    VIEW

    NAME

    AUTHORS NAME

    CLASS NUMBER

    ACCESSION NUMBER

    BY BOOKNUMBER BY BOOK NAME

  • 8/2/2019 Abhay Singh

    28/28

    THANK YOU!!!!!!!