Overview of Database Systems CPSC 315 – Programming Studio Spring 2009 Team Project 1, Lecture 1.

Slides:



Advertisements
Similar presentations
Logical DB Design: ER to Relational Entity sets to tables. Employees ssn name lot CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER, PRIMARY.
Advertisements

The Entity-Relationship Model
The Entity-Relationship (ER) Model
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Design Principles: Faithfulness
Design Principles: Faithfulness
CPSC-608 Database Systems Fall 2009 Instructor: Jianer Chen Office: HRBB 309B Phone: Notes #2.
From ER Diagrams to the Relational Model Rose-Hulman Institute of Technology Curt Clifton.
System Concepts and Architecture Rose-Hulman Institute of Technology Curt Clifton.
The Entity-Relationship (ER) Model CS541 Computer Science Department Rutgers University.
Entity-Relationship Data Model Alex Ostrovsky. Presentation Overview ► Short historical overview ► Elements of E-R Model ► Basic organization & relationships.
SLIDE 1IS Fall 2002 Database Management: Discussion Session University of California, Berkeley School of Information Management and.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
SQL Overview Defining a Schema CPSC 315 – Programming Studio Spring 2008 Project 1, Lecture 3 Slides adapted from those used by Jeffrey Ullman, via Jennifer.
CPSC-608 Database Systems Fall 2011 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes 1.
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
CS411 Database Systems Kazuhiro Minami
CS 405G Introduction to Database Systems
The Entity-Relationship Model. 421B: Database Systems - ER Model 2 Overview of Database Design q Conceptual Design -- A first model of the real world.
Ch5: ER Diagrams - Part 2 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
the Entity-Relationship Model
SQL Overview Defining a Schema CPSC 315 – Programming Studio Slides adapted from those used by Jeffrey Ullman, via Jennifer Welch Via Yoonsuck Choe.
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.
Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 2: Representing Information with Data Models The lecture notes.
Entity-Relationship Model Ch. 3
Entity-Relationship Data Model N. Harika Lecturer(csc)
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
Databases : Entity-Relationship Model 2007, Fall Pusan National University Ki-Joune Li These slides are made from the materials that Prof. Jeffrey D. Ullman.
ER Data Models Ctd. CSET 3300.
CS 564 Database Management Systems: Design and Implementation
Christoph F. Eick: Designing E/R Diagrams 1 The Entity-Relationship Model Chapter 3+4.
Relational Databases CPSC 315 – Programming Studio Spring 2013 Project 1, Lecture 2 Slides adapted from those used by Jeffrey Ullman, via Jennifer Welch.
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
 Entity-relationship models (ERM) Entity-relationship models (ERM)  Simple E-R Diagram Simple E-R Diagram  Weak Entity Weak Entity  Strong Entity.
Tallahassee, Florida, 2015 COP4710 Database Systems E-R Model Fall 2015.
© D. Wong Ch. 2 Entity-Relationship Data Model (continue)  Data models  Entity-Relationship diagrams  Design Principles  Modeling of constraints.
Entity-Relationship Model
CPSC 603 Database Systems Lecturer: Laurie Webster II, M.S.S.E., M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 2 Introduction to a First Course in Database Systems.
1 Conceptual Design using the Entity- Relationship Model.
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
The Entity-Relationship Model CIS 4301 Lecture Notes 1/12/2006.
Data Modeling Using the Entity- Relationship (ER) Model.
DBMS ER model-2 Week 6-7.
LECTURE 1: Entity Relationship MODEL. Think before doing it! Like most of the software projects, you need to think before you do something. Before developing.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
1 CS 430 Database Theory Winter 2005 Lecture 3: A Fifty Minute Introduction to Data Modeling.
CS422 Principles of Database Systems Entity-Relationship Model Chengyu Sun California State University, Los Angeles.
High-level Database Models Prof. Yin-Fu Huang CSIE, NYUST Chapter 4.
A short revision on entity- relationship modelling.
A short review on entity- relationship modelling.
CS422 Principles of Database Systems Entity-Relationship Model Chengyu Sun California State University, Los Angeles Adapted from Jeffrey Ullman’s lecture.
Datab ase Systems Week 1 by Zohaib Jan.
MODELS OF DATABASE AND DATABASE DESIGN
Constraints in Entity-Relationship Models
CPSC-310 Database Systems
Modeling Your Data Chapter 2 cs542
Instructor: Elke Rundensteiner
CPSC 315 – Programming Studio Fall 2009 Project 1, Lecture 2
CSCE 315, Fall 2017 Project 1, Lecture 2
CPSC-310 Database Systems
From ER to Relational Model
Overview of Database Systems
Overview of Database Systems
SQL OVERVIEW DEFINING A SCHEMA
The Entity-Relationship Model
Overview of Database Systems
The Entity-Relationship Model
Overview of Database Systems
The Entity-Relationship (ER) Model
Presentation transcript:

Overview of Database Systems CPSC 315 – Programming Studio Spring 2009 Team Project 1, Lecture 1

Project Your first project (next week) will involve putting together a very basic database system There will be a few lectures to give you an overview of database systems This is nowhere close to what you would get in a full database course Slides adapted from Jennifer Welch (some of hers were from Jeffrey Ullman)

Database Systems Systems designed to manage very large amounts of data, and to query that data to pull out useful information Often, key considerations include: Efficiency Reliability Ease of access (querying, distributed)

Creating a Database A database schema determines what will be represented in the database This should be tightly controlled by a database manager Specified through a data definition language

Querying Databases Once database has been populated, users can query the data A data manipulation language controls how the user can specify queries, (and thus what types of queries are allowed) SQL is probably the most well-known

Other Database Topics “Real” database courses include lots of other things that we’ll be ignoring here More complete theory behind design Query optimization Efficient storage Processing Transactions – grouped queries that provide atomic operations  Scheduling, logging, recovery

Entity-Relationship Model Way of expressing (in diagrammatic form) a database design Kinds of data and how they connect Easy first way to think about databases Later, relational model described

Entities and Attributes Entities are things Entity sets are collections of those things Attributes are properties of entity sets

Entity Sets and Attributes Senator Name State Party Years Name Text Bill

Relationships Connect two or more entity sets Senator Name State Party Years NameText Bill Sponsored Name Organization Lobbyist Wrote Contributed

Values of Relationships The “value” of an entity set is the entities it contains The “value” of a relationship is a list of currently related entities (one from each entity set) SenatorBill SmithTax Bill SmithDefense Bill JonesTax Bill

Multi-Way Relationships E.g. Lobbyist lobbied Senator about Bill Senator Name State Party Years NameText Bill Name Organization Lobbyist Lobbied

Relationship Types Consider binary relationships (two entity groups in a relationship) One-to-one Each entity can have at most one in the other category e.g. entity groups: Baseball player, Team relationship: Team MVP A team can only have one MVP, and a player can only be MVP for one team.

Relationship Types Consider binary relationships (two entity groups in a relationship) One-to-one Many-to-one Each entity of first set can go to at most one of the second set e.g. entity groups: Person, Town relationship: BornIn A person can is born in only one town, but a town can have many people born there

Relationship Types Consider binary relationships (two entity groups in a relationship) One-to-one Many-to-one Many-to-many Any number from one set to the other e.g. Senators can sponsor many bills, and each bill can be sponsored by many Senators

Diagrams of Relationships Arrow shows “to one” PersonTown Baseball Player Team Born In MVP Lived In

Attributes on Relationships Can be converted to multi-way diagrams PersonTown Born In Hospital

Attributes on Relationships Can be converted to multi-way diagrams PersonTown Born In Hospital Hospitals

Attributes on Relationships Note arrows PersonDate Injured Hospital Hospitals

Programmer Roles If multiple references to same entity set, label edges by roles Students Team Tester Team Lead

Subclass Fewer entities, more properties U.S. Representative State Elected Official Name Party isa District

Subclass Entity in multiple subclasses U.S. Representative District Elected Official Name isa Republican … isa … Democrat State

Keys A key is a set of attributes for an entity set such that no two entities agree on all the attributes. We must have a key for every entity set U.S. Representative District Elected Official Name Party isa For an isa hierarchy, only root can have a key.

Key for multiple attributes Must choose one set of attributes Baseball Player First Name Last Name Number Position NationalitySalary Birthdate Team

Key for multiple attributes Must choose one set of attributes Baseball Player First Name Last Name Number Position NationalitySalary Birthdate Team

Key for multiple attributes Must choose one set of attributes Baseball Player First Name Last Name Number Position NationalitySalary Birthdate Team

Weak entity sets Need “help” to determine key Baseball Player First Name Last Name Number Position NationalitySalary Birthdate Name Team Plays On City Note arrrow: indicates many to one.

Design Techniques Avoid redundancy Say the same thing two ways Baseball Player First Name Last Name Number Position Team Name Salary Birthdate Name Team Plays On City

Design Techniques Avoid redundancy Say the same thing two ways Baseball Player First Name Last Name Number Position Team Name Team Town Birthdate

Design Techniques Don’t use entity set if attribute will do Entity lists should either Have some non-key attribute Be the “many” in a many-one/many-many relationship Baseball Player Name Plays On Name Team City

Design Techniques Don’t use entity set if attribute will do Entity lists should either Have some non-key attribute Be the “many” in a many-one/many-many relationship Baseball Player Name Team

Design Techniques Don’t overuse weak entity sets Usually use unique key for each entity set (e.g. UIN, SSN, VIN) Not always possible, though