1 / 29

Introduction

Chapter 1. Introduction. Reference Book. Database Systems Thomas Connolly, Carolyn Begg, Anne Strachan Addison-Wesley 1999 ISBN: 0-201-34287-1. What is a database ?. The database is the underlying framework of the information system fundamentally changed the way organisations operate

tori
Download Presentation

Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 1 Introduction

  2. Reference Book • Database Systems Thomas Connolly, Carolyn Begg, Anne Strachan Addison-Wesley 1999 ISBN: 0-201-34287-1

  3. What is a database ? The database • is the underlying framework of the information system • fundamentally changed the way organisations operate Database technology is still in evolution due to the need for more complex information systems, handling different types of objects . This lead to new file storage and access algorithms.

  4. Definitions Database: A shared collection of logically related data (and a description of these data) , designed to meet the information needs of an organisation DBMS: Database Management System Software that enables users to define ,create and maintain the database and which provides controlled access to the database

  5. File Based Approach File-based system A collection of application programs that perform services for the end-users such as the production of reports. Each program defines and manages its own data. Program Works well if the number of items to be stored is small and related to one object type

  6. File-based Processing Overlap

  7. Limitations of the File-based System • Separation and isolation of data • Duplication of data • Program-Data dependence • one-shot program needed to increase the field size • File structure is defined in the program code. • Incompatibility of files (e.g. formats ) • Programs are written in different languages, and so cannot easily access each others files. • Fixed queries leading to proliferation of application programs

  8. Database Approach The limitations of file-based systems are attributed to two factors: • the definition of the data is embedded in the application program using the data , rather than being stored or defined separately and independently • there is no control over the access and manipulation of data beyond that imposed by the application programs being executed

  9. DB Database Approach Applications

  10. Explanation of the Definition The definition of a database was: A shared collection of logically related data (and a description of these data) , designed to meet the information needs of an organisation. • Shared collection means that the database: • should not be seen as owned by one person or one department • holds not only the the organisation’s operational data but is also based on a common description of the data (system catalog, data dictionary, metadata, central repository) providing program-data independence. • Logically related means that : • not only the entities and the attributes but also the logical relationships between entities are represented in the database

  11. The DBMS • DBMS • Software that enables users to define ,create and maintain the database and which provides controlled access to the database • System software with two basic qualities: • ability to manage persistent data • ability to access large amounts of data efficiently • Other capabilities • support for at least one data model providing a user view • support for high level languages • transaction management ( concurrency ) • access control: validation and authorization • recovery system

  12. Database Management System (DBMS)

  13. DBMS facilities • define the database through a Data Definition Language (DDL) • insert, update, delete and retrieve data from the database through a Data Manipulation Language (DML) based upon the central repository • procedural DML manipulating the database with a one-record-at-a-time logic , describing how data should be obtained • non-procedural DML operating on sets of records , describing what data should be obtained • controlled access to the database • security system • integrity system maintaining the consistency of stored data • recovery control system • user-accessible catalog

  14. DBMS facilities 2 • view mechanism allowing the user to have his or her preferred view of the database • the DDL allows views to be defined as a subset of the database • views provide a level of security • views provide a mechanism to customize the appearance of the database • views provide a level of data independence Modern large multi-user DBMS products offer these facilities and often much more. It are extremely complex software products which are continually evolving and extended with new functionalities

  15. Components of a DBMS • Hardware • Software • Data • names, types and sizes of data items • names of relationships • integrity constraints on the data • authorization rules • indexes and storage structures • Procedures • log on • use a DBMS facility or application program • make a backup or copy • change the structure or the physical location • People

  16. Components of DBMS Environment

  17. History of Database Systems • First-generation • Hierarchical and Network • Second generation • Relational • Third generation • Extended Relational • Object-Oriented

  18. Roles in the Database Environment • Data Administrator : management of the data resource • database planning, development, logical design, standards, policies, procedures, … • advisor of senior management concerning information plan • Database Administrator (DBA):physical aspects • physical database design, security, integrity control • Logical Database Designers • need a complete understanding of the organisation’s data, the business rules and the company strategic plan • Physical Database Designers • mapping logical model into a set of tables and constraints • select storage structures • Application programmers • End-Users : Naïve and Sophisticated

  19. Advantages of database systems • Control of data redundancy • Data consistency • More information from same amount of data • Sharing of data • Improved data integrity • Improved security • Enforcement of standards • Economy of scale • Balanced conflicting requirements • Improved data accessibility and responsiveness • Improved maintenance through data independence • Increased concurrency • Improved backup and recovery services

  20. Disadvantages of database systems • Complexity • Size • Cost of DBMS • Additional hardware costs • Cost of conversion • Performance • Higher impact of a failure

  21. Classical database models • Relational databases • Hierarchical databases • Network databases

  22. The Relational model A relational database can be seen as a set of tables with the following properties : 1. column homogeneous 2. all elements are numbers or character strings 3. all rows are different 4. the sequence of the rows is immaterial 5. columns have a different name Such a table said to be in First Normal Form

  23. Sample database: Relational Model Ss# sname status city S1 Smith 20 London S2 Jones 10 Paris S4 Clark 20 London SP s# p# qty S2 P1 300 S2 P2 400 S4 P2 200 S4 P4 300 S4 P5 400 Pp# pname color weight city P1 Nut red 12 London P2 Bolt green 17 Paris P4 Screw red 14 London P5 Cam blue 12 Paris

  24. Find Supplier numbers for those suppliers who supply part P2. Do until no more shipments; get next shipment where P# = P2 ; print S# ; end; Find Part numbers for parts supplied by supplier S2 Do until no more shipments; get next shipment where S# = S2 ; print P# ; end; Sample Query : Relational Model

  25. Sample Database: Hierarchical Model Links are anonymous P1 Nut Red 12 London P2 Bolt green 14 London S2 Jones 10 Paris 300 S4 Clark 20 London 200 S2 Jones 10 Paris 400 P4 Screw red 14 London P5 Cam blue 12 Paris S4 Clark 20 London 300 S4 Clark 20 London 400

  26. Sample Query : Hierarchical Model • Find Supplier numbers for those suppliers who supply part P2. • Get next part where P#=P2 • do until no more suppliers • under this part ; • get next supplier • under this part ; • print S# ; • end ; • Find Part numbers for parts supplied by supplier S2 • Do until no more parts ; • get next part ; • get next supplier • under this part • where S# = S2 ; • if found • then print P# ; • end;

  27. Network model: Non-information Bearing Sets S2 Jones 10 Paris S4 Clark 20 London S2 P1 300 S2 P2 400 S4 P2 200 S4 P4 300 S4 P5 400 P1 Nut Red 12 London P2 Bolt Green 12 Paris P4 Screw Red 14 London P5 Cam Blue 12 Paris

  28. Network model: Information Bearing Sets S2 Jones 10 Paris S4 Clark 20 London 300 400 200 300 400 P1 Nut Red 12 London P2 Bolt Green 12 Paris P4 Screw Red 14 London P5 Cam Blue 12 Paris

  29. Find Supplier numbers for those suppliers who supply part P2. Find Part numbers for parts supplied by supplier S2 Sample Query : Network Model Get next part where P#=P2 ; do until no more connectors under this part ; get next connector under this part ; get supplier over this connector ; print S# ; end ; Get next supplier where S#=S2 ; do until no more connectors under this supplier ; get next connector under this supplier ; get part over this connector ; print P# ; end ;

More Related