CSCU9Q5. Administrivia & Topics to be covered. Traditional File-Based Systems. Problems with Manual Filing Systems. CSCU9Q5- Database P&A

Similar documents
CSCU9Q5. Relational Algebra. Operators. Relational operators. Database Principles and Applications. CSCU9Q5 - Database P&A

Lecture 01. Fall 2018 Borough of Manhattan Community College

Introduction to Databases

Meaning & Concepts of Databases

CAS CS 460/660 Introduction to Database Systems. Fall

Database Systems: Learning Outcomes. Examples of Database Application. Introduction

Database Technologies. Madalina CROITORU IUT Montpellier

Database Systems. A Practical Approach to Design, Implementation, and Management. Database Systems. Thomas Connolly Carolyn Begg

Introduction Database Technology [DBTECO601]

Normalization. { Ronak Panchal }

Management Information Systems Review Questions. Chapter 6 Foundations of Business Intelligence: Databases and Information Management

Database Management System. Fundamental Database Concepts

Systems Development Life Cycle SDLC Planning Analysis Detailed systems design Implementation Maintenance 7 8 SDLC - Planning SDLC - Analysis Planning

Fundamentals of Database Systems (INSY2061)

COMP Instructor: Dimitris Papadias WWW page:

Northern India Engineering College, New Delhi Question Bank Database Management System. B. Tech. Mechanical & Automation Engineering V Semester

Where is Database Management System (DBMS) being Used?

4/28/2014. File-based Systems. Arose because: Result

UNIT I. Introduction

DATABASE MANAGEMENT SYSTEM

Course Introduction & Foundational Concepts

5/23/2014. Limitations of File-based Approach. Limitations of File-based Approach CS235/CS334 DATABASE TECHNOLOGY CA 40%

DATABASE DEVELOPMENT (H4)

CSCI1270 Introduction to Database Systems

CS317 File and Database Systems

DBMS (FYCS) Unit - 1. A database management system stores data in such a way that it becomes easier to retrieve, manipulate, and produce information.

Lecture 02. Fall 2017 Borough of Manhattan Community College

COURSES LEADING TO THE BCS CERTIFICATE IN INFORMATION SECURITY MANAGEMENT PRINCIPLES (CISMP)

Database Management Systems MIT Introduction By S. Sabraz Nawaz

Umoja Sales-Based Least-Out

CS425 Fall 2016 Boris Glavic Chapter 1: Introduction

Database Systems Overview. Truong Tuan Anh CSE-HCMUT

LECTURE1: PRINCIPLES OF DATABASES

Homework 2: E/R Models and More SQL (due February 17 th, 2016, 4:00pm, in class hard-copy please)

Database Systems Concepts *

Open Payment Pathway training notes

Property Systems Training Bulletin

FAQ: Relational Databases in Accounting Systems

G64DBS Database Systems. G64DBS Module. Recommended Textbook. Assessment. Recommended Textbook. Recommended Textbook.

John Edgar 2

Housing Estates Information Management System Based on.net. Jianliang Min

EXAMINATION FOR THE BSC (HONS) IN INFORMATION SYSTEMS; YEAR 2

Ian Kenny. November 28, 2017

DATABASE MANAGEMENT SYSTEMS. UNIT I Introduction to Database Systems

Course Outline Faculty of Computing and Information Technology

OLAP2 outline. Multi Dimensional Data Model. A Sample Data Cube

Conceptual Design with ER Model

UNIVERSITI SAINS MALAYSIA. CIT503 Databases and E-Commerce Rapid Application Development. CSI512 Database Management Systems

CMPT 354 Database Systems I. Spring 2012 Instructor: Hassan Khosravi

City University of Hong Kong Course Syllabus. offered by Department of Computer Science with effect from Semester A 2017/18

Database System Concepts

MIT Database Management Systems Lesson 01: Introduction

Prohire Software Systems Limited ("Prohire")

Privacy and Cookies Policy EH Hotel 2018 Ltd

We may change the privacy notice from time to time by amending this page. What type of information will we collect from you?

Top 88 Question Asked in Part I of MIS 150 EXAM #1 (Chapter 1-4, Appendix C) Exams questions gathered from old tests dating back to Fall 2000

Chapter 1 Database System Concepts and Architecture. Nguyen Thi Ai Thao

Databases. Jörg Endrullis. VU University Amsterdam

D.Hemavathi & R.Venkatalakshmi, Assistant Professor, SRM University, Kattankulathur

Finding and Adding Payees in Payment Entry - Best Practices

Course Introduction & Foundational Concepts

UFCEKG 20 2 : Data, Schemas and Applications

SOUTHERN COMPANY DISTRIBUTION INTERCONNECTION POLICY

The Relational Algebra

STRUCTURED QUERY LANGUAGE (SQL)

Relational Model. Rab Nawaz Jadoon DCS. Assistant Professor. Department of Computer Science. COMSATS IIT, Abbottabad Pakistan

Last updated: 25 May 2018


Objective. The goal is to review material covered in Chapters 1-5. Do the following questions from the book.

CSCU9Q5. Topic Overview. Transaction Management. The Concept of a Transaction BACKUP & CONCURRENCY. CSCU9Q5: Database P&A 14 November 2017

Chapter 1: Introduction

Finding and Adding Payees in Payment Entry - Best Practices

INFS 328 Systems Analysis and Design

Database Technology Introduction. Heiko Paulheim

National Quali cations

BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT

Advertising & Exhibiting Opportunities

download instant at The Relational Data Model

Course Logistics & Chapter 1 Introduction

DATABASE DEVELOPMENT (H4)

How to implement applications for Smart Devices... using GeneXus.

What s a database anyway?

1 Overview of Database Management

CS317 File and Database Systems

CMSC 424 Database design Lecture 2: Design, Modeling, Entity-Relationship. Book: Chap. 1 and 6. Mihai Pop

CS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #5: Entity/Relational Models---Part 1

COURSE LEADING TO THE BCS FOUNDATATION QUALIFICATION IN DATA PROTECTION (3 DAYS)

CSE3421 Fall Assignment #1: Due October 24, pm. Weight 7%

Sankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment

Cheltenham Courseware Microsoft Access 2003 Manual - Advanced Level SAMPLE

CSIT115/CSIT815 Data Management and Security Assignment 1 5 March 2018

COSC 304 Introduction to Database Systems. Database Introduction. Dr. Ramon Lawrence University of British Columbia Okanagan

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1

Relational Databases Overview

Database Systems. Chapter 5. Emmanuel Stefanakis

Database Management Systems (CPTR 312)

FIT1004 Database Topic 2: Database Design Life Cycle

Database Management Systems MIT Lesson 01 - Introduction By S. Sabraz Nawaz

... Chair of Mobile Business & Multilateral Security. Lecture 11 Business Informatics 2 (PWIN)

CSE 132A. Database Systems Principles

Transcription:

CSCU9Q5 Database Principles and Applications Introduction to Databases 1 Administrivia & Topics to be covered Administrivia: Teaching Team: (Co-ordinator) Prof. Amir Hussain, 4X3, E-mail: ahu@cs.stir.ac.uk Mandar Gogate 4B55, E-mail: mgo@cs.stir.ac.uk If you have any questions or suggestions regarding the running of the module, please kindly direct them (through the Course Rep or directly) to Prof. Hussain, via email: ahu@cs.stir.ac.uk (for my research interests related to Big Data, see: http://cs.stir.ac.uk/~ahu/ or visit my CogBID research Lab website: http://cogbid.cs.stir.ac.uk) [N.B. If you do not already have a CS computer account, please visit Sam or Graham in 4B81 to get one. You will need this to log in to the database practicals for this course] Course Topics: Introduction to the Database Approach: Database & Database Management System The ANSI-SPARC model; Data models; the Relational model Relational languages; Relational Algebra EAR modelling and normalisation Check the Syllabus on the module website for remaining topics (including SQL, Java interfacing, and database administration) http://www.cs.stir.ac.uk/courses/cscu9q5/ 2 Traditional File-Based Systems The first precursor of databases the manual file-based system (the kind that people store in a filing cabinet). For example, organisations may keep data related to projects, products, tasks, clients, or employees within separate files held within secure filing cabinets. many people keep a similar system at home to store information such as bank statements, receipts, guarantees, and invoices. To use such a filing system, we look up information by searching through the files until we find the one that we want. The better the filing system, the more efficient information retrieval can be. 3 Problems with Manual Filing Systems Manual filing systems work fine when the number of files is small, or if an efficient indexing system is employed. However, manual systems break down when we need to cross-reference the stored information or process it in some way. For example, consider an estate agent who keeps separate files for each property, buyer, and member of staff. Answering questions like these What flats do you have for rent within 3 miles of the city centre? What is the average rent for a 2-bedroom flat? What are the phone numbers of the owners of property in Alloa? How does last month s turnover compare with the projected figure for this month? 4 (c) University of Stirling 2017 1

Why Do These Questions Create Problems? The kind of questions we asked on the previous slide can be very difficult to answer with a manual filing system.. This is because we generally need to search through every file to pick out and combine the information required to answer the question. It is not possible to design a filing system that will be efficient for answering all questions that we might pose. To cope with the ever-increasing demand for information, organisations started to store information differently.. in electronic files to improve the efficiency of retrieval. However, departments within an organisation tended to manage their own information, simply replacing their own paper files by electronic files. This leads to practical problems, as we shall see. Decentralised Information Management For example, consider two departments within an estate agency. The Sales department is responsible for selling and renting properties to clients. Two kinds of clients are dealt with: Those that wish to sell properties. Those that wish to rent or buy a property. Information relating to the dealings with each kind of client may be maintained electronically using a special purpose program Three files containing property, owner, and renter details are required. Examples of these files are shown next. 5 6 Properties Sales Department Information Pno Street Area City Type Rooms Rent Ono PA14 16 Holhead Dee Aberdeen House 6 650 CO46 PL94 6 Argyll St Kilburn London Flat 4 400 CO87 PG4 6 Lawrence St Partick Glasgow Flat 3 350 CO40 Owners Ono Name Address Phone CO46 Joe Keogh 2 Fergus Dr 01224-861212 CO87 Carol Farrel 6 Achray St 0141-357-7419 CO40 Tina Murphy 63 Well St 0141-943-1728 Renters field record Rno Name Address Phone Pref_Type Max_Rent CR76 John Kay 56 High St 0171-774-5632 Flat 425 CR56 Aline Stewart 64 Fern Dr 0141-848-1825 Flat 350 CR74 Mike Ritchie 18 Tain St 01475-392178 House 750 file The Contracts Department The Contracts department is responsible for handling the lease agreements associated with properties for rent. When a client agrees to rent a property, the Sales department provides leasing details to the Contracts department. The Contracts department complete each lease agreement by allocating a reference number and determining the payment and rental period. They maintain three files containing lease, property, and renter details. Some of this information is similar to that maintained by the Sales department. Examples appear on the next slide. 7 8 (c) University of Stirling 2017 2

Lease Contracts Department Information Lno Pno Rno Rent Payment Deposit Paid Start Finish Duration 10024 PA14 CR62 650 VISA 1300 Y 01-Jun-95 31-May-96 12 10075 PL94 CR76 400 Cash 800 N 01-Aug-95 31-Jan-96 6 10012 PG21 CR74 600 Cheque 1200 Y 01-Jul-95 30-Jun-96 12 Property Pno Street Area City Rent PA14 16 Holhead Dee Aberdeen 650 PL94 6 Argyll St Kilburn London 400 PG21 18 Dale Rd Hyndland Glasgow 600 Renter Rno Name Address Phone CR76 John Kay 56 High St 0171-774-5632 CR74 Mike Ritchie 18 Tain St 01475-392178 CR62 Mary Tregear 5 Tarbot Rd 01224-196720 Observations Each department has its own set of special-purpose programs for entering and manipulating the information in its files. The programs offered the advantage of automating the storage and retrieval of information and hence, improved the overall efficiency compared to the manual system. One important point to note about the programs: they specify the details of physical structure and storage of the data files and records. The program(s) will work only if the data is organised in their particular way. Also, due to the relative autonomy of each department, there is a significant amount of duplication of information. From these observations, a number of problems can be identified. 9 10 Problems with Decentralised Files (1) Separation and isolation of data Isolating data in separate files makes it difficult to answer the style of crossreferencing questions we looked at before. For example, consider this fairly simple query: to produce a list of houses matching the requirements of potential renters, we must first extract all renters who are interested in houses. Using this list, we must then scan the property file to find houses for which the rent is less than that listed for each renter This fairly simple query is quite complex to write a program for! (Imagine trying to handle more complex queries!) Duplication of data Uncontrolled duplication of data can occur - wasteful of both time and space Great care must be taken to maintain the consistency of duplicated data. Problems with Decentralised Files (2) Data dependence Since the structure and organisation of files and records are defined in the program code, making changes to the structure is difficult. A potentially large number of programs would need to be updated, and a one-off program created to convert the existing data to the new format. Incompatible file formats Since each department maintains its own information, it is likely that the structure of files will vary from one department to another. Furthermore, departments might write their programs in different languages, each of which stores information in a different format. This would make it difficult to share information and would exacerbate the duplication problem. 11 12 (c) University of Stirling 2017 3

Range of operations available. Problems with Decentralised Files (3) From the user s point of view, electronic file-based systems were a major improvement over manual systems. This led to an increase in the number and types of operations that users wished to perform on their data. However, electronic file-based systems require appropriate programs. Support for a particular operation requires a dedicated program to process the data files and insert or extract the information as required. Thus, either the range of available operations is limited to that supported by a basic set of programs, or a plethora of programs must exist to satisfy the information requirements of the organisation. As a result of these sorts of problems, organisations turned to a different approach for information handling. The Database Approach Textbook (Ritchie): Chapter 1 The limitations of the file-based approach can be attributed to two factors: The definition of the data is embedded in the programs which are used rather than being stored separately and independently. There is no control over the access and manipulation of data beyond that imposed by the programs. A more effective approach requires two new concepts: the Database the Database Management System A database is a shared collection of logically related data (and a description of this data), designed to meet the information needs of an organisation. 13 14 The Database A database is a single, large repository of data that is defined once and used simultaneously by many users (e.g. in different departments.) Rather than having disconnected files with redundant data, all data is integrated, with minimum duplication. No data is owned by a single department; all data is now a shared corporate resource. A database holds not only an organisation s operational data, but also a description (more likely a number of separate descriptions) of that data. The description is known as the database schema or meta-data (the data about data), which helps overcome earlier problems of e-file systems This provides a degree of independence between programs and the data since the structure of the data is separated from the programs and stored in the database. 15 Logically Related Data? When we analyse the information needs of an organisation we try to identify entities, attributes, and relationships. An entity is a distinct object (a person, place or thing, etc.) in the organisation that must be represented in the database. e.g. a Renter, a Property, a Lease Agreement, etc. An attribute is a property that describes some aspect of the object that we wish to record. e.g. Rent, Number of rooms, Name, Address, etc. A relationship is an association among two or more entities. e.g. Properties have Owners, Renters are associated with a Lease Agreement and a Property, etc. A database combines these aspects it holds data that is logically related in ways that correspond with the relationships. 16 (c) University of Stirling 2017 4

The Database Management System The Database Management System (DBMS) is the software that enables users to define, create, and maintain the database and which provides controlled access to this database. The DBMS comes between the users and the database. First, the DBMS allows users to define the database, usually through a Data Definition Language (DDL) this allows users to specify the data types and structures, and the constraints on the data to be stored in the database. Second, the DBMS allows users to insert, update, delete, and retrieve data from the database usually through a Data Manipulation Language (DML). The Database Management System The fact that the database provides a central storage repository for data allows the DML to provide a general enquiry facility for this data, called a query language. Query languages help prevent the problems of either a fixed set of operations or a proliferation of programs that occur with file-based systems. The DBMS provides controlled access to the database. Prevents access by unauthorised users. Protects integrity of data by maintaining its consistency. Controls access to allow sharing. Facilitates recovery following hardware or software failures. 17 18 The Database Environment A database system aims to provide users with an abstract view of data by hiding certain details of how data is stored and manipulated. Therefore, the starting point for the design of a database must be an abstract description of the information requirements of the organisation. This will be in terms of entities, attributes and relationships, as we saw before. And it will not be concerned at all with the mechanisms which might be used to store or retrieve the data. (It is abstract!) An Abstract View For example, in the estate agent example we may build an abstract view which contains the following: Entities: Staff, Property, Owner, and Renter (maybe others, too). Attributes describing properties or qualities of each entity (e.g. Staff have names, addresses, and salaries). Relationships between these entities (e.g. Owners own Properties). Since a database is a shared resource, we may also be concerned to provide different users with different views of the data held in the database. More on this later.. 19 20 (c) University of Stirling 2017 5