Introduction DBA

download Introduction DBA

of 4

Transcript of Introduction DBA

  • 8/13/2019 Introduction DBA

    1/4

    Database Administration--Introduction 1

    The amount of information available to us areliterally exploding

    Managing large amounts to data correctly and fast tomake data an asset than a liability

    Businesses as main reason for the development ofDBMS(transactions, processes, and over viewing)

    A database is a collection of data, typically describing the

    activities of one or more related organizations. For example, a

    university database might contain information about the

    following:

    Entities such as students, faculty, courses, andclassrooms.

    Relationshipsbetween entities, such as students'enrollment in courses, faculty teaching courses, and

    the use of rooms for courses.

    Database Applications:

    Banking: all transactions

    Airlines: reservations, schedules

    Universities: registration, grades

    Sales:customers, products, purchases

    Manufacturing: production, inventory, orders, supplychain

    Human resources: employee records, salaries, taxdeductions

    A database management system, or DBMS, is software

    designed to assist in maintaining and utilizing large collections

    of data, and the need for such systems, as well as their use, is

    growing rapidly.

    File Systems, on the other hand, is the management of files

    within an organization without the help of machines, thus only

    incorporating manual process of storage and retrieval of data.

    File Systems vs Database Systems

    Disadvantages of File Systems

    Data redundancy and inconsistency

    Difficulty in accessing data

    Data isolation

    Integrity problems

    Atomicity of updates

    Concurrent access by multiple users

    Security problems

    Advantages of DBMS

    Data independence Efficient data access

    Data integrity and security

    Data administration

    Concurrent access and crash recovery

    Reduced application development time

    People who deal with databases:

    Database implementers-who builds the DBMS software

    End users-who uses the DBMS, storing and retrieval of data

    Database application programmers

    Develop packagesthat facilitate data access for endusers

    Uses data languages and DBMS tools

    Database Administrator

    Design of the conceptual and physical schemaresponsible for interacting with the users of the

    system to understand what data is to be stored in the

    DBMS and how it is likely to be used. Must design

    the conceptual schema and the physical schema

    Conceptual Schema- The layout of reports,

    screens, forms, web pages, and other data entry

    and presentation vehicles are finalized during

    this phase

    Physical Schema- actual hardware and systems

    software that will be used to implement the

    application(s) and database(s)

    Security and authorizationensures thatunauthorized data access is not permitted. Not

    everyone should able to access data. Usually, end

    users have the lowest access level

    Data availability and recovery from failuresensure that when the system fails, user can continue

    to access much of the corrupted data as possible.

    Restores data into a consistent state. Backs up data

    periodically and maintain logs of activity.

    Database tuningusers needs evolves every time.Responsible for modifying the database.

    Levels of Abstraction

    Physical leveldescribes how a record (e.g.,customer) is stored.

    Logical level:describes data stored in database, andthe relationships among the data.

    typecustomer = recordname: string;

    street: string;

    city: integer;

    end;

    View level:application programs hide details of datatypes. Views can also hide information (e.g., salary)

    for security purposes.

  • 8/13/2019 Introduction DBA

    2/4

    Database Administration--Introduction 2

    Elements of a Database

    Database SchemaSchema-structure of the database

    Logical Schema- describes the stored data in terms of thedata model of the DBMS

    Example:

    Students(sid: string, name: string, login: string,

    age: integer,gpa: real)

    Faculty(_d: string,fname: string,sal: real)

    Courses(cid: string, cname: string, credits: integer)

    Rooms(rno: integer, address: string, capacity:

    integer)

    Enrolled(sid: string, cid: string,grade: string)

    Teaches(_d: string, cid: string)

    Meets In(cid: string, rno: integer, time: string)

    Physical Schema- summarizes how the relationsdescribed in the conceptual schema are actually stored on

    secondary storage devices

    External Schema-allow data access at the level ofindividual users

    Tables-primary unit of physical storage for data in a database

    Field-special category of information that exists in a table

    Records-a row of data in a table

    Data Types-type of data to be stored in a database record

    -commonly used are letters, number, date and time

    Primary Keys-unique value in the record, used to join tables

    Foreign Keys-values that references a primary key in another

    table

  • 8/13/2019 Introduction DBA

    3/4

    Database Administration--Introduction 3

    Relationships

    One-to-oneOne record in a table is related to onlyone record in another table.

    One-to-manyOne record in a table can be relatedto many records in another table.

    Many-to-manyOne record in a table can berelated to one or more records in anothertable, and one or more records in the second tablecan be related to one or more recordsin the first table.

    Database Models Flat-file database model-straight approach Hierarchical database model-parent/child relation Network database model-shares child table Object-oriented (OO) database model-w/ c++ or java Object-relational (OR) database model

    Relational database model-allows us to describe datainvolved in a real world enterprise in terms of objectsand relationships

    -most stable-easy to convert, define, manipulate-higher integrity level

    The ER(Entity Relationship) ModelIt provides useful concepts that allows us to move from an

    informal description of what users want from their database to

    a more detailed, and precise, description that can be

    implemented in a DBMS.

    Entity sets Customer and Loan

  • 8/13/2019 Introduction DBA

    4/4

    Database Administration--Introduction 4

    Attribues

    ER Diagrams

    Rectanglesrepresent entity sets.

    Diamondsrepresent relationship sets.

    Lineslink attributes to entity sets and entity sets torelationship sets.

    Ellipsesrepresent attributes

    Double ellipsesrepresent multivaluedattributes.

    Dashed ellipsesdenote derived attributes.

    Underlineindicates primary key attributes

    Cardinality Constraints-We express cardinality constraints

    by drawing either a directed line (), signifying one, or an

    undirected line (), signifying many, between the

    relationship set and the entity set.

    Can also be expressed as Chens notation

    *=many

    1=one

    0=none

    A number can also limit the maximum allowed entries

    Can also be expressed as crows foot(Barker Notation)

    many

    one to many

    zero to many

    one to one

    Example problem,consider a hospital:

    Patientsare treatedin a single wardby

    the doctorsassigned to them. Usually each patient

    will be assigneda single doctor, but in rare cases theywill have two.

    Heathcare assistantsalso attendto the patients, a

    number of these are associatedwith each ward.

    Initially the system will be concerned solely with

    drug treatment. Each patient is required to takea

    variety of drugsa certain number of times per day

    and for varying lengths of time.

    The system must recorddetails concerning patient

    treatment and staff payment. Some staff

    are paidpart time and doctors and care assistants

    work varying amounts of overtime at varying rates(subject to grade).

    The system will also need to trackwhat treatments

    are required for which patients and when and it

    should be capable of calculating the cost

    of treatmentper week for each patient.