Supplement 01a Database-Introduction-1

Slides:



Advertisements
Similar presentations
Data Modeling and Database Design Chapter 1: Database Systems: Architecture and Components.
Advertisements

Database Environment Pertemuan 02 Matakuliah: M0564 /Pengantar Sistem Basis Data Tahun : 2008.
Introduction to Database Management  Department of Computer Science Northern Illinois University January 2001.
Introduction to Databases
1 Chapter 2 Database Environment Transparencies © Pearson Education Limited 1995, 2005.
1 Pertemuan 02 Database environment Matakuliah: >/ > Tahun: > Versi: >
MSc IT UFIE8K-10-M Data Management Prakash Chatterjee Room 3P16
Chapter 2 Database Environment.
Data Management Design
Data Management I DBMS Relational Systems. Overview u Introduction u DBMS –components –types u Relational Model –characteristics –implementation u Physical.
Introduction to Databases Transparencies
Chapter 2 Database Environment Pearson Education © 2014.
1 Chapter 2 Database Environment. 2 Objectives of Three-Level Architecture u All users should be able to access same data u User’s view immune to changes.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Lecture Two Database Environment Based on Chapter Two of this book:
Chapter 1 Introduction to Databases
1 Chapter 2 Database Environment. 2 Chapter 2 - Objectives u Purpose of three-level database architecture. u Contents of external, conceptual, and internal.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Introduction to Databases Transparencies 1. ©Pearson Education 2009 Objectives Common uses of database systems. Meaning of the term database. Meaning.
Introduction to Databases and Database Languages
Database Environment 1.  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
CSC2012 Database Technology & CSC2513 Database Systems.
Module Title? DBMS Introduction to Database Management System.
Chapter 2 CIS Sungchul Hong
CSC271 Database Systems Lecture # 4.
Section 11 : Normalisation
Database Technical Session By: Prof. Adarsh Patel.
CST203-2 Database Management Systems Lecture 2. One Tier Architecture Eg: In this scenario, a workgroup database is stored in a shared location on a single.
Database Environment Chapter 2 AIT632 Sungchul Hong.
1 Introduction to Database Systems. 2 Database and Database System / A database is a shared collection of logically related data designed to meet the.
Lecture On Introduction (DBMS) By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Section 05Concepts Of DBMS1 HSQ - DATABASES & SQL And Franchise Colleges 05 Concepts of DBMS By MANSHA NAWAZ.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
Intro – Part 2 Introduction to Database Management: Ch 1 & 2.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
Chapter 1 Introduction to Databases. 1-2 Chapter Outline   Common uses of database systems   Meaning of basic terms   Database Applications  
Lesson Overview 3.1 Components of the DBMS 3.1 Components of the DBMS 3.2 Components of The Database Application 3.2 Components of The Database Application.
8/31/2012ISC329 Isabelle Bichindaritz1 Database Environment.
Database Environment Chapter 2. Data Independence Sometimes the way data are physically organized depends on the requirements of the application. Result:
1 Database Management Systems (DBMS). 2 Database Management Systems (DBMS) n Overview of: ä Database Management Components ä Database Systems Architecture.
Bayu Adhi Tama, M.T.I 1 © Pearson Education Limited 1995, 2005.
Database Environment Session 2 Course Name: Database System Year : 2013.
Chapter 2 Database Environment Chuan Li 1 © Pearson Education Limited 1995, 2005.
1 Chapter 1 Introduction to Databases Transparencies.
Management Information Systems, 4 th Edition 1 Chapter 8 Data and Knowledge Management.
Database Systems Lecture 1. In this Lecture Course Information Databases and Database Systems Some History The Relational Model.
Chapter 2 Database Environment.
1 Database Environment. 2 Objectives of Three-Level Architecture u All users should be able to access same data. u A user’s view is immune to changes.
1 Chapter 2 Database Environment Pearson Education © 2009.
Lecture On Introduction (DBMS) By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Database Environment Chapter 2. The Three-Level ANSI-SPARC Architecture External Level Conceptual Level Internal Level Physical Data.
uses of DB systems DB environment DB structure Codd’s rules current common RDBMs implementations.
ISC321 Database Systems I Chapter 2: Overview of Database Languages and Architectures Fall 2015 Dr. Abdullah Almutairi.
國立臺北科技大學 課程:資料庫系統 Chapter 2 Database Environment.
REV 00 Chapter 2 Database Environment DDC DATABASE SYSTEM.
REV 00 Chapter 2 Database Environment DDC DATABASE SYSTEM.
Chapter 2 Database Environment.
Chapter 2 Database Environment.
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment.
Data Base System Lecture : Database Environment
Database Environment Transparencies
Chapter 2 Database Environment Pearson Education © 2014.
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment Pearson Education © 2009.
Presentation transcript:

Supplement 01a Database-Introduction-1 And Franchise Colleges HSQ - DATABASES & SQL Supplement 01a Database-Introduction-1 By MANSHA NAWAZ Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 Why Database Systems? Data is one of the most important resources in ALL organisations. Without data it is not possible to operate. Control manufacturing processes? Process sales of goods? Diagnose patients’ illnesses? Forecast sales? Run the University of Teesside? To be useful data must be processed into information. It must be: Accurate Timely Relevant Therefore, you need adequate facilities for storing data and processing information: Storing (and verifying) data Manipulating data Extracting data Supplement 01 (a) Database-Introduction-1

Supplier, Part#, Part#, Cost, Qty File - based approach From the earliest days computers were used to store files of data. Separate systems, ie separate files and programs, were developed for each application, eg stock files, production files, accounts files, etc. Applications processed the data to provide information. Data Application Department Part No, Supplier, qty location, reorder qty Stock Control Stores Problems Inconsistency Redundancy Lack of integration Lack of control Part#, qty, Assy#, Machine#, Cert.#: Production Operations Supplier, Part#, Part#, Cost, Qty Accounts Finance Supplement 01 (a) Database-Introduction-1

Database approach Stock Control Database Management System Production DBMS is the environment used to manage a database The database consisting of stored data and processed information for a system Data are organised into a single set of underlying TABLES from which the applications draw the data to provide information that are relevant to them. Application Department Stock Control Database Database Management System DBMS Supplier, Supplier Pt No:, Part No: Cost, Qty ordered, Qty del., qty, Assy No:, Machine No:, Cert. No: location, reorder qty Production Accounts Supplement 01 (a) Database-Introduction-1

Database Development NF DBMS TABLES FORMS Systems Analysis & Design DFD DataStores, DataFlows and Data Dictionary DATA MODEL TABLE SET NF E-R Model DBMS PHYSICAL VIEW OF DATA TABLES LOGICAL VIEW OF DATA FORMS Database connectivity via websites www .net technology Macromedia Dreamweaver MS Visual Studio Database connectivity via desktop DBMS such as MS Access Database connectivity via programming languages such as MS Visual Basic Supplement 01 (a) Database-Introduction-1 Area of Interest

Client/Server Architecture Server provides services for the Clients which are responsible for interacting with the users (Input/Output) Server is responsible for performing a service (e.g. transaction) and guaranteeing the integrity of the data Well suited for distributed systems handling large amounts of data User Workstation Operator Workstation Department File-Servers Corporate Servers Supplement 01 (a) Database-Introduction-1

System Development Overview Systems development undertaken by using Case Tools used early in development life cycle Provide requirements and design in terms of Systems Model and Data Model Case Tools for Systems Modelling: Dataflow Diagrams (DFD) Data Dictionary (DD) Case Tools for Data Modelling: Normalisation (NF) A rules based technique undertaken to produce the data model for a system Entity Relationship Model (ER) A diagrammatic based technique undertaken to produce the data model for a system DFD & DD provide us with the base for a ERD Data Model Data Model Can be implemented on a DBMS such as MS SQL Server, MS Access, etc Consists of logical and physical view of the proposed systems data. DBMS – implementation platform Database Management System such as MS SQL Server 2000 (MS Access) Supplement 01 (a) Database-Introduction-1

MS SQL Server V MS Access MS SQL Server is a server based database. Multi User – Multi Platform Systems Large, high volume traffic database systems Server holds database. Workstation provides access. For web or database systems if the access traffic is likely to generate more than 20 concurrent database hits at a time, it's time to move to a database server Generally, database servers like MS SQL Server are the way to go for database or web/database systems Many and wide ranging user base for system Additional Security and Login features MySQL (free sql database used for connectivity to Websites via PHP). MS Access is Desktop based Small, low-traffic database systems Small, low-traffic web sites requiring database connectivity. Cannot handle heavy traffic from multiple users. Supplement 01 (a) Database-Introduction-1

Advantages of the Database Approach No unnecessary duplication of data. Greater consistency of data. Wider availability of data. Greater flexibility of use of data. Improved data integrity. Improved security. Improved backup and recovery services. Can change the data structure without altering associated programs. A database is dynamic: it can grow and change. Data management can be more consistent and systematic. Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 Databases “A shared collection of logically related data, and a description of this data, designed to meet the information needs of an organisation.” ‘Database Systems’ by Connolly & Begg Addison-Wesley, ISBN 0-201-70857-4 “A database system can be thought of as a computerised record-keeping system. Such a system involves the data itself (stored in the database), hardware, software and – most important! – users. … Databases are integrated and (usually) shared; they are used to store persistent data.” ‘An Introduction to Database Systems’ by C J Date, Addison-Wesley, ISBN 0-201-38590-2 (7th Edition, 2000) Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 DBMS “A software system that enables users to define, create, maintain, and control access to the database.” Provides the interface between the user and the data in the database. Allocates storage to data and maintains indices so that any required data can be retrieved. Protects data against unauthorised access. Safeguards data against corruption. Provides recovery and restart facilities after a hardware or software failure. Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 Data Model Also referred to as Conceptual Model A Data Model provides a particular way of thinking about data, at least in terms of its structure Data Models include data descriptions, data relationships, data semantics, consistency constraints [Silberschatz et. al.] Data model comprises three components: data structures, data manipulators, and general integrity rules [Codd (1970)] A Data Model is implementation independent Not aimed at any particular computer software or hardware. DBMS supports an implementation of one or more Data Models What data model is supported by a Relational Database Management System (Access, SQL, Oracle, etc.) A RDBMS may have extensions to support other models. At what stage in the Systems Development Lifecycle will data modelling take place (early, middle, late)? Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 Data Model Data Models produced early in Systems Development Makes improvements in terms of : NO DUPLICATION or REDUNDANT or NULL INFORMATION REDUCTION IN PHYSICAL SIZE QUICKER INFORMATION RETRIVAL LEADS TO A FULLY OPTIMISED SET OF TABLES Data Model produced by Case Tools techniques Normalisation Rule based technique for transfering logical datastore view to physical view Entity Relationship Modelling. Diagrammatic representation of a proposed systems database requirements Data Model provides a full set of related tables and data Able to derive physical views (internal schema) of data Able to derive logical views (external schema) of data Supplement 01 (a) Database-Introduction-1

Entity Relationship Modelling (ERM) Normalisation (NF) Provide us with a Bottom Up approach to producing the database tables Technique covered in other modules Supplement on Normalisation is provided on the DD website Entity Relationship Modelling (ERM) A data modelling CASE Tool Technique of interest A diagrammatic representation of a systems database tables Top Down approach to data modelling Entity Relationship Diagram (ERD) used to map data model Applying rules, translate ERD into a set of well-normalised tables Provides both logical and physical view of tables Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 PHYSICAL VIEW TABLES DATA Internal Schema View database structure view that a DBMS requires. in terms of Tables, Attributes (data fields) and Types (data defn.) linkage between tables via primary and foreign keys All Datastores decomposed to a set of TABLES Physical View – for Designers LOGICAL VIEW FORMS INFORMATION External Schema View Form or Screen views provided to the end user. A set of FORMS derived from the TABLES Logical View – for Users Supplement 01 (a) Database-Introduction-1

The Three Level ANSI-SPARC Architecture In 1975 the ANSI Standards Planning and Requirements Committee proposed a standard terminology and general architecture for database systems. The objective is to separate each user’s view of the database from the way it is physically represented. 3 levels or views of data within a database: External Level The users’ view of the database. Also known as the applications view. Conceptual Level The overall view of the database. Also known as the global view. Internal Level The physical representation of the database on the computer. Also known as the storage view. Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 Schemas The overall description of the database is called the database schema. There are 3 different types of schema in the database. External Schema There are multiple external schemas (or subschemas), each one corresponding to a different view of the data. Conceptual Schema There is one conceptual schema, which describes the data stored in the database, the relationships and the integrity constraints. Internal Schema There is one internal schema, which describes how the data are stored in the database and how they are accessed. Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 Schemas and Views Conceptual Inventory H R Finance Production Customer Service External External Internal Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 Mapping Provides the translation between the schemas at different levels. The DBMS is responsible for mapping between the 3 types of schema. The DBMS must ensure that each external schema is derivable from the conceptual schema. The DBMS must use the information in the conceptual schema to map between each external schema and the internal schema. Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 Data Independence A major objective for the 3-level architecture is to provide data independence, ie upper levels must be unaffected by changes to lower levels. There are 2 kinds of data independence: Logical data independence refers to the immunity of the external schemas to changes in the conceptual schema. It should be possible to alter tables, columns or relationships without having to alter existing external schemas or rewrite application programs (other than those that are directly affected). Physical data independence refers to the immunity of the conceptual schema to changes in the internal schema. It should be possible to alter file organizations, storage devices, indexes, etc, without having to alter the conceptual or external schemas. Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 The Systems Catalogue The database schema is defined using a special language called a Data Definition Language (DDL). The result of the compilation of the DDL statements is a set of tables stored in special files collectively called the system catalog. This is a repository of meta-data (data about data), ie information describing the data in the database, typically containing the name, description, source and usage information for each data item. The system catalog is also known as the data dictionary or the data directory. Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 Database Language A Data Definition Language (DDL) is used to specify the data in the database. A Data Manipulation Language (DML) is used to access the data. A Data Control Language (DCL) is used to control access to the data. Some databases have a combined DDL, DML and DCL (often called a Query Language), eg SQL. Supplement 01 (a) Database-Introduction-1

Database Types - 3 Main Data Models Each database uses a definition language imposes restrictions on what can be defined how entities relate to each other Hierarchical model Network model Relational model Supplement 01 (a) Database-Introduction-1

Database Types - Network Can show all 1:n relationships between records Supplier Name Supplier Part No: Link File Part No: Supplement 01 (a) Database-Introduction-1

Database Types - Hierarchical STOCK Electrical Steel Oils Fasteners Part No: Quantity Supplier Name Location Supplier Part No: Supplier Code Supplement 01 (a) Database-Introduction-1

Database Types - Relational Data Files STOCK ITEM STOCK ITEM FILE Part No: Colour Weight Description Quantity Reorder Qty Location Supplier Name Supplier Code Supplier Part No: 12345 N/A 98 F37 Cadmium Bar 90mm dia 7 4 Ferris F2 c801 RECORD FIELD(S) FIELD VALUES KEY FIELD PRIMARYKEY Supplement 01 (a) Database-Introduction-1

Database Types - Relational Logical vs. Physical STOCK ITEM LOGICAL 12345 N/A 98 F37 Cadmium Bar 90mm dia 7 4 Ferris F2 c801 FIELD VALUES FIELD(S) Part No: Colour Weight Description Quantity Reorder Qty Location Supplier Name Supplier Code Supplier Part No: PHYSICAL Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 Relationships - 1:1 STOCK ITEM Part No: 12345 N/A 98 F37 Cadmium Bar 90mm dia 7 4 Ferris F2 c801 Quantity Colour Reorder Qty Weight Supplier Name Location Supplier Code Description Supplier Part No: Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 Relationships - 1:n STOCK ITEM STOCK ITEM STOCK ITEM Part No: 12345 N/A 98 F37 Cadmium Bar 90mm dia 7 4 Ferris F2 c801 12345 Quantity Colour Reorder Qty Weight Supplier Name Location Supplier Code Description Supplier Part No: Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 Relationships - m:n STOCK ITEM STOCK ITEM STOCK ITEM Part No: 12345 N/A 98 F37 Cadmium Bar 90mm dia 7 4 Ferris F2 c801 12345 Quantity Colour Reorder Qty Weight Supplier Name Location Supplier Code Description Supplier Part No: Supplement 01 (a) Database-Introduction-1

Database-Introduction-1 Relational Model Technique Future Lectures will cover the Entity Relationship Diagrams (ERD’s) Supplement 01 (a) Database-Introduction-1