Introduction to Databases by Levone

VIEWS: 9 PAGES: 23

									COMM1E Lecture One




               Introduction to Databases




                                           Slide 1
COMM1E Lecture One


                     Objectives
BE ABLE TO IDENTIFY:
• Some common uses of databases
• Characteristics of file-based systems
• Problems of file-based systems
• the meaning of the term database
• the major components of a DBMS
• the advantages and disadvantages of a DBMS


                                               Slide 2
COMM1E Lecture One


              Common Uses of Databases

• Try to think why each of these need to use a database:
     –   Supermarkets
     –   Insurance
     –   Credit Cards/Banking
     –   Libraries
     –   Travel Agents
     –   Universities
     –   Engineering


                                                     Slide 3
COMM1E Lecture One


                     File Based Systems

DEFINITION

• A collection of application programs that perform
  services to end users.
• Each program defines and manages its own data.




                                                      Slide 4
COMM1E Lecture One


                     File Based Processing

                     Data Entry File handling
                     & Reports Routines
                                File Definition
                                                  Sales Files
                                File handling
                     Data Entry Routines
                     & Reports
                                File Definition
                                                  Lease Files
                                                        Slide 5
COMM1E Lecture One


        Limitations of File Based Systems

•   Separation & Isolation of Data
•   Data Dependence
•   Duplication of Data
•   Incompatible file formats

• How do we resolve these problems?



                                            Slide 6
COMM1E Lecture One


                 The Database Approach
DEFINITION

• A shared collection of logically related data
  designed to meet the information requirements
  of an organisation




                                             Slide 7
COMM1E Lecture One


                      Database Processing
                      Data Entry
                      & reports

Sales                Application
                     Programs        DBMS


                     Data Entry             Database
                     & reports
Leases               App. Programs
                                              Slide 8
COMM1E Lecture One


   Database Management System (DBMS)

DEFINITION
• A software system that enables users to define, create
  and maintain the database and which provides
  controlled access to the database




                                                      Slide 9
COMM1E Lecture One


                     Facilities of a DBMS
• Allows users to define the database (DDL)
• Allows users to insert, update, delete & retrieve data
  (DML)
• Provides controlled access
    –   a security system
    –   an integrity system
    –   a concurrency control system
    –   a recovery system
    –   a user accessible catalogue

                                                      Slide 10
COMM1E Lecture One


                 Components of a DBMS

•   Hardware
•   Software
•   Data
•   Procedures
•   People




                                        Slide 11
COMM1E Lecture One


                     Advantages
•   Minimal data redundancy
•   Consistency of data
•   Integration of data
•   Improved integrity
•   Consistent security
•   Standards
•   Increased productivity

                                  Slide 12
COMM1E Lecture One


                     Disadvantages
 •   Complexity
 •   Additional Hardware Costs
 •   Size
 •   Performance
 •   Experts -Specialised Personnel
 •   Potential organisational Conflict
 •   Higher impact of failure
                                         Slide 13
COMM1E Lecture One


                     Types of DBMS

Early Types of DBMS
     – Hierarchical
     – Network
Current Generation
     – Relational
Advanced Systems
     - Object Based

                                     Slide 14
COMM1E Lecture One


        Hierarchical Model - An Example

                                  CUSTOMER




                                   ORDER




                     ORDER ITEM              SHIPMENT




                                                        Slide 15
COMM1E Lecture One


               Network Model - Example

                                   CUSTOMER         ORDER 1


                     ORDER 6


                                                        ORDER 2

                      ORDER 5




                                ORDER 4             ORDER 3


                                                                     ORDER ITEM 3



                                     ORDER ITEM 1     ORDER ITEM 2



                                                                          Slide 16
COMM1E Lecture One


                     Relational Database
• Relational database system devised by Codd in 1970
• An attempt to devise a standard model with a sound
  mathematical basis
     – why does this differ to the previous systems?
• Most successful database model
• Most use the query language SQL
• Examples include:
     – Oracle, Microsoft Access, SQL Server, MySQL


                                                       Slide 17
COMM1E Lecture One


           Relational Database - Example

• BRANCH relation
       branchNo         street           city           postcode
       B005             22 Deer Rd       London         SW1 4EH
       B007             16 Argyll St     Aberdeen       AB2 3SU
       B003             163 Main St      Glasgow        G11 9QX
• STAFF relation
        StaffNo      Name         Position     Salary   branchNo
        SL21         John White   Manager      30000    B005
        SG37         Ann Beech    Assistant    12000    B003
        SG14         David Ford   Supervisor   18000    B003

                                                                   Slide 18
COMM1E Lecture One


                        SQL

What is it?
Structured Query Language
• Used in ORACLE and other DB systems
• Non-procedural - i.e. Specify what you want not how
  to get it
• SQL - (also pronounced SEQUEL)
  directly related to the development of the
  RELATIONAL MODEL by E.F.Codd.

                                                  Slide 19
COMM1E Lecture One


                     Example SQL Queries

• select branchNo, city
  from branch;
• select *
  from branch
  where branchNo = ‘B003’;
• select b.branchNo, name
  from branch b, staff s
  where b.branchNo = s.branchNo;
                                           Slide 20
COMM1E Lecture One


                     Object Databases

• Current generation systems have a need to handle
  complex data for complex applications such as
     –   computer aided design
     –   computer aided software engineering
     –   geographic information systems
     –   interactive web sites
• Relational systems are inadequate for these systems
     – Why do you think this is?


                                                     Slide 21
COMM1E Lecture One


                     Object Database Types

• Object-oriented
     – extend a programming language such as Java with
       persistency and a query language
• Object-relational
     – extend a current RDBMS (e.g. Oracle) with object-oriented
       extensions
• We will revisit Object databases in a later lecture



                                                            Slide 22
COMM1E Lecture One


                     Further Reading

• Introduction
     – Connelly and Begg, chapter one
• Object Oriented databases
     – Connelly and Begg, chapter 24
• Next week: Database Theory
     – Relational Model
     – Set Theory
     – SQL

                                        Slide 23

								
To top