CIT 381 introduction to relations. Tables movieIdtitlegenrelengthrating 101The Thirty- Nine Steps mystery101R 123Annie Hallromantic comedy 110R 145Lady.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

The Entity-Relationship (ER) Model
The Entity-Relationship Model
The Entity-Relationship Model Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY courtesy of Joe Hellerstein for some slides.
Chapter Information Systems Database Management.
Relational Databases Relational Model Primary Keys Relation or Relationship Foreign Keys Relationships between entities Integrity Constraints Power of.
System Analysis - Data Modeling
Databases Revision.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 2 Introduction to Database Development.
Database Design (Data Modeling) DCO11310 Database Systems and Design By Rose Chang.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 2 Introduction to Database Development.
Chapter 6 Methodology Conceptual Databases Design Transparencies © Pearson Education Limited 1995, 2005.
Introduction to Database ISYS 363. File Concepts File consists of a group of records. Each record contains a group of fields. Example: Student file –SIDSnameMajorSexGPA.
Entity-Relationship Model and Diagrams (continued)
Representing Information with Data Models What is a data model and data modeling? What are Entities and Attributes? Relationships between entities Modeling.
Representing Information. Data Models A data model is a precise description of information content Types of data models Conceptual (high-level): in terms.
WELL-DESIGNED DATABASES Process faster Easy to develop and maintain Easy to read and write code.
Concepts of Database Management Seventh Edition Chapter 1 Introduction to Database Management.
Final Project Preliminary Designs Pretty good designs. Remember that design is an iterative process. Don’t get married to your design. OK to change. You.
CIT 381 ER Basics - relationship types - foreign keys - ER Studio.
Modeling & Designing the Database
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
 An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database.  An Entity Relationship.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Daniel AdinugrohoDatabase Programming 1 DATABASE PROGRAMMING Lecture on 29 – 04 – 2005.
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
ITEC224 Database Programming
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Software School of Hunan University Database Systems Design Part III Section 5 Design Methodology.
Methodology Conceptual Databases Design
Relational DB Components
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter 6 Structuring.
Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 2: Representing Information with Data Models The lecture notes.
Information Systems: Databases Define the role of general information systems Describe the elements of a database management system (DBMS) Describe the.
1 Chapter 15 Methodology Conceptual Databases Design Transparencies Last Updated: April 2011 By M. Arief
Organizing Data and Information AD660 – Databases, Security, and Web Technologies Marcus Goncalves Spring 2013.
G057 - Lecture 02 Introduction To Database System Concepts Mr C Johnston ICT Teacher
Completing the Model Common Problems in Database Design.
CSC 240 (Blum)1 Introduction to Database. CSC 240 (Blum)2 Data versus Information When people distinguish between data and information, –Data is simply.
Databases From A to Boyce Codd. What is a database? It depends on your point of view. For Manovich, a database is a means of structuring information in.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
Copyright © Curt Hill The Relational Model of Database Basic organization and terms.
DATABASE MGMT SYSTEM (BCS 1423) Chapter 5: Methodology – Conceptual Database Design.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
© Relational Databases. © Entities Data is stored in tables. Each table is concerned with one entity An entity is a.
CS370 Spring 2007 CS 370 Database Systems Lecture 4 Introduction to Database Design.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
Slide content original, slide layout from Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
CS 1308 Computer Literacy and the Internet
CIS 210 Systems Analysis and Development Week 6 Part II Designing Databases,
Next Back A-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All rights.
C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
1 Database & DBMS The data that goes into transaction processing systems (TPS), also goes to a database to be stored and processed later by decision support.
Database Design – Lecture 6 Moving to a Logical Model.
Copyright © Curt Hill Entities and Relationships The basics and what they have to do with database.
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)
Week 4-5 DBMS Database Design. Database design process can be divided into 6 major steps: 1.Requirements Analysis 2.Conceptual Database Design 3.Logical.
* Database is a group of related objects * Objects can be Tables, Forms, Queries or Reports * All data reside in Tables * A Row in a Table is a record.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
Data Modeling AND ER MODELS.
Hoi Le. Why database? Spreadsheet is not good to: Store very large information Efficiently update data Use in multi-user mode Hoi Le2.
Normalisation Unit 6: Databases. Just to recap  What is an Entity  What is an Attribute?
Chapter 12 Information Systems.
Information Systems Database Management
Entity-Relationship Model and Diagrams (continued)
Week 11: Database Management System
Presentation transcript:

CIT 381 introduction to relations

Tables movieIdtitlegenrelengthrating 101The Thirty- Nine Steps mystery101R 123Annie Hallromantic comedy 110R 145Lady and the Tramp animated comedy 93PG 189Animal Housecomedy87PG Elizabethcostume drama 123PG Stagecoachwestern130R 987Duck Soupcomedy99PG-13 This is the movie table (or relation). Its columns are attributes (or fields).

Key basics The primary key is a unique identifier of each entry in the table. In the movie table, movieId is clearly the key. A table can also have what is called a foreign key, which is the primary key of another table.

Foreign key example This is part of the rental table from bighitvideo. The videoId is the primary key - these are current rentals, and each video can be rented by one customer at a time. The attribute accountId is a foreign key, and it refers to an entry in the customer table.

Schema The schema, also known as a data model, is a description of the tables. movie movieIdint PRIMARY KEY, titlevarchar, genrevarchar, lengthint, ratingvarchar rental accountId int, videoId int PRIMARY KEY, dateRented datetime, dateDuedatetime, costdecimal(5,2), FOREIGN KEY accountID REFERENCES customer, FOREIGN KEY videoId REFERENCES video No data is involved.

Database design ER Design 1. Requirements analysis 2. Conceptual database design 3. Logical database design Beyond ER Design 4. Schema refinement 5. Physical database design 6. Application and security design.

Requirements analysis Meet with intended database users Decide what data is to be stored Decide what applications are needed Determine which operations are the most frequent. This is an ongoing process, and may need to be repeated several times. Users always change their minds.

Conceptual database design Develop high-level description of the data Typically uses ER diagrams (ER = “entity-relationship”) buzzword: semantic data model

Example ER design Built using ER Studio, but could even be done by hand.

Logical database design After choosing our DBMS: MySQL, Oracle, SQLServer, DB2, PostgreSQL, Informix, etc… convert the ER model into tables supported by the DBMS. The schema - table descriptions - is the logical design. Note: DBMS = “database management software”

Schema refinement Apply normalization and … common sense to table design The conversion from ER diagrams can be inelegant might not capture all business rules. At this stage we eyeball the design and clean it up.

Physical database design Consider workload demands Refine design for performance (possibly denormalize) Add indexes, cluster tables.

Application and security design Design and construct applications to be used by the outside world. Take CIT 382. Worry about the security of the connection. Take CIT 383. Well, also worry about database security Set table permissions, create views and roles.

Entities A concrete item we wish to represent in our database. Examples: books, cars, employees, wombats, accounts, offices. Completely described by its attributes.

Relationship An association between two or more entities. Orders is a relationship between entities Customers and Books. Assign is a relationship between Cars and Employees.