Session 1Introduction to Database Technology Introduction to Relational Databases and MySQL Lecturer: Jerry Smallwood

Slides:



Advertisements
Similar presentations
Information Systems Today: Managing in the Digital World
Advertisements

Organisation Of Data (1) Database Theory
Fundamentals of Information Technology (FI) Ian Harrison
Session 1Introduction to Database Technology Lecturer: Jerry Smallwood
Introduction to Database Technology
Session 1Introduction to Database Technology Introduction to Relational Databases and MySQL Lecturer: Jerry Smallwood
Business Planning using Spreadsheets
Database Management3-1 L3 Database Management Santa R. Susarapu Ph.D. Student Virginia Commonwealth University.
Concepts of Database Management Sixth Edition
Concepts of Database Management Seventh Edition Chapter 1 Introduction to Database Management.
BUSINESS DRIVEN TECHNOLOGY
Databases and Database Management Systems
Relational Databases What is a relational database? What would we use one for? What do they look like? How can we describe them? How can you create one?
Chapter 1 Introduction to Databases
Data at the Core of the Enterprise. Objectives  Define of database systems  Introduce data modeling and SQL  Discuss emerging requirements of database.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
Software Development Unit 2 Databases What is a database? A collection of data organised in a manner that allows access, retrieval and use of that data.
Database Management System Lecture 2 Introduction to Database management.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
Database Lecture # 1 By Ubaid Ullah.
Data at the Core of the Enterprise. Objectives  Define of database systems.  Introduce data modeling and SQL.  Discuss emerging requirements of database.
Unit 18: Database Modelling
Concepts of Database Management Seventh Edition
Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file,
6-1 DATABASE FUNDAMENTALS Information is everywhere in an organization Information is stored in databases –Database – maintains information about various.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
Concepts of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
© Paradigm Publishing Inc. 9-1 Chapter 9 Database and Information Management.
Chapter 1 Introduction to Databases Pearson Education ©
DATABASE. A database is collection of information that is organized so that it can easily be accessed, managed and updated. It is also the collection.
Database Technical Session By: Prof. Adarsh Patel.
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
Concepts of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
© Paradigm Publishing Inc. 9-1 Chapter 9 Database and Information Management.
HAP 709: Healthcare Databases
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
HAP 709: Healthcare Databases Introduction to Database Structures Janusz Wojtusiak, Ph.D. Fall 2010 Based on slides by: Farrokh Alemi, Ph.D. Francesco.
MET280: Computing for Bioinformatics Introduction to databases What is a database? Not a spreadsheet. Data types and uses DBMS (DataBase Management System)
File Processing Concepts – Field – combination of 1 or more characters that is the smallest unit of data to be accessed – Record – group of related fields.
Storing Organizational Information - Databases
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Database What is a database? A database is a collection of information that is typically organized so that it can easily be storing, managing and retrieving.
1 Database Concepts 2 Definition of a Database An organized Collection Of related records.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
1 CSE 2337 Introduction to Data Management Textbook: Chapter 1.
Databases.
ITGS Databases.
Session 1Introduction to Database Technology Lecturer: Jenny Pedler
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
Database Management Systems (DBMS)
Concepts of Database Management Seventh Edition Chapter 1 Introduction to Database Management.
Database and Information Management Chapter 9 – Computers: Understanding Technology, 3 rd edition.
1 TOPIC 6 DATABASE 6.1 Introduction to Database 6.2 Basic Concept of Database 6.3 Database Object DATABASE.
Information Systems Today: Managing in the Digital World TB3-1 3 Technology Briefing Database Management “Modern organizations are said to be drowning.
Instructor: Pavlos Pavlikas1 How Data is Stored Chapter 8.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 1: Introduction to IS2803 Rob Gleasure
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. A database is a collection of information organized to provide efficient retrieval. The collected information.
CSCI-235 Micro-Computers in Science Databases. Database Concepts Data is any unorganized text, graphics, sounds, or videos A database is a collection.
Introduction to Databases
Introduction to Database Technology
Information Systems Today: Managing in the Digital World
Database Management  .
What is a Database and Why Use One?
Chapter 8 Working with Databases and MySQL
MANAGING DATA RESOURCES
Database Management Concepts
INTRODUCTION A Database system is basically a computer based record keeping system. The collection of data, usually referred to as the database, contains.
Database management systems
Presentation transcript:

Session 1Introduction to Database Technology Introduction to Relational Databases and MySQL Lecturer: Jerry Smallwood

Session 1Introduction to Database Technology DT-Wed Class Schedule  Session 1: Wed 14 th October  Session 2: Wed 21 st October  Session 3: Wed 28 th October  Session 4: Wed 4 th November  TMA Self-Study Session: Wed 11 th November  Session 5: Wed 18 th November (TMA Due)  Session 6: Wed 25 th November  Session 7: Wed 2 nd Devember  Session 8: Wed 9 th December  FMA Due: 2pm on Monday 11 th January 2010

Session 1Introduction to Database Technology DT Assessment (2009/10) TMA (Tutor Marked Assignment)  The TMA carries 25% of the total marks  requires you to produce a design for a database for Miles Better, a small car hire company  TMA Self-Study Session: Wed 11 th November  TMA Submission Deadline: 6pm on Wed 18 th November FMA (Final Module Assignment)  FMA carries 75% of the total marks  requires you to create the Miles Better car hire database that you designed for the TMA  FMA Submission Deadline: 2pm on Monday 11 th January 2010

Session 1Introduction to Database Technology ITApps Assessment (2009/10) ITApps Assessment Process (2009/10)  Full details on the ITApps website:  Note: Late submissions is possible but at a penalty (mark capped at 40% of total marks for that assignment)  Note: note issue of ‘mitigating circumstances’ Chair ITApps/FdScIT Exam Board  Ian Harrison,  Contact re. ‘mitigating circumstances’ or any other issues that prevent you submitting the TMA/FMA on time.  Note: Lecturers cannot grant extensions to deadlines

Session 1Introduction to Database Technology Session 1 - Overview Introduces the basic concept of a database and shows why it is useful. Introduces the Yum Juices case study that will be used throughout this module. Introduces you to MySQL, the Open Source Relational Database Management System that you will use to study this module.

Session 1Introduction to Database Technology What is a database? an organized body of related information wordnet.princeton.edu/perl/webwn wordnet.princeton.edu/perl/webwn A collection of data organized for rapid search and retrieval by a computer. A collection of related data stored in one or more computerized files in a manner that can be accessed by users or computer programs via a database management system. sparc.airtime.co.uk/users/wysywig/gloss.htm sparc.airtime.co.uk/users/wysywig/gloss.htm A database collects information into an electronic file, for example a list of customer addresses and associated orders. Each item is usually called a ‘record’ and the items can be sorted and accessed in many different ways. A database is an electronic filing collection of information that is organized so that it can easily be accessed, managed, and updated. A set of related files that is created and managed by a database management system (DBMS). A collection of information stored in one central location. Many times, this is the source from which information is pulled to display products or information dynamically on a website. Relational data structure used to store, query, and retrieve information. fwie.fw.vt.edu/tws-gis/glossary.htm fwie.fw.vt.edu/tws-gis/glossary.htm Source: Google “Define: database”

Session 1Introduction to Database Technology A database consists of… A collection of data Software to store, access and manage the data (DBMS) User A User B Collection of Data DBMS

Session 1Introduction to Database Technology Advantages 1 Data independence –Changes to structure of the data do not affect programs used to access it Consistency of data –Each item only recorded once. No danger of its being updated in one place but not another Reduced redundancy –Each item of data is only stored in a single place. No duplication of data Data integrity –Control and check data entry Data security –Restrict access to authorised users

Session 1Introduction to Database Technology Centralised control –Database administrator will control who has access to the data More information –Users have access to wider range of data that might previously have been held in different places and possibly on incompatible systems Greater productivity –The DBMS query language allows users to design their own queries and get an immediate response Advantages 2

Session 1Introduction to Database Technology Disadvantages Cost –Database systems are complex, difficult, and time-consuming to design. –Initial training required for all programmers and users. –Hardware and software start-up costs. Potential loss of data through system failure –Need for backup and recovery procedures –Essential to ensure that no data is lost Security –Data may get into the wrong hands Privacy –The increased use of databases means a large amount of personal information is stored in many different places

Session 1Introduction to Database Technology Data Storage Data is stored in tables Each row is a record Each column is an item of data (field) within the record Pet pet_namepet_type Sidsnake Minniemouse Mickeymouse Grommitdog Mogcat Bubblesgoldfish

Session 1Introduction to Database Technology Types of Database Flat file –All data in a single table –You can use a spreadsheet such as Excel to create a database of this type Relational –Data split into related tables, linked by keys

Session 1Introduction to Database Technology Flat File Database – example 1 Yum has stored details of customers and the orders they have placed in a single table. What problems might this cause? What happens when they also record details of the items included in each order?

Session 1Introduction to Database Technology Flat File Database – example 2 IDDateOrderItemsCustIDTitleFname Sname… 112/06/ Sparkling Sunshine £3.25 x 2 1 Citrus Zing £2.50 x 3 2MrJackHill Multiple items in each order Table needs a record for each order item Even more duplication of data!

Session 1Introduction to Database Technology Relational Database Data is split into entities An entity is something that the database stores information about A noun A person, place, thing, event Data for each entity is stored in a separate table (known as a relation) What are the entities in the previous example?

Session 1Introduction to Database Technology Yum Database Entities Each of the following entities will be stored in a table in the Yum database: –Customers –Orders –Order Items –Juices

Session 1Introduction to Database Technology Attributes An attribute is a property of an entity Each attribute is a column in the table for its associated entity Each row in the table is a record. The attributes are the fields in the record What are the attributes for the customer entity in the Yum database? –Customer ID –Title –First name –Surname –…

Session 1Introduction to Database Technology Primary Key A field (or fields) that uniquely identifies each record in a table All tables in a relational database should have a primary key What would be a suitable primary key for the customer table in the Yum database?

Session 1Introduction to Database Technology Foreign key Used to relate one entity to another to allow the database to retrieve related data The primary key of the parent table is stored in the related record of the child table

Session 1Introduction to Database Technology Foreign key - example To relate customers to the orders they have placed we store the customer ID of the customer placing the order in the order table Customer ID is the primary key of the customer table and a foreign key in the order table Each customer ID will be recorded just once in the customer table but may be recorded many times in the order table

Session 1Introduction to Database Technology Customer Table CustIDTitleFnameSnameAddress1 1MrsJillHill2 Steep St 2MrJackHill2 Steep St 3MsBoPeep5 Flockington Rd 4MrHumptyDumpty29 Shell Ave 5MrHarleyDavidson5b Bike Alley 6MissMaryContrary1 Flower Gdns Order Table Order ID Cust ID Date 1212/06/ /06/ /06/ /08/ /08/ /08/ /08/2008 Primary key Foreign key Customer and Order Tables in the Yum Database What is the name of the customer who placed order number 1? What are the numbers of the orders placed by Bo Peep?

Session 1Introduction to Database Technology Database Terminology Entity Attribute Record (row) Column or Field Table or Relation Primary Key Foreign Key

Session 1Introduction to Database Technology Now do… Hands-on Exercise 1 –Explore the Yum Juices sample data

Session 1Introduction to Database Technology Relational Database Management System (RDBMS) Software to manage data stored in related tables Examples: –MySQL –Access –Oracle –SQL Server

Session 1Introduction to Database Technology SQL Structured Query Language Query language for accessing and modifying data in relational databases Used by all RDBMSs Data Definition –Store data –Tables Data Manipulation –Retrieve information –Queries

Session 1Introduction to Database Technology MySQL is… An Open Source Relational Database Management System (RDBMS)

Session 1Introduction to Database Technology Open Source Software Free to use, modify and redistribute Source code available for modification by users Developed collaboratively

Session 1Introduction to Database Technology Finding out about MySQL The MySQL website: The Reference Manual

Session 1Introduction to Database Technology Using MySQL for this Module MySQL is a client/server system Your database is stored on the School of Computer Science MySQL server mysqlsrv –A database has been created for you as you do not have sufficient permissions to create a database on this server You use the telnet Internet Protocol to connect to the server –You need a username and password from your tutor before you can do this

Session 1Introduction to Database Technology Now do… Hands-on Exercise 2: –Connect to your database –Use basic SQL commands Make sure you have got your MySQL username and password from your tutor.

Session 1Introduction to Database Technology Review Basic SQL Commands SHOW DATABASES USE database_name SHOW TABLES CREATE TABLE SHOW COLUMNS INSERT INTO table_name UPDATE table_name SELECT * FROM table_name DELETE FROM table_name DROP table_name