DB&SQL 1- 1 Databases & SQL Teacher: Henny Klein contact: wednesday 14-16 room 11 - 426 All material and assignments on Nestor.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

C6 Databases.
Database Systems: Design, Implementation, and Management Tenth Edition
Management Information Systems, Sixth Edition
Relational Databases Chapter 4.
Databases Chapter Distinguish between the physical and logical view of data Describe how data is organized: characters, fields, records, tables,
12 CHAPTER DATABASES Databases are the key to accessing information throughout our lives. Used in hospitals, grocery stores, schools, department stores,
Organizing Data & Information
Introduction to Databases Transparencies
1212 CHAPTER DATABASES. © 2005 The McGraw-Hill Companies, Inc. All Rights Reserved Competencies Distinguish between the physical and logical view.
Databases and modelling 1. day. 2 Agenda Goals Plan What is database? How is database developed and designed? Database design.
Chapter 4: Database Management. Databases Before the Use of Computers Data kept in books, ledgers, card files, folders, and file cabinets Long response.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Databases Chapter 11.
Chapter 3: Data Modeling
BUSINESS DRIVEN TECHNOLOGY
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Creating a Database in Access Creating a database involves 1.Logical design of tables and relationships 2.Physical design of tables and relationships 3.Populating.
Information systems and databases Database information systems Read the textbook: Chapter 2: Information systems and databases FOR MORE INFO...
Data at the Core of the Enterprise. Objectives  Define of database systems  Introduce data modeling and SQL  Discuss emerging requirements of database.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
IST Databases and DBMSs Todd S. Bacastow January 2005.
Chapter 16 (p481 – 485, ) Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1.
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2007 (Week 3, Tuesday 9/4/2007)
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
Data at the Core of the Enterprise. Objectives  Define of database systems.  Introduce data modeling and SQL.  Discuss emerging requirements of database.
6-1 DATABASE FUNDAMENTALS Information is everywhere in an organization Information is stored in databases –Database – maintains information about various.
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
Concepts and Terminology Introduction to Database.
2005 SPRING CSMUIntroduction to Information Management1 Organizing Data John Sum Institute of Technology Management National Chung Hsing University.
CS 474 Database Design and Application Terminology Jan 11, 2000.
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
MIS 301 Information Systems in Organizations Dave Salisbury ( )
311: Management Information Systems Database Systems Chapter 3.
I Information Systems Technology Ross Malaga 4 "Part I Understanding Information Systems Technology" Copyright © 2005 Prentice Hall, Inc. 4-1 DATABASE.
SQL Structured Query Language Programming Course.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
Storing Organizational Information - Databases
1 Chapter 1 Introduction. 2 Introduction n Definition A database management system (DBMS) is a general-purpose software system that facilitates the process.
Copyright © 2015 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education.
Instructor: Dema Alorini Database Fundamentals IS 422 Section: 7|1.
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Relational Database. Database Management System (DBMS)
Databases. What is a database?  A database is used to store data. The word DATA is actually Latin for FACTS. A database is, therefore, a place, or thing.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 7 Storing Organizational Information - Databases.
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
1 CSE 2337 Introduction to Data Management Textbook: Chapter 1.
1 The Information School of the University of Washington Dec 1fit advdatabases © 2006 University of Washington Advanced Database Concepts INFO/CSE.
Database Systems Basic Data Management Concepts
Relational Database. I. Relational Database 1. Introduction 2. Database Models 3. Relational Database 4. Entity-Relationship Models 5. RDB Design Principles.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
3/6: Data Management, pt. 2 Refresh your memory Relational Data Model
Databases Chapter Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved.
Data modeling Process. Copyright © CIST 2 Definition What is data modeling? –Identify the real world data that must be stored on the database –Design.
Chapter 13.3: Databases Invitation to Computer Science, Java Version, Second Edition.
Week 2 Lecture The Relational Database Model Samuel ConnSamuel Conn, Faculty Suggestions for using the Lecture Slides.
© 2017 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner.
Database Development Lifecycle
Chapter 4 Relational Databases
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Basic Concepts in Data Management
MANAGING DATA RESOURCES
INFO/CSE 100, Spring 2006 Fluency in Information Technology
Advanced Database Concepts: Reports & Views
Database Design Chapter 7.
Presentation transcript:

DB&SQL 1- 1 Databases & SQL Teacher: Henny Klein contact: wednesday room All material and assignments on Nestor

DB&SQL 1- 2 Content of the course First block C H 1 t.m. 5 Basic knowledge for the design and manipulation of relational databases Second block C H 6 t.m. 10 other types of databases processes in a DBMS distributed systems

DB&SQL 1- 3 Content of practical sessions Access: basic manipulations: tables, relations, QBE, forms, reports Access- SQL –data definition –data manipulation –queries Programming in Access –functions, event handling (VBA, DAO) Building an application

DB&SQL 1- 4 Your own design! You will train with example databases but every student has also to build his/her own database during lectures we will discuss your design in practical exercises you can build your database, formulate queries, etc. Assignment for this week (details later): Think of a theme for your database!

DB&SQL 1- 5 The book Gives the essential information, but concise, so in lectures time is spent on explanation and examples. Gives exercises, use them as a method of self assessment

DB&SQL 1- 6 Grading rules Design+ProjectSQL/VBAExam 30%30%40% Design exercises as homework Individual project SQL and VBA: practical exercises Tentamination: mostly theory, some SQL, no VBA

DB&SQL 1- 7 Card catalogue, textfile, DBMS How did people search books in a library before the computer era? What are advantages of an electronic system? What are advantages of a database system compared to a textfile? How did departments of organizations communicate before the computer era? What are advantages of a DBMS here?

DB&SQL 1- 8 Database management systems Systematic, structured data storage each data item is stored once, no redundancy data integrity and security ensured data available for distinct applications concurrent use of data differents views on data DBMS used in many environments: administration (products, clients, employees) information (catalogues) research (data storage, data mining) online applications

DB&SQL 1- 9 Information Science and databases DBMS: the standard system to store information, so often important in your work, and even beforehand: –many students have to handle databases in their ….. in public or private organizations –in a research …….. or in in your own research project

DB&SQL The multi-layer system Presentation of the data (views) Access: Forms, reports, VBA, SQL Outside Access: (web)applicaties Logical description of the data (conceptual level) DBMS Operating system (host) Physical storage of data

DB&SQL Types of database systems early types: –Hierarchical database –Netwerk database currently most common: –Relational database –Integration of XML developing: –Object oriented database

DB&SQL Database: conceptual model of reality ??? Which information items (attributes) may be useful for the entity BOOK TREE ??? The choice of attributes depends on the properties of the entities but also on the context A database is a model of reality

DB&SQL Relational db: example of a table CODELEV_NAAMADRESWOONPLAATS 004Hovenier G.H.Zandweg 50Lisse 009Baumgarten R.Taksstraat 13Hillegom 011Struik BVBessenlaan 1Lisse 013Spitman en Zn.Achtertuin 9Aalsmeer 014Dezaaier L.J.A.De Gronden 101Lisse 019Mooiweer FA.Verlengde Zomerstr. 24Aalsmeer Each row represents the data of 1 supplier Each row is unique Data are split up in simple items (comments??) Tabel Leveranciers (=suppliers) Scheme: Leveranciers (code, lev_naam, adres, woonplaats)

DB&SQL The anatomy of a table / relation record, entiteit record, entity rij, tupel row, tuple kolom column attribuutwaarde attribute value attribuut, veldnaam attribute, field name kolomkop column heading tabelkop, schema table heading, scheme gegevens data, record set, body NB An attribute has a data type and a domain

DB&SQL Identification required In a relational database, duplication of data must be prevented. Why?? What are the problems?? It is important to choose a sound identification, for current but also for possible future Think of a appropriate identification for students (in Progress) books (in the library) members of a hockey club?

DB&SQL Identification problems Which problems may occur by using NAW-data (Naam Adres Woonplaats) ISBN day of birth? Often, a system-created unique number is used as the primary key (primaire sleutel). It is easy and makes searching faster. But does it really discern your entities?

DB&SQL Introduction of database design In most cases, one table is not enough for structured data storage The next slides show basic principles of database design Later on, in Chapter 4, relational database design is discussed at length

DB&SQL Library as a flat table: redundant data Author data

DB&SQL Preventing redundancy The table asserts several times that Big House has Phone xxx Problems with data redundancy: file size data integrity (update/insert anomalies) Solution: The phone number is an attribute of the publisher, not of the book So publisher is an entity on its own But how are book and publisher related??

DB&SQL Relationship Publisher-Book: 1 to many

DB&SQL Establishing a relationship BOOKS PUBLISHERS Publisher and book are distinct entity classes, they need distinct tables Primary key / primaire sleutel referencing key / verwijzende sleutel

DB&SQL Author: a multivalued attribute provisional solutions a multivalued field? a repeated field? repeating the bookrecord?

DB&SQL and the problems Problems: find an author, sort on an author Problems: find an author, sort on an author, number of author fields? empty fields Problems: redundancy: integrity problems, filesize

DB&SQL The relational solution for multiple values Authors are split up in an additional table Each record connects one AUTHOR to a BOOK Table BOOKS Table BOOK-AUTHOR Rule: attributes contain only one simple value

DB&SQL complex data An author may have more attributes: first name family name birthday …. how can we design a database for books and authors as separate entities? what about the relationship?

DB&SQL Relationship BOOK – AUTHOR: many to many A1 A4 A2 A3 B1 B2 B3 B4 B5

DB&SQL Library: Books and authors 2 entities and a link table (tussentabel)

DB&SQL Database design Which entities, which attributes? Which primary key? Book:ISBN, Title, Price Publisher:PubID, PubName, PubPhone Author:AuID, AuName, AuPhone Which relations? A book has 1publisher A publisher publishes 1 or more books  : infinite many A book has 1 or more authors An author writes 1 of more books U B 1 -  S B  - 

DB&SQL Entity-Relation Diagram (Ch 2) Author Book Publisher published by/ publishes written by/ writes   1  Method Start from one record in a table and write the relationship type at the other table (1 or  )

DB&SQL Homework 1.Read and note your questions about –Rolland: Ch 1, Ch 3.1 Challenge: table 1.1 is not the right representation of the data in fig 1.5 and 1.6. Try to correct it! –Additional info: Brookshear 9.1 en Think of a theme for your own database project (hobby, useful data,..) and write down –which entities you discern (at least 3) –which attributes they have –what relationships exist among them Copy your notes and bring them next lecture to discuss and to hand in! Next week: chapter 2: ER diagrams