Database Management System Quiz 1. A company needs to store information about: the employees identified by EmpNo, Name, Salary and Phone; departments.

Slides:



Advertisements
Similar presentations
COP4540 Database Management System Midterm Review
Advertisements

ER to Relational Mapping. Logical DB Design: ER to Relational Entity sets to tables. CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER,
R ELATIONAL M ODEL TO SQL Data Model. 22 C ONCEPTUAL D ESIGN : ER TO R ELATIONAL TO SQL How to represent Entity sets, Relationship sets, Attributes, Key.
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.
Complex Integrity Constraints in SQL. Constraints over a Single Table Table Constraint: Create TABLE Sailors (sid INTEGER, sname CHAR(10), rating INTEGER,
Developing ER-Diagram
Relational Database. Relational database: a set of relations Relation: made up of 2 parts: − Schema : specifies the name of relations, plus name and type.
Tallahassee, Florida, 2014 COP4710 Database Systems Relational Model Fall 2014.
The Entity-Relationship Model
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Entity-Relationship Models
Book Chapter 3 (part 2 ) From ER to Relational Model.
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
Overview Begin 6:00 Quiz15 mins6:15 Review Table Terms25 mins6:40 Short Break10 mins6:50 SQL: Creating Tables60 mins7:50 Break10 mins8:00 Lab – Creating.
CN2180 MS SQL Server Kemtis Kunanuraksapong MSIS with Distinction, A+ MCTS, MCDST, MCP.
E/R – ODL – UML CS145 Monday November 26 Sanaz Motahari-Asl.
COP5725 – Principles of Database Management Systems
1 Translation of ER-diagram into Relational Schema Prof. Sin-Min Lee Department of Computer Science.
SPRING 2004CENG 3521 The Relational Model Chapter 3.
RELATIONSHIP  THE WAY TABLES ARE RELATED  A TABLE MUST PARTICIPATE IN AT LEAST ONE RELATIONSHIP  IN A BINARY RELATIONSHIP TWO ENTITIES PARTICIPATE 
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
Mapping of N:M Relationships PERSON-ID TITLE PERSON-NAME DATE-OF-BIRTH PERSON-ID PROJECT-ID HOURS-SPENT PROJECT-ID END-DATE START-DATE E-R Diagram PERSON.
Computer Science & Engineering 2111 Introduction to Database Management Systems Relationships and Database Creation 1 CSE 2111 Introduction to Database.
Oracle Data Definition Language (DDL)
ER to Relational Mapping. Logical DB Design: ER to Relational Entity sets to tables. CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER,
1 Translating E/R Diagrams into Relational Schemas.
RDB/1 An introduction to RDBMS Objectives –To learn about the history and future direction of the SQL standard –To get an overall appreciation of a modern.
Principles of Database Design, Part II AIMS 2710 R. Nakatsu.
The Relational Model Database Systems Lecture 3 Natasha Alechina.
1 Translation of ER-diagram into Relational Schema Prof. Sin-Min Lee Department of Computer Science.
Assignements. CSC343: Intro. to Databases2 Exercise 1 Superkeys: Candidate keys: Primary key:
CS370 Spring 2007 CS 370 Database Systems Lecture 4 Introduction to Database Design.
The Relational Model1 ER-to-Relational Mapping and Views.
Recap of SQL Lab no 8 Advance Database Management System.
Database Design Sections 11 Database relationship, Integrity, keys, mapping conceptual model to logical/physical model Previous Section 12 – DDLesson11Fa12.ppt.
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
Description and exemplification of entity-relationship modelling.
Database Design Sections 11 & 12 drawing conventions, generic model, integrity, keys, mapping conceptual model to logical/physical model.
Database Management Systems,1 Conceptual Design Using the Entity-Relationship (ER) Model.
CREATE TABLE CREATE TABLE statement is used for creating relations Each column is described with three parts: column name, data type, and optional constraints.
Quiz questions. 1 A data structure that is made up of fields and records? Table.
Mapping E/R Diagrams to Relational Database Schemas
Lecture 3 Book Chapter 3 (part 2 ) From ER to Relational.
COMP3030 Database Management System Final Review
Relational Algebra Sample Questions.
1 Theory, Practice & Methodology of Relational Database Design and Programming Copyright © Ellis Cohen Relational State Assertions These slides.
COP-5725 Practice Exercises
ER & Relational: Digging Deeper R &G - Chapters 2 & 3.
Mapping E/R to RM, R. Ramakrishnan and J. Gehrke with Dr. Eick’s additions 1 Mapping E/R Diagrams to Relational Database Schemas Second Half of Chapter.
Test SEITA.
CSCI N311: Oracle Database Programming 5-1 Chapter 15: Changing Data: insert, update, delete Insert Rollback Commit Update Delete Insert Statement –Allows.
Extra ER. Q1: Draw an ER diagram A construction company wishes to establish a database system to record information about employees. The employee data.
1 CS122A: Introduction to Data Management Lecture #4 (E-R  Relational Translation) Instructor: Chen Li.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Tables & Relationships
The Entity-Relationship Model
The Entity-Relationship Model
Generalization.
From ER to Relational Model
Practice of ER modeling
Practice of ER modeling
Question 01 A company database needs to store information about employees (identified by NIC, with salary and phone as attributes), departments (identified.
Extra ER.
Entity-Relationship Modeling "Extended"
Extra ER.
These are slides from Dr. Phil Cannata’s Class
Entity-Relationship Modeling "Extended"
Extra ER.
Entity-Relationship Modeling "Extended"
Extra ER LAB #2.
Presentation transcript:

Database Management System Quiz 1

A company needs to store information about: the employees identified by EmpNo, Name, Salary and Phone; departments identified by DeptNo, Name, and Budget; the children of an employee with name and age. Each employee works in only one department; each department is managed by an employee; a child must be identified uniquely by name when the parent (who is an employee; assume that only one parent works for the company and the employee may has more than one child) is known. We are not interested in information about a child once the parent leaves the company. 1.Draw an ER diagram that captures this information 2.Translate the ER into relational model.

Employee EmpNo Name Salary Department DeptNo Name Budegt Child NameAge Works in M 1 has M Manage

Create table EMPLOYEES( EMPNO integer, NAME char(20), SALARY float, DeptNo Integer, Primary Key (EMPNO), Foreign key (Deptno) References Departments) Create table DEPARTMENTS( DEPTNO integer, NAME char(20), BUDGET integer, Primary Key (DEPTNO)) Create table CHILD( EMPNO integer, NAME char(20), Primary Key (EMPNO,NAME), Foreign Key (EMPNO) References EMPLOYEES On Delete CASCADE) Create table MANAGE( EMPNO integer, DEPTNO integer, Primary Key (EMPNO, DEPTNO), Foreign Key (EMPNO) References EMPLOYEES, Foreign Key (DEPTNO) References DEPARTMENTs)