pengenalan database by muhamadmaftuhin

VIEWS: 443 PAGES: 5

									                           Database System                                                                                              Lecture 1
                                                        1                                                                                               2

                      S E K O L A H T I N G G I I L M U S T A T I S T IK                                                   IN T R O D U C T I O N T O D ATA B A S ES
                                        J A KA RT A




Dr. Said Mirza P.         © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS   Dr. Said Mirza P.    © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS




                                          Objectives                                                                            Some Definitions
                                                        3                                                                                               4

                                                                                                      Database
    Some brief definitions
                                                                                                            A collection of related data
    Some common uses of database systems.
                                                                                                      Database Management System (DBMS)
    Characteristics of file-based systems.
                                                                                                            A software that manages and control accesses to the database
    Problems with file-based approach.
                                                                                                      Database Application
    Meaning of the term database.                                                                          A program that interacts with the database at some point in its
    Meaning of the term Database Management                                                                 execution
        System (DBMS).                                                                                Database System
                                                                                                            A collection of application programs that interact with the
                                                                                                             database


Dr. Said Mirza P.         © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS   Dr. Said Mirza P.    © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS




                Examples of Database Applications                                                                             File-Based Systems
                                                        5                                                                                               6

    Purchases from the supermarket
           Bar code reader  app prog  DB (update stock number)
                                                                                                        Collection of application programs that perform
    Purchases using your credit card                                                                       services for the end users (e.g. reports).
           Card reader  app prog customer DB & stolen DB
    Booking a holiday at the travel agents                                                             Each program defines and manages its own data.
           Ensure not to overbook the seat
    Using the local library
           Bar code reader  app prog book DB (borrow & return)
    Taking out insurance
           A broker accesses several insurance company databases
    Using the Internet
           Bookstore to buy books and purchase by using a credit card (both uses DB)
    Studying at university
           Student database



Dr. Said Mirza P.         © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS   Dr. Said Mirza P.    © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS
                         File-Based Processing                                                                    Limitations of File-Based Approach
                                                      7                                                                                               8


                                                                                                       Separation and isolation of data
                                                                                                            Each program      maintains its own set of data.
                                                                                                            Users   of one program may be unaware of
                                                                                                               potentially useful data held by other programs.

                                                                                                       Duplication of data
                                                                                                            Same   data is held by different programs.
                                                                                                            Wasted   space and potentially different values
                                                                                                             and/or different formats for the same item.
                                                                                                            It costs time & money to enter data more than once
                                                                                                            Loss of data integrity


Dr. Said Mirza P.       © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS   Dr. Said Mirza P.    © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS




               Limitations of File-Based Approach                                                                          Database Approach
                                                      9                                                                                              10

     Program – Data dependence                                                                        The file-based approach limitations arose:
       File structure is defined in the program code.                                                      Definition of data was embedded in application
       It is difficult to change the file structure.                                                        programs, rather than being stored separately and
            Need to change both the file and accessing programs.                                            independently.
              e.g., change PropertyForRent address field from 40 to 41.
               Creating one-off program & modify all accessing programs                                     No control over access and manipulation of data
                                                                                                             beyond that imposed by application programs.
     Incompatible file formats
                                                                                                       Result:
       Programs are written in different languages (e.g., COBOL
        & C), and so cannot easily access each other’s files.                                                 the database and Database Management System
                                                                                                               (DBMS).
     Fixed Queries/Proliferation of application programs
       Programs are written to satisfy particular functions.
       Any new requirement needs a new program.


Dr. Said Mirza P.       © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS   Dr. Said Mirza P.    © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS




                                         Database                                                            Database Management System (DBMS)
                                                     11                                                                                              12

    Definition: shared collection of logically related
        data and a description of this data, designed to                                               A software system that enables users to define,
        meet the information needs of an organization.                                                     create, maintain, and control access to the
            Shared large repository of data with metadata                                                 database.
            Self-describing collection of integrated records
    System catalog (metadata) provides description of
        data to enable program–data independence.                                                      (Database) application program: a computer
            The description is not embedded                                                               program that interacts with database by issuing
    Logically related data comprises entities, attributes,                                                an appropriate request (SQL statement) to the
        and relationships of an organization’s information.                                                DBMS.
            Entities: branch and staff
            Property: branchNo and staffNo
            Relationship: a branch has staff

Dr. Said Mirza P.       © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS   Dr. Said Mirza P.    © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS
           Database Management System (DBMS)                                                                                     DBMS Functionalities
                                                     13                                                                                                      14


                                                                                                             Data definition language (DDL).
                                                                                                                  Permits specification of data types, structures and
                                                                                                                   any data constraints.
                                                                                                                  All specifications are stored in the database.



                                                                                                             Data manipulation language (DML).

                                                                                            Figure 1.5              General enquiry facility (query language) of the data.




Dr. Said Mirza P.       © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS         Dr. Said Mirza P.      © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS




                         DBMS Functionalities                                                                                                         Views
                                                     15                                                                                                      16


   Controlled access to database may                                                                        Allows each user to have his or her own view of
       include:                                                                                                  the database.
                                                                                                                    e.g., contract department wants to see for a rental
          a security system
                                                                                                                     property shown in Figure 1.5
          an integrity system
          a concurrency control system
          a recovery control system                                                                         A view is essentially some subset of the database.
          a user-accessible catalog.




Dr. Said Mirza P.       © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS         Dr. Said Mirza P.      © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS




                                 Views - Benefits                                                                      Components of DBMS Environment
                                                     17                                                                                                      18


     Reduce complexity
            A view based on necessities
     Provide a level of security
            Excluding data that some users should not see
     Provide a mechanism to customize the appearance of
         the database
            Call field rent as Monthly Rent
     Present a consistent, unchanging picture of the
         structure of the database, even if the underlying
         database is changed
            Field added or removed, relationships changed, renamed etc.

Dr. Said Mirza P.       © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS         Dr. Said Mirza P.      © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS
              Components of DBMS Environment                                                                      Components of DBMS Environment
                                                      19                                                                                                       20


     Hardware                                                                                           Procedures
          Can range from a PC to a network of computers.
                                                                                                              Instructions   and rules that should be applied to
          Client-server architecture (backend & frontend)
     Software                                                                                                   the design and use of the database and DBMS.
       DBMS, operating system, network software (if
                                                                                                                  Log in,       start/stop DBMS, backup etc.
       necessary) and also the application programs (3GL                                                 People
       such as Java, VB etc. & 4GL such as SQL embedded
       in 3GL).
     Data
            Used by the organization and a description of this data called
             the schema.
            Four schema/tables: PropertyForRent, PrivateOwne r, etc.



Dr. Said Mirza P.        © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS   Dr. Said Mirza P.             © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS




                Roles in the Database Environment                                                                    Roles in the Database Environment
                                                      21                                                                                                       22


    Data Administrator (DA)                                                                            Database Designers (Logical and Physical)
            Manage the data resource (DB planning, conceptual/logical DB                                       Conceptual/logical DB
             design etc.)                                                                                              Identifying the data (entities & attributes), and their
                                                                                                                        relationships & constraints
    Database Administrator (DBA)
                                                                                                                       Understand the data and business rules (main characte ristics of
            Physical realization of DB (physical DB design &                                                           the data as viewed by the organization)
             implementation, security and integrity control etc.)
                                                                                                                Physical DB design
                                                                                                                       Deciding how the logical DB design is to be physically realized
                                                                                                                       e.g., mapping logical DB design into a set of tables and integrity
                                                                                                                        constraints




Dr. Said Mirza P.        © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS   Dr. Said Mirza P.             © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS




                Roles in the Database Environment                                                                                 Advantages of DBMSs
                                                      23                                                                                                       24


    Application Programmers                                                                             Control of data redundancy
            Creating program to access the DB (retrieve, insert, update                                        Can be duplicated for performance reason
             & delete data)                                                                              Data consistency
    End Users                                                                                                  Store data in one place
            Naïve: unaware of the DBMS                                                                  More information from the same amount of data
            Sophisticated: familiar with the structure of the database                                         Data integration
             and the provided database facilities                                                        Sharing of data
                                                                                                                The database belongs to the entire organization; not to
                                                                                                                 departments




Dr. Said Mirza P.        © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS   Dr. Said Mirza P.             © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS
                        Advantages of DBMSs                                                                                Advantages of DBMSs
                                                     25                                                                                                26


     Improved data integrity (constraints)                                                            Balance conflicting requirements
            Validity and consistency of stored data
                                                                                                              The database is under control of a DBA that can make
     Improved security                                                                                        best decisions base on user needs
       Usernames and passwords for authorization
            Access by operation types: retrieval, insert, update &                                    Improved data accessibility and responsiveness
             delete                                                                                           The integrated data is directly accessible to the end users
     Enforcement of standards                                                                                 by using program, query language and report writers
            Data formats, naming conventions, document standards,                                     Increased productivity
             update procedures and access rules
                                                                                                              DBMS provides all the low level file-handling routines
     Economy of scale
                                                                                                               (typical in application programs)
            Combining operational data into one database and
             managing them can result in cost savings                                                         Also provides 4th generation environment


Dr. Said Mirza P.       © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS   Dr. Said Mirza P.      © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS




                        Advantages of DBMSs                                                                              Disadvantages of DBMSs
                                                     27                                                                                                28


    Improved maintenance through data                                                                Complexity
        independence                                                                                    Database design, access policy etc.

            DBMS separates data descriptions from the applications                                   Size
    Increased concurrency                                                                                    A large piece of software requiring substantial memory to run
            DBMS manages concurrent database access                                                  Cost of DBMS
    Improved backup and recovery services                                                                    Depends on the user number, maintenance cost etc.
            Minimize the amount of processing that is lost following a                               Additional hardware costs
             failure
                                                                                                              Disk storage, dedicated machines for DBMS servers etc.




Dr. Said Mirza P.       © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS   Dr. Said Mirza P.      © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS




                      Disadvantages of DBMSs                                                                                                      Kuis
                                                     29                                                                                                30

                                                                                                    Sebutkan dua contoh database system
   Cost of conversion
                                                                                                          Jelaskan fungsi database nya
           Converting existing apps to run on new DBMS & hardware
                                                                                                          Jelaskan operasi yang digunakan pada database tersebut
           Staff training
   Performance
           DBMS is developed for general application compared to a file-
            based system
   Higher impact of a failure
           Centralization of resource increases the vulnerability of the
            system.



Dr. Said Mirza P.       © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS   Dr. Said Mirza P.      © Pearson Education Limited 1995, 2005 - Has Been Modified for STIS, BPS

								
To top