Database Systems Conceptual Database Design SL04

Size: px
Start display at page:

Download "Database Systems Conceptual Database Design SL04"

Transcription

1 Informatik für Ökonomen II Fall 2010 Database Systems Conceptual Database Design SL04 Basic Entity-Relationship (ER) Model Concepts Entities and attributes, entity types, entity sets Relationships and relationship types Weak entity types Roles and attributes in relationship types ER-to-Relational mapping algorithm Illustration of Evaluation of SQL Statements/1 1. FROM: form the cross product of the tables in the from clause FROM 2. WHERE: eliminate tuples that do not satisfy the where clause... WHERE 3. GROUP BY: group tuples according to the group clause GROUP BY... Inf4Oec10, SL04 1/57 M. Böhlen, Illustration of Evaluation of SQL Statements/2 Inf4Oec10, SL04 2/57 M. Böhlen, Checking HAVING: eliminate groups that do not satisfy the having clause HAVING 5. SELECT: evaluate the expressions in the select clause and produce one result tuple for each group SELECT 1. Translate the relational algebra expression π X (r σ U=12 (s)) into SQL. select X select X from r, ( select * from r, s from s where s.u = 12 where U = 12) 2. What is the result of the following SQL query select min(x), sum(x), max(y), Z from r group by Z? r X Y Z Result min(x) sum(x) max(y) Z Inf4Oec10, SL04 3/57 M. Böhlen, ifi@uzh Inf4Oec10, SL04 4/57 M. Böhlen, ifi@uzh

2 Checking... Overview of Database Design Process 3. What is the result of the following SQL statement: select * from r where X > 10 or X <= 10 All tuples from r where attribute X is not null 4. What is the result of the following SQL statement: select * from r where X <> null An empty relation with the schema of r Inf4Oec10, SL04 5/57 M. Böhlen, ifi@uzh Example COMPANY Database Inf4Oec10, SL04 6/57 M. Böhlen, ifi@uzh ER Model Concepts We need to create a database schema design based on the following requirements of the COMPANY database: The company is organized into departments. Each department has a name, number and an employee who manages the department. We keep track of the start date of the department manager. A department may have several locations. Each department controls a number of projects. Each project has a unique name, unique number and is located at a single location. We store each employee s social security number, address, salary, sex, and birthdate. Each employee works for one department but may work on several projects. We keep track of the number of hours per week that an employee currently works on each project. We also keep track of the direct supervisor of each employee. Each employee may have a number of dependents. For each dependent, we keep track of their name, sex, birthdate, and relationship to the employee. Entities and Attributes Entities are specific objects or things in the mini-world that are represented in the database. For example the employee John Smith, the Research department, the project ProductX Attributes are properties used to describe an entity. For example an employee entity may have the attributes Name, SSN, Address, Sex, BirthDate A specific entity will have a value for each of its attributes. For example a specific employee entity may have Name = John Smith, SSN = , Address = 731, Fondren, Houston, TX, Sex = M, BirthDate = 09-JAN-55 Each attribute has a domain (value set, data type) associated with it, e.g., enumerated type, integer, string, subrange,... Inf4Oec10, SL04 7/57 M. Böhlen, ifi@uzh Inf4Oec10, SL04 8/57 M. Böhlen, ifi@uzh

3 Types of Attributes/1 Simple attribute Each entity has a single atomic value for the attribute. For example, SSN or Sex. Composite attribute The attribute may be composed of several components. For example: Address(Apt#, House#, Street, City, State, ZipCode, Country), or Name(FirstName, MiddleName, LastName). Multi-valued attribute An entity may have multiple values for that attribute. For example, Color of a CAR or PreviousDegrees of a STUDENT. Denoted as {Color} or {PreviousDegrees}. Derived attribute Attributes can be derived (computed) rather than stored. Attribute Number of employees is a derived attribute of DEPARTMENT. Types of Attributes/2 Composite and multi-valued attributes may be nested arbitrarily to any number of levels. For example, PreviousDegrees of a student is a composite multi-valued attribute denoted by {PreviousDegrees (College, Year, Degree, Field)} Multiple PreviousDegrees values can exist Each has four subcomponent attributes: College, Year, Degree, Field A hierarchy of composite attributes: Address Street address City State Zip Number Street Apartment number Inf4Oec10, SL04 9/57 M. Böhlen, ifi@uzh Entity Types and Key Attributes Entities with the same basic attributes are grouped or typed into an entity type. For example, the entity type EMPLOYEE and PROJECT. An attribute of an entity type for which each entity must have a unique value is called a key attribute of the entity type. For example, SSN of EMPLOYEE. A key attribute may be composite. VehicleTagNumber is a key of the CAR entity type with components (Number, State). An entity type may have more than one key. The CAR entity type may have two keys: VehicleIdentificationNumber (popularly called VIN) VehicleTagNumber (Number, State), aka license plate number. Each key is underlined. Inf4Oec10, SL04 10/57 M. Böhlen, ifi@uzh Displaying an Entity type In ER diagrams, an entity type is displayed in a rectangular box Attributes are displayed in ovals Each attribute is connected to its entity type Components of a composite attribute are connected to the oval representing the composite attribute Each key attribute is underlined Multivalued attributes are displayed in double ovals Derived attributes are displayed in dashed ovals Entity type CAR with attributes Registration(Number, State), Vehicle id, Make, Model, Year, {Color} Inf4Oec10, SL04 11/57 M. Böhlen, ifi@uzh Inf4Oec10, SL04 12/57 M. Böhlen, ifi@uzh

4 Entity Set Entity Types for the COMPANY Database/1 The collection of all entities of a particular entity type in the database is called the entity set. The same name (e.g., CAR) is used to refer to both the entity type and the entity set. The entity set is the current state of the entities of that type that are stored in the database. Entity set CAR: Based on the requirements, we can identify four initial entity types in the COMPANY database: DEPARTMENT PROJECT EMPLOYEE DEPENDENT The initial attributes are derived from the requirements description Guidelines for determining entity types and attributes: The nouns in a descriptions translate to entity types Nouns that describe nouns of entity types translate to attributes. Inf4Oec10, SL04 13/57 M. Böhlen, ifi@uzh Entity Types for the COMPANY Database/2 Inf4Oec10, SL04 14/57 M. Böhlen, ifi@uzh Relationships and Relationship Types/1 The initial design is typically not complete. The schema design process is an iterative refinement process. The initial design is created and iteratively refined. Some aspects in the requirements will be represented as relationships. ER model has three main concepts: Entities (and their entity types and entity sets) Attributes (simple, composite, multivalued) Relationships (and their relationship types and relationship sets) Inf4Oec10, SL04 15/57 M. Böhlen, ifi@uzh Inf4Oec10, SL04 16/57 M. Böhlen, ifi@uzh

5 Relationships and Relationship Types/2 Relationships and Relationship Types/3 A relationship relates two or more distinct entities with a specific meaning. For example, EMPLOYEE John Smith works on PROJECT ProductX, or EMPLOYEE Franklin Wong manages the Research DEPARTMENT. Relationships of the same type are grouped or typed into a relationship type. For example, the WORKS ON relationship type in which EMPLOYEEs and PROJECTs participate, or the MANAGES relationship type in which EMPLOYEEs and DEPARTMENTs participate. The degree of a relationship type is the number of participating entity types. Both MANAGES and WORKS ON are binary relationships. Relationship type: Schema description of a relationship Identifies the relationship name and the participating entity types Identifies relationship constraints Relationship set: The current set of relationship instances represented in the database The current state of a relationship type Each instance in the set relates individual participating entities one from each participating entity type Inf4Oec10, SL04 17/57 M. Böhlen, ifi@uzh WORKS FOR relationship Inf4Oec10, SL04 18/57 M. Böhlen, ifi@uzh Relationships for the COMPANY database/1 entity: e 1 relationship: r 1 = WORKS FOR(e 1,d 1 ) entity set: EMPLOYEE relationship set: WORKS FOR By examining the requirements, six relationship types are identified All are binary relationships (degree 2) Listed below with their participating entity types: WORKS FOR (between EMPLOYEE and DEPARTMENT) MANAGES (also between EMPLOYEE and DEPARTMENT) CONTROLS (between DEPARTMENT and PROJECT) WORKS ON (between EMPLOYEE and PROJECT) SUPERVISION (between EMPLOYEE (as subordinate) and EMPLOYEE (as supervisor)) DEPENDENTS OF (between EMPLOYEE and DEPENDENT) In ER diagrams, we represent the relationship type as follows: Diamond-shaped box is used to display a relationship type Connected to the participating entity types via straight lines Inf4Oec10, SL04 19/57 M. Böhlen, ifi@uzh Inf4Oec10, SL04 20/57 M. Böhlen, ifi@uzh

6 Relationships for the COMPANY database/2 Discussion of Relationship Types/1 In the refined design, some attributes from the initial entity types are refined into relationships: Manager of DEPARTMENT -> MANAGES Works on of EMPLOYEE -> WORKS ON Department of EMPLOYEE -> WORKS FOR etc More than one relationship type can exist between the same participating entity types: MANAGES and WORKS FOR are distinct relationship types between EMPLOYEE and DEPARTMENT These relationship types have different meanings and different relationship instances. Inf4Oec10, SL04 21/57 M. Böhlen, Discussion of Relationship Types/2 Inf4Oec10, SL04 22/57 M. Böhlen, Structural Constraints on Relationships In a recursive relationship type the same participating entity type occurs in distinct roles Example: the SUPERVISION relationship EMPLOYEE participates twice in two distinct roles: supervisor (or boss) role supervisee (or subordinate) role Each relationship instance relates two distinct EMPLOYEE entities: One employee in supervisor role One employee in supervisee role Structural constraints on relationship types limit the possible combinations of entities in relationship sets. A cardinality constraint specifies maximum participation One-to-one (1:1) One-to-many (1:N) or Many-to-one (N:1) Many-to-many (M:N) A participation constraint specifies minimum participation (also called existence dependency) zero (optional participation, not existence-dependent) one or more (mandatory participation, existence-dependent) Inf4Oec10, SL04 23/57 M. Böhlen, ifi@uzh Inf4Oec10, SL04 24/57 M. Böhlen, ifi@uzh

7 Many-to-one (N:1) Relationship Many-to-many (M:N) Relationship EMPLOYEE:DEPARTMENT = N:1 An employee works for at most 1 department A department employs at most N employees Inf4Oec10, SL04 25/57 M. Böhlen, ifi@uzh Recursive Relationships/1 EMPLOYEE:PROJECT = M:N An employee works on at most N projects A project is assigned to at most M employees Inf4Oec10, SL04 26/57 M. Böhlen, ifi@uzh Recursive Relationships/2 In a recursive relationship type: The same entity type participates in different roles. For example, SUPERVISION relationships between an EMPLOYEE in role of supervisor (or boss) and another EMPLOYEE in role of subordinate (or worker). In ER diagrams we need to display role names to distinguish participations. label 1 stands for supervisor role label 2 stand for subordinate role e 1 is the supervisor of e 2 e 1 is supervised by e 5 Inf4Oec10, SL04 27/57 M. Böhlen, ifi@uzh Inf4Oec10, SL04 28/57 M. Böhlen, ifi@uzh

8 Attributes of Relationship types Notation for Constraints on Relationships A relationship type can have attributes: For example, HoursPerWeek of WORKS ON Its value for each relationship instance describes the number of hours per week that an EMPLOYEE works on a PROJECT. A value of HoursPerWeek depends on a particular (employee, project) combination Most relationship attributes are used with M:N relationships In 1:N relationships, they can be transferred to the entity type on the N-side of the relationship Cardinality constraints (of a binary relationship): 1:1, 1:N, N:1, or M:N Shown by placing appropriate numbers on the relationship edges. Participation constraint on each participating entity type: total (called existence dependency) or partial. Total shown by double line, partial by single line. Structural constraints are easy to specify for binary relationship types but get more subtle for higher order relationship types. Inf4Oec10, SL04 29/57 M. Böhlen, ifi@uzh Weak Entity Types Inf4Oec10, SL04 30/57 M. Böhlen, ifi@uzh Alternative Diagrammatic Notation A weak entity type is an entity type that does not have a key attribute. A weak entity must participate in an identifying relationship type with an owner or identifying entity type. Entities are identified by the combination of: A partial key of the weak entity type The particular entity they are related to in the identifying entity type Example: A DEPENDENT entity is identified by the dependent s first name, and the specific EMPLOYEE with whom the dependent is related Name of DEPENDENT is the partial key DEPENDENT is a weak entity type EMPLOYEE is its identifying entity type via the identifying relationship type DEPENDENT OF ER diagrams is one popular example for displaying database schemas. Many other notations exist in the literature and in various database design and modeling tools. UML class diagrams are another way of displaying ER concepts. Inf4Oec10, SL04 31/57 M. Böhlen, ifi@uzh Inf4Oec10, SL04 32/57 M. Böhlen, ifi@uzh

9 Summary of Notation for ER Diagrams Relationships of Higher Degree/1 Relationship types of degree 2 are called binary Relationship types of degree 3 are called ternary and of degree n are called n-ary Constraints are harder to specify for higher-degree relationships (n>2) than for binary relationships In an n-ary relationship a cardinality constraint specifies how often an entity may occur for one specific instance of all other entities. In general, an n-ary relationship is not equivalent to n binary relationships If needed, the binary and n-ary relationships can all be included in the schema design Inf4Oec10, SL04 33/57 M. Böhlen, ifi@uzh Relationships of Higher Degree/2 Inf4Oec10, SL04 34/57 M. Böhlen, ifi@uzh Relationships of Higher Degree/3 In some cases, a ternary relationship can be represented as a weak entity if the data model allows a weak entity type to have multiple identifying relationships (and hence multiple owner entity types) Inf4Oec10, SL04 35/57 M. Böhlen, ifi@uzh Inf4Oec10, SL04 36/57 M. Böhlen, ifi@uzh

10 Relationships of Higher Degree/4 If a particular binary relationship can be derived from a higher-degree relationship at all times, then it is redundant. For example, the TAUGHT DURING binary relationship can be derived from the ternary relationship OFFERS (based on the meaning of the relationships) Data Modeling Tools A number of popular tools that conceptual modeling and mapping into relational schema design. Examples: ERWin, S-Designer (Enterprise Application Suite), ER-Studio, etc. Pros: Serves as documentation of application requirements Easy user interface: mostly graphics editor support Simple graphical models are very intuitive Cons: Graphical models easily get complex and ambiguous Most tools lack a proper distinct notation for relationships with relationship attributes Mostly represent a relational design in a diagrammatic form rather than a conceptual ER-based design Inf4Oec10, SL04 37/57 M. Böhlen, ifi@uzh ER-to-Relational Mapping Algorithm/1 Inf4Oec10, SL04 38/57 M. Böhlen, ifi@uzh The ER Schema for the COMPANY Database Algorithm to map a conceptual database design to a relational database design. ER-to-Relational Mapping Algorithm Step 1: Mapping of Regular Entity Types Step 2: Mapping of Weak Entity Types Step 3: Mapping of Binary 1:1 Relation Types Step 4: Mapping of Binary 1:N Relationship Types Step 5: Mapping of Binary M:N Relationship Types Step 6: Mapping of Multivalued attributes Step 7: Mapping of N-ary Relationship Types Inf4Oec10, SL04 39/57 M. Böhlen, ifi@uzh Inf4Oec10, SL04 40/57 M. Böhlen, ifi@uzh

11 ER-to-Relational Mapping Algorithm/2 ER-to-Relational Mapping Algorithm/3 Step 1: Mapping of Regular Entity Types. For each regular (strong) entity type E in the ER schema, create a relation R that includes all the simple attributes of E. Choose one of the key attributes of E as the primary key for R. If the chosen key of E is composite, the set of simple attributes that form it will together form the primary key of R. Example: We create the relations EMPLOYEE, DEPARTMENT, and PROJECT in the relational schema corresponding to the regular entities in the ER diagram. SSN, DNUMBER, and PNUMBER are the primary keys for the relations EMPLOYEE, DEPARTMENT, and PROJECT as shown. EMPLOYEE(FName, MInit, LName, SSN, BDate, Address, Sex, Salary) DEPARTMENT(DName, DNumber) PROJECT(PName, PNumber, PLocation) Inf4Oec10, SL04 41/57 M. Böhlen, ifi@uzh ER-to-Relational Mapping Algorithm/4 Inf4Oec10, SL04 42/57 M. Böhlen, ifi@uzh ER-to-Relational Mapping Algorithm/5 Step 2: Mapping of Weak Entity Types For each weak entity type W in the ER schema with owner entity type E, create a relation R and include all simple attributes (or simple components of composite attributes) of W as attributes of R. Also, include as foreign key attributes of R the primary key attributes of the relations that correspond to the owner entity types. The primary key of R is the combination of the primary keys of the owners and the partial key of the weak entity type W, if any. Example: Create the relation DEPENDENT in this step to correspond to the weak entity type DEPENDENT. Include the primary key SSN of the EMPLOYEE relation as a foreign key attribute of DEPENDENT (renamed to ESSN). The primary key of the DEPENDENT relation is the combination ESSN, DepName because DepName is the partial key of DEPENDENT. EMPLOYEE(FName, MInit, LName, SSN, BDate, Address, Sex, Salary) DEPARTMENT(DName, DNumber) PROJECT(PName, PNumber, PLocation) DEPENDENT(ESSN, DepName, Sex, BDate, Relationship) Inf4Oec10, SL04 43/57 M. Böhlen, ifi@uzh Inf4Oec10, SL04 44/57 M. Böhlen, ifi@uzh

12 ER-to-Relational Mapping Algorithm/6 Step 3: Mapping of Binary 1:1 Relation Types For each binary 1:1 relationship type R in the ER schema, identify the relations S and T that correspond to the entity types participating in R. There are three possible approaches: 1. Foreign Key approach: Choose one of the relations, say S, and include as foreign key in S the primary key of T. It is better to choose an entity type with total participation in R in the role of S. 2. Merged relation option: An alternate mapping of a 1:1 relationship type is possible by merging the two entity types and the relationship into a single relation. This may be appropriate when both participations are total. 3. Cross-reference or relationship relation option: The third alternative is to set up a third relation R for the purpose of cross-referencing the primary keys of the two relations S and T representing the entity types. ER-to-Relational Mapping Algorithm/7 Example: The 1:1 relation MANAGES is mapped by choosing the participating entity type DEPARTMENT to serve in the role of S, because its participation in the MANAGES relationship type is total. EMPLOYEE(FName, MInit, LName, SSN, BDate, Address, Sex, Salary) DEPARTMENT(DName, DNumber, MgrSSN, MgrStartDate) PROJECT(PName, PNumber, PLocation) DEPENDENT(ESSN, DepName, Sex, BDate, Relationship) Inf4Oec10, SL04 45/57 M. Böhlen, ifi@uzh ER-to-Relational Mapping Algorithm/8 Inf4Oec10, SL04 46/57 M. Böhlen, ifi@uzh ER-to-Relational Mapping Algorithm/9 Step 4: Mapping of Binary 1:N Relationship Types For each binary 1:N relationship type R in the ER schema, identify the relations S and T that correspond to the entity types participating in R. S is the N-side. Include as foreign key in S the primary key of relation T that represents the other entity type participating in R. Include simple attributes of the 1:N relation type as attributes of S. Example: 1:N relationship types WORKS FOR, CONTROLS, and SUPERVISION. For example for WORKS FOR we include the primary key DNUMBER of the DEPARTMENT relation as foreign key in the EMPLOYEE relation and call it DNO. EMPLOYEE(FName, MInit, LName, SSN, BDate, Address, Sex, Salary, SuperSSN, DNo) DEPARTMENT(DName, DNumber, MgrSSN, MgrStartDate) PROJECT(PName, PNumber, PLocation, DNum) DEPENDENT(ESSN, DepName, Sex, BDate, Relationship) Inf4Oec10, SL04 47/57 M. Böhlen, ifi@uzh Inf4Oec10, SL04 48/57 M. Böhlen, ifi@uzh

13 ER-to-Relational Mapping Algorithm/10 ER-to-Relational Mapping Algorithm/11 Step 5: Mapping of Binary M:N Relationship Types. For each regular binary M:N relationship type R, create a new relation S to represent R. Include as foreign key attributes in S the primary keys of the relations that represent the participating entity types; their combination will form the primary key of S. Also include any simple attributes of the M:N relationship type (or simple components of composite attributes) as attributes of S. Example: The M:N relationship type WORKSON from the ER diagram is mapped by creating a relation WORKSON in the relational database schema. The primary keys of the PROJECT and EMPLOYEE relations are included as foreign keys in WORKSON and renamed PNo and ESSN, respectively. Attribute Hours in WORKSON represents the Hours attribute of the relation type. The primary key of the WORKSON relation is the combination of the foreign key attributes ESSN, PNo. EMPLOYEE(FName, MInit, LName, SSN, BDate, Address, Sex, Salary, SuperSSN, DNo) DEPARTMENT(DName, DNumber, MgrSSN, MgrStartDate) PROJECT(PName, PNumber, PLocation, DNum) DEPENDENT(ESSN, DepName, Sex, BDate, Relationship) WORKSON(ESSN, PNo, Hours) Inf4Oec10, SL04 49/57 M. Böhlen, ifi@uzh ER-to-Relational Mapping Algorithm/12 Inf4Oec10, SL04 50/57 M. Böhlen, ifi@uzh ER-to-Relational Mapping Algorithm/13 Step 6: Mapping of Multivalued attributes. For each multivalued attribute A, create a new relation R. This relation R will include an attribute corresponding to A, plus the primary key attribute K of the relation that represents the entity or relationship type that has A as an attribute. The primary key of R is the combination of A and K. If the multivalued attribute is composite, we include its simple components. Example: The relation DEPTLOC is created. The attribute DLocation represents the multivalued attribute Locations of DEPARTMENT, while DNumber, as foreign key, represents the primary key of the DEPARTMENT relation. The primary key of R is the combination of DNumber, DLocation. EMPLOYEE(FName, MInit, LName, SSN, BDate, Address, Sex, Salary, SuperSSN, DNo) DEPARTMENT(DName, DNumber, MgrSSN, MgrStartDate) PROJECT(PName, PNumber, PLocation, DNum) DEPENDENT(ESSN, DepName, Sex, BDate, Relationship) WORKSON(ESSN, PNo, Hours) DEPTLOC(DNumber, DLocation) Inf4Oec10, SL04 51/57 M. Böhlen, ifi@uzh Inf4Oec10, SL04 52/57 M. Böhlen, ifi@uzh

14 ER-to-Relational Mapping Algorithm/14 ER-to-Relational Mapping Algorithm/15 Example: The relationship type SUPPLY Step 7: Mapping of N-ary Relationship Types. For each n-ary relationship type R, where n>2, create a new relationship S to represent R. Include as foreign key attributes in S the primary keys of the relations that represent the participating entity types. Also include any simple attributes of the n-ary relationship type (or simple components of composite attributes) as attributes of S. This can be mapped to the relation SUPPLY shown in the relational schema, whose primary key is the combination of the three foreign keys SName, PartNo, ProjName SUPPLIER(SName,...) PROJECT(ProjName,...) PART(PartNo,...) SUPPLY(SName, ProjName, PartNo, Quantity) Inf4Oec10, SL04 53/57 M. Böhlen, ifi@uzh ER-to-Relational Mapping Algorithm/16 Inf4Oec10, SL04 54/57 M. Böhlen, ifi@uzh Summary of Mapping Constructs and Constraints Correspondence between ER and Relational Models ER Model Relational Model Entity type Entity relation 1:1 or 1:N relationship type Foreign key (or relationship relation) M:N relationship type Relationship relation and two foreign keys n-ary relationship type Relationship relation and n foreign keys Simple attribute Attribute Composite attribute Set of simple component attributes Multivalued attribute Relation and foreign key Key attribute Primary (or secondary) key Inf4Oec10, SL04 55/57 M. Böhlen, ifi@uzh Inf4Oec10, SL04 56/57 M. Böhlen, ifi@uzh

15 Summary ER model concepts: entity type, entity set, entity attribute, attribute value relationship type, relationship set, relationship structural constraints: cardinality, participation ER-to-Relational Mapping Algorithm Step 1: Mapping of Regular Entity Types Step 2: Mapping of Weak Entity Types Step 3: Mapping of Binary 1:1 Relation Types Step 4: Mapping of Binary 1:N Relationship Types. Step 5: Mapping of Binary M:N Relationship Types. Step 6: Mapping of Multivalued attributes. Step 7: Mapping of N-ary Relationship Types. Inf4Oec10, SL04 57/57 M. Böhlen,

Chapter 3. Data Modeling Using the Entity-Relationship (ER) Model

Chapter 3. Data Modeling Using the Entity-Relationship (ER) Model Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model Chapter Outline Overview of Database Design Process Example Database Application (COMPANY) ER Model Concepts Entities and Attributes Entity

More information

Entity-Relationship Model

Entity-Relationship Model UNIT -2 Entity-Relationship Model Introduction to ER Model ER model is represents real world situations using concepts, which are commonly used by people. It allows defining a representation of the real

More information

ER & EER to Relational Mapping. Chapter 9 1

ER & EER to Relational Mapping. Chapter 9 1 ER & EER to Relational Mapping Chapter 9 1 Figure 3.2 ER schema diagram for the company database. Fname Minit Lname Number Name Address N 1 WORKS_FOR Name Locations Sex Salary Ssn Bdate EMPLOYEE NumberOfEmployees

More information

CSC 443 Data Base Management Systems. Basic SQL

CSC 443 Data Base Management Systems. Basic SQL CSC 443 Data Base Management Systems Lecture 6 SQL As A Data Definition Language Basic SQL SQL language Considered one of the major reasons for the commercial success of relational databases SQL Structured

More information

Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model

Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Outline Using High-Level Conceptual Data Models for

More information

Relational Schema. CS 4700/6700 A Sample of Small Database Design Using Microsoft Access

Relational Schema. CS 4700/6700 A Sample of Small Database Design Using Microsoft Access CS 4700/6700 A Sample of Small Database Design Using Microsoft Access Company relational database schema from the textbook (Fundamentals of Database systems, 6 th Edition, by Ramez Elmasri and Shamkant

More information

Database Systems. Session 3 Main Theme. Enterprise Data Modeling Using The Entity/Relationship (ER) Model. Dr. Jean-Claude Franchitti

Database Systems. Session 3 Main Theme. Enterprise Data Modeling Using The Entity/Relationship (ER) Model. Dr. Jean-Claude Franchitti Database Systems Session 3 Main Theme Enterprise Data Modeling Using The Entity/Relationship (ER) Model Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical

More information

Lab Assignment 0. 1. Creating a Relational Database Schema from ER Diagram, Populating the Database and Querying over the database with SQL

Lab Assignment 0. 1. Creating a Relational Database Schema from ER Diagram, Populating the Database and Querying over the database with SQL SS Chung Lab Assignment 0 1. Creating a Relational Database Schema from ER Diagram, Populating the Database and Querying over the database with SQL 1. Creating the COMPANY database schema using SQL (DDL)

More information

2. Conceptual Modeling using the Entity-Relationship Model

2. Conceptual Modeling using the Entity-Relationship Model ECS-165A WQ 11 15 Contents 2. Conceptual Modeling using the Entity-Relationship Model Basic concepts: entities and entity types, attributes and keys, relationships and relationship types Entity-Relationship

More information

Part A: Data Definition Language (DDL) Schema and Catalog CREAT TABLE. Referential Triggered Actions. CSC 742 Database Management Systems

Part A: Data Definition Language (DDL) Schema and Catalog CREAT TABLE. Referential Triggered Actions. CSC 742 Database Management Systems CSC 74 Database Management Systems Topic #0: SQL Part A: Data Definition Language (DDL) Spring 00 CSC 74: DBMS by Dr. Peng Ning Spring 00 CSC 74: DBMS by Dr. Peng Ning Schema and Catalog Schema A collection

More information

THE ENTITY- RELATIONSHIP (ER) MODEL CHAPTER 7 (6/E) CHAPTER 3 (5/E)

THE ENTITY- RELATIONSHIP (ER) MODEL CHAPTER 7 (6/E) CHAPTER 3 (5/E) THE ENTITY- RELATIONSHIP (ER) MODEL CHAPTER 7 (6/E) CHAPTER 3 (5/E) 2 LECTURE OUTLINE Using High-Level, Conceptual Data Models for Database Design Entity-Relationship (ER) model Popular high-level conceptual

More information

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys Database Design Overview Conceptual Design. The Entity-Relationship (ER) Model CS430/630 Lecture 12 Conceptual design The Entity-Relationship (ER) Model, UML High-level, close to human thinking Semantic

More information

Chapter 8. SQL-99: SchemaDefinition, Constraints, and Queries and Views

Chapter 8. SQL-99: SchemaDefinition, Constraints, and Queries and Views Chapter 8 SQL-99: SchemaDefinition, Constraints, and Queries and Views Data Definition, Constraints, and Schema Changes Used to CREATE, DROP, and ALTER the descriptions of the tables (relations) of a database

More information

Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations

Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations 1 Topics for this week: 1. Good Design 2. Functional Dependencies 3. Normalization Readings for this week: 1. E&N, Ch. 10.1-10.6; 12.2 2. Quickstart, Ch. 3 3. Complete the tutorial at http://sqlcourse2.com/

More information

Introduction to SQL: Data Retrieving

Introduction to SQL: Data Retrieving Introduction to SQL: Data Retrieving Ruslan Fomkin Databasdesign för Ingenjörer 1056F Structured Query Language (SQL) History: SEQUEL (Structured English QUery Language), earlier 70 s, IBM Research SQL

More information

Part 4: Database Language - SQL

Part 4: Database Language - SQL Part 4: Database Language - SQL Junping Sun Database Systems 4-1 Database Languages and Implementation Data Model Data Model = Data Schema + Database Operations + Constraints Database Languages such as

More information

Summary on Chapter 4 Basic SQL

Summary on Chapter 4 Basic SQL Summary on Chapter 4 Basic SQL SQL Features Basic SQL DDL o Includes the CREATE statements o Has a comprehensive set of SQL data types o Can specify key, referential integrity, and other constraints Basic

More information

Unit 2.1. Data Analysis 1 - V2.0 1. Data Analysis 1. Dr Gordon Russell, Copyright @ Napier University

Unit 2.1. Data Analysis 1 - V2.0 1. Data Analysis 1. Dr Gordon Russell, Copyright @ Napier University Data Analysis 1 Unit 2.1 Data Analysis 1 - V2.0 1 Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is a relationship? Entities, attributes,

More information

Data Analysis 1. SET08104 Database Systems. Copyright @ Napier University

Data Analysis 1. SET08104 Database Systems. Copyright @ Napier University Data Analysis 1 SET08104 Database Systems Copyright @ Napier University Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is a relationship?

More information

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model The entity-relationship (E-R) model is a a data model in which information stored

More information

Chapter 2: Entity-Relationship Model. Entity Sets. " Example: specific person, company, event, plant

Chapter 2: Entity-Relationship Model. Entity Sets.  Example: specific person, company, event, plant Chapter 2: Entity-Relationship Model! Entity Sets! Relationship Sets! Design Issues! Mapping Constraints! Keys! E-R Diagram! Extended E-R Features! Design of an E-R Database Schema! Reduction of an E-R

More information

SQL-99: Schema Definition, Basic Constraints, and Queries

SQL-99: Schema Definition, Basic Constraints, and Queries 8 SQL-99: Schema Definition, Basic Constraints, and Queries The SQL language may be considered one of the major reasons for the success of relational databases in the commercial world. Because it became

More information

The Entity-Relationship Model

The Entity-Relationship Model The Entity-Relationship Model 221 After completing this chapter, you should be able to explain the three phases of database design, Why are multiple phases useful? evaluate the significance of the Entity-Relationship

More information

Lesson 8: Introduction to Databases E-R Data Modeling

Lesson 8: Introduction to Databases E-R Data Modeling Lesson 8: Introduction to Databases E-R Data Modeling Contents Introduction to Databases Abstraction, Schemas, and Views Data Models Database Management System (DBMS) Components Entity Relationship Data

More information

not necessarily strictly sequential feedback loops exist, i.e. may need to revisit earlier stages during a later stage

not necessarily strictly sequential feedback loops exist, i.e. may need to revisit earlier stages during a later stage Database Design Process there are six stages in the design of a database: 1. requirement analysis 2. conceptual database design 3. choice of the DBMS 4. data model mapping 5. physical design 6. implementation

More information

Advanced Database Models

Advanced Database Models Advanced Database Models Dr.-Ing. Eike Schallehn OvG Universität Magdeburg Fakultät für Informatik Institut für Technische und Betriebliche Informationssysteme 2015 Organization Lecture slides http://wwwiti.cs.uni-magdeburg.de/iti_db/lehre/adbm

More information

7.1 The Information system

7.1 The Information system Chapter 7. Database Planning, Design and Administration Last few decades have seen proliferation of software applications, many requiring constant maintenance involving: correcting faults, implementing

More information

The Relational Algebra

The Relational Algebra The Relational Algebra Relational set operators: The data in relational tables are of limited value unless the data can be manipulated to generate useful information. Relational Algebra defines the theoretical

More information

Chapter 2: Entity-Relationship Model. E-R R Diagrams

Chapter 2: Entity-Relationship Model. E-R R Diagrams Chapter 2: Entity-Relationship Model What s the use of the E-R model? Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of an E-R Database Schema

More information

Foundations of Information Management

Foundations of Information Management Foundations of Information Management - WS 2012/13 - Juniorprofessor Alexander Markowetz Bonn Aachen International Center for Information Technology (B-IT) Data & Databases Data: Simple information Database:

More information

Database Design Process

Database Design Process Database Design Process Entity-Relationship Model From Chapter 5, Kroenke book Requirements analysis Conceptual design data model Logical design Schema refinement: Normalization Physical tuning Problem:

More information

Lecture 12: Entity Relationship Modelling

Lecture 12: Entity Relationship Modelling Lecture 12: Entity Relationship Modelling The Entity-Relationship Model Entities Relationships Attributes Constraining the instances Cardinalities Identifiers Generalization 2004-5 Steve Easterbrook. This

More information

Database Design Process

Database Design Process Entity-Relationship Model Chapter 3, Part 1 Database Design Process Requirements analysis Conceptual design data model Logical design Schema refinement: Normalization Physical tuning 1 Problem: University

More information

three Entity-Relationship Modeling chapter OVERVIEW CHAPTER

three Entity-Relationship Modeling chapter OVERVIEW CHAPTER three Entity-Relationship Modeling CHAPTER chapter OVERVIEW 3.1 Introduction 3.2 The Entity-Relationship Model 3.3 Entity 3.4 Attributes 3.5 Relationships 3.6 Degree of a Relationship 3.7 Cardinality of

More information

10CS54: DATABASE MANAGEMENT SYSTEM

10CS54: DATABASE MANAGEMENT SYSTEM CS54: DATABASE MANAGEMENT SYSTEM QUESTION BANK Chapter 1: Introduction to Database Systems Objective: Databases and data base system have become an essential component of everyday life in modern society.

More information

Database Management Systems

Database Management Systems Database Management Systems Database Design (1) 1 Topics Information Systems Life Cycle Data Base Design Logical Design Physical Design Entity Relationship (ER) Model Entity Relationship Attributes Cardinality

More information

Functional Dependency and Normalization for Relational Databases

Functional Dependency and Normalization for Relational Databases Functional Dependency and Normalization for Relational Databases Introduction: Relational database design ultimately produces a set of relations. The implicit goals of the design activity are: information

More information

Lab Manual. Database Systems COT-313 & Database Management Systems Lab IT-216

Lab Manual. Database Systems COT-313 & Database Management Systems Lab IT-216 Lab Manual Database Systems COT-313 & Database Management Systems Lab IT-216 Lab Instructions Several practicals / programs? Whether an experiment contains one or several practicals /programs One practical

More information

ER modelling, Weak Entities, Class Hierarchies, Aggregation

ER modelling, Weak Entities, Class Hierarchies, Aggregation CS344 Database Management Systems ER modelling, Weak Entities, Class Hierarchies, Aggregation Aug 2 nd - Lecture Notes (Summary) Submitted by - N. Vishnu Teja Saurabh Saxena 09010125 09010145 (Most the

More information

New York University Computer Science Department Courant Institute of Mathematical Sciences

New York University Computer Science Department Courant Institute of Mathematical Sciences New York University Computer Science Department Courant Institute of Mathematical Sciences Homework #5 Solutions Course Title: Database Systems Instructor: Jean-Claude Franchitti Course Number: CSCI-GA.2433-001

More information

CHAPTER 8: SQL-99: SCHEMA DEFINITION, BASIC CONSTRAINTS, AND QUERIES

CHAPTER 8: SQL-99: SCHEMA DEFINITION, BASIC CONSTRAINTS, AND QUERIES Chapter 8: SQL-99: Schema Definition, Basic Constraints, and Queries 1 CHAPTER 8: SQL-99: SCHEMA DEFINITION, BASIC CONSTRAINTS, AND QUERIES Answers to Selected Exercises 8. 7 Consider the database shown

More information

XV. The Entity-Relationship Model

XV. The Entity-Relationship Model XV. The Entity-Relationship Model The Entity-Relationship Model Entities, Relationships and Attributes Cardinalities, Identifiers and Generalization Documentation of E-R Diagrams and Business Rules The

More information

IV. The (Extended) Entity-Relationship Model

IV. The (Extended) Entity-Relationship Model IV. The (Extended) Entity-Relationship Model The Extended Entity-Relationship (EER) Model Entities, Relationships and Attributes Cardinalities, Identifiers and Generalization Documentation of EER Diagrams

More information

b. Examine the following histories. Draw their serialization graph and identify which of them is serializable given reasons.

b. Examine the following histories. Draw their serialization graph and identify which of them is serializable given reasons. SELECTED SOLUTIONS TO THE EVISION EECISES: 1. In the following questions the operations are as follows rn() transaction n reads data item, wn () transaction n writes data item, cn transactions n commits,

More information

Exercise 1: Relational Model

Exercise 1: Relational Model Exercise 1: Relational Model 1. Consider the relational database of next relational schema with 3 relations. What are the best possible primary keys in each relation? employ(person_name, street, city)

More information

Conceptual Design Using the Entity-Relationship (ER) Model

Conceptual Design Using the Entity-Relationship (ER) Model Conceptual Design Using the Entity-Relationship (ER) Model Module 5, Lectures 1 and 2 Database Management Systems, R. Ramakrishnan 1 Overview of Database Design Conceptual design: (ER Model is used at

More information

Databases Model the Real World. The Entity- Relationship Model. Conceptual Design. Steps in Database Design. ER Model Basics. ER Model Basics (Contd.

Databases Model the Real World. The Entity- Relationship Model. Conceptual Design. Steps in Database Design. ER Model Basics. ER Model Basics (Contd. The Entity- Relationship Model R &G - Chapter 2 A relationship, I think, is like a shark, you know? It has to constantly move forward or it dies. And I think what we got on our hands is a dead shark. Woody

More information

{ PreviousEducation ( CollegeName, StartDate, EndDate, { Degree (DegreeName, Month, Year) }, { Transcript (CourseName, Semester, Year, Grade) } ) }

{ PreviousEducation ( CollegeName, StartDate, EndDate, { Degree (DegreeName, Month, Year) }, { Transcript (CourseName, Semester, Year, Grade) } ) } Tutorial 3 Solution Exercise1: Exercise 2: { PreviousEducation ( CollegeName, StartDate, EndDate, { Degree (DegreeName, Month, Year) }, { Transcript (CourseName, Semester, Year, Grade) } ) } Exercise 3:

More information

DATABASE DESIGN. - Developing database and information systems is performed using a development lifecycle, which consists of a series of steps.

DATABASE DESIGN. - Developing database and information systems is performed using a development lifecycle, which consists of a series of steps. DATABASE DESIGN - The ability to design databases and associated applications is critical to the success of the modern enterprise. - Database design requires understanding both the operational and business

More information

Chapter 2: Entity-Relationship Model

Chapter 2: Entity-Relationship Model Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E R Diagram Extended E-R Features Design of an E-R Database Schema Reduction of an E-R Schema to

More information

A brief overview of developing a conceptual data model as the first step in creating a relational database.

A brief overview of developing a conceptual data model as the first step in creating a relational database. Data Modeling Windows Enterprise Support Database Services provides the following documentation about relational database design, the relational database model, and relational database software. Introduction

More information

Data Modeling. Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4

Data Modeling. Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4 Data Modeling Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4 Data Modeling Schema: The structure of the data Structured Data: Relational, XML-DTD, etc Unstructured Data: CSV, JSON But where does

More information

Database Design Methodology

Database Design Methodology Database Design Methodology Three phases Database Design Methodology Logical database Physical database Constructing a model of the information used in an enterprise on a specific data model but independent

More information

Database Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Chapter 4. Entity: an object that is involved in the enterprise

Database Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Chapter 4. Entity: an object that is involved in the enterprise Database Design Database Design I: The Entity-Relationship Model Chapter 4 Goal: specification of database schema Methodology: Use E-R R model to get a high-level graphical view of essential components

More information

We know how to query a database using SQL. A set of tables and their schemas are given Data are properly loaded

We know how to query a database using SQL. A set of tables and their schemas are given Data are properly loaded E-R Diagram Database Development We know how to query a database using SQL A set of tables and their schemas are given Data are properly loaded But, how can we develop appropriate tables and their schema

More information

Data Modeling: Part 1. Entity Relationship (ER) Model

Data Modeling: Part 1. Entity Relationship (ER) Model Data Modeling: Part 1 Entity Relationship (ER) Model MBA 8473 1 Cognitive Objectives (Module 2) 32. Explain the three-step process of data-driven information system (IS) development 33. Examine the purpose

More information

Figure 14.1 Simplified version of the

Figure 14.1 Simplified version of the Figure. Simplified version of the COMPANY relational database schema. EMPLOYEE f.k. ENAME SSN BDATE ADDRESS DNUMBER DEPARTMENT f.k. DNAME DNUMBER DMGRSSN DEPT_LOCATIONS f.k. DNUMBER DLOCATION PROJECT f.k.

More information

Converting E-R Diagrams to Relational Model. Winter 2006-2007 Lecture 17

Converting E-R Diagrams to Relational Model. Winter 2006-2007 Lecture 17 Converting E-R Diagrams to Relational Model Winter 2006-2007 Lecture 17 E-R Diagrams Need to convert E-R model diagrams to an implementation schema Easy to map E-R diagrams to relational model, and then

More information

SQL Nested & Complex Queries. CS 377: Database Systems

SQL Nested & Complex Queries. CS 377: Database Systems SQL Nested & Complex Queries CS 377: Database Systems Recap: Basic SQL Retrieval Query A SQL query can consist of several clauses, but only SELECT and FROM are mandatory SELECT FROM

More information

Designing a Database Schema

Designing a Database Schema Week 10: Database Design Database Design From an ER Schema to a Relational One Restructuring an ER schema Performance Analysis Analysis of Redundancies, Removing Generalizations Translation into a Relational

More information

Databases and BigData

Databases and BigData Eduardo Cunha de Almeida eduardo.almeida@uni.lu Outline of the course Introduction Database Systems (E. Almeida) Distributed Hash Tables and P2P (C. Cassagnes) NewSQL (D. Kim and J. Meira) NoSQL (D. Kim)

More information

Foundations of Information Management

Foundations of Information Management Foundations of Information Management - WS 2009/10 Juniorprofessor Alexander Markowetz Bonn Aachen International Center for Information Technology (B-IT) Alexander Markowetz Born 1976 in Brussels, Belgium

More information

Entity Relationship Diagram

Entity Relationship Diagram Yufei Tao Department of Computer Science and Engineering Chinese University of Hong Kong A primary goal of database design is to decide what tables to create. Usually, there are two principles: 1 Capture

More information

Entity - Relationship Modelling

Entity - Relationship Modelling Topic 5 Entity - Relationship Modelling LEARNING OUTCOMES When you have completed this Topic you should be able to: 1. Acquire the basic concepts of the Entity-Relationship (ER) model. 2. Discuss how to

More information

More SQL: Assertions, Views, and Programming Techniques

More SQL: Assertions, Views, and Programming Techniques 9 More SQL: Assertions, Views, and Programming Techniques In the previous chapter, we described several aspects of the SQL language, the standard for relational databases. We described the SQL statements

More information

CS 338 Join, Aggregate and Group SQL Queries

CS 338 Join, Aggregate and Group SQL Queries CS 338 Join, Aggregate and Group SQL Queries Bojana Bislimovska Winter 2016 Outline SQL joins Aggregate functions in SQL Grouping in SQL HAVING clause SQL Joins Specifies a table resulting from a join

More information

Outline. Data Modeling. Conceptual Design. ER Model Basics: Entities. ER Model Basics: Relationships. Ternary Relationships. Yanlei Diao UMass Amherst

Outline. Data Modeling. Conceptual Design. ER Model Basics: Entities. ER Model Basics: Relationships. Ternary Relationships. Yanlei Diao UMass Amherst Outline Data Modeling Yanlei Diao UMass Amherst v Conceptual Design: ER Model v Relational Model v Logical Design: from ER to Relational Slides Courtesy of R. Ramakrishnan and J. Gehrke 1 2 Conceptual

More information

Chapter 10 Functional Dependencies and Normalization for Relational Databases

Chapter 10 Functional Dependencies and Normalization for Relational Databases Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright 2004 Pearson Education, Inc. Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of

More information

CSC 742 Database Management Systems

CSC 742 Database Management Systems CSC 742 Database Management Systems Topic #4: Data Modeling Spring 2002 CSC 742: DBMS by Dr. Peng Ning 1 Phases of Database Design Requirement Collection/Analysis Functional Requirements Functional Analysis

More information

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Outline Database concepts Conceptual Design Logical Design Communicating with the RDBMS 2 Some concepts Database: an

More information

DATABASE MANAGEMENT SYSTEMS. Question Bank:

DATABASE MANAGEMENT SYSTEMS. Question Bank: DATABASE MANAGEMENT SYSTEMS Question Bank: UNIT 1 1. Define Database? 2. What is a DBMS? 3. What is the need for database systems? 4. Define tupule? 5. What are the responsibilities of DBA? 6. Define schema?

More information

The Entity-Relationship Model

The Entity-Relationship Model The Entity-Relationship Model Chapter 2 Slides modified by Rasmus Pagh for Database Systems, Fall 2006 IT University of Copenhagen Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Today

More information

Database Design Methodologies

Database Design Methodologies Critical Success Factors in Database Design Database Design Methodologies o Work interactively with the users as much as possible. o Follow a structured methodology throughout the data modeling process.

More information

The Relational Data Model: Structure

The Relational Data Model: Structure The Relational Data Model: Structure 1 Overview By far the most likely data model in which you ll implement a database application today. Of historical interest: the relational model is not the first implementation

More information

Entity/Relationship Modelling. Database Systems Lecture 4 Natasha Alechina

Entity/Relationship Modelling. Database Systems Lecture 4 Natasha Alechina Entity/Relationship Modelling Database Systems Lecture 4 Natasha Alechina In This Lecture Entity/Relationship models Entities and Attributes Relationships Attributes E/R Diagrams For more information Connolly

More information

Databases What the Specification Says

Databases What the Specification Says Databases What the Specification Says Describe flat files and relational databases, explaining the differences between them; Design a simple relational database to the third normal form (3NF), using entityrelationship

More information

The Entity-Relationship Model

The Entity-Relationship Model The Entity-Relationship Model Overview of Database Design Requirements analysis Conceptual design data model Logical design Schema refinement: Normalization Physical tuning Conceptual Design Entities Conceptual

More information

LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24

LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24 LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24 1. A database schema is a. the state of the db b. a description of the db using a

More information

Data Modeling Basics

Data Modeling Basics Information Technology Standard Commonwealth of Pennsylvania Governor's Office of Administration/Office for Information Technology STD Number: STD-INF003B STD Title: Data Modeling Basics Issued by: Deputy

More information

Lecture 6. SQL, Logical DB Design

Lecture 6. SQL, Logical DB Design Lecture 6 SQL, Logical DB Design Relational Query Languages A major strength of the relational model: supports simple, powerful querying of data. Queries can be written intuitively, and the DBMS is responsible

More information

Review: Participation Constraints

Review: Participation Constraints Review: Participation Constraints Does every department have a manager? If so, this is a participation constraint: the participation of Departments in Manages is said to be total (vs. partial). Every did

More information

Chapter 10. Functional Dependencies and Normalization for Relational Databases

Chapter 10. Functional Dependencies and Normalization for Relational Databases Chapter 10 Functional Dependencies and Normalization for Relational Databases Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant

More information

IT2305 Database Systems I (Compulsory)

IT2305 Database Systems I (Compulsory) Database Systems I (Compulsory) INTRODUCTION This is one of the 4 modules designed for Semester 2 of Bachelor of Information Technology Degree program. CREDITS: 04 LEARNING OUTCOMES On completion of this

More information

CMU - SCS 15-415/15-615 Database Applications Spring 2013, C. Faloutsos Homework 1: E.R. + Formal Q.L. Deadline: 1:30pm on Tuesday, 2/5/2013

CMU - SCS 15-415/15-615 Database Applications Spring 2013, C. Faloutsos Homework 1: E.R. + Formal Q.L. Deadline: 1:30pm on Tuesday, 2/5/2013 CMU - SCS 15-415/15-615 Database Applications Spring 2013, C. Faloutsos Homework 1: E.R. + Formal Q.L. Deadline: 1:30pm on Tuesday, 2/5/2013 Reminders - IMPORTANT: Like all homeworks, it has to be done

More information

OVERVIEW 1.1 DATABASE MANAGEMENT SYSTEM (DBMS) DEFINITION:-

OVERVIEW 1.1 DATABASE MANAGEMENT SYSTEM (DBMS) DEFINITION:- 1 1 OVERVIEW Topics Covered: 1.1 Database management system 1.2 Data Independence 1.3 Data Abstraction 1.4 Data Models 1.5 DBMS Architecture 1.6 Users of DBMS 1.7 Overview of Conventional Data Models 1.1

More information

BİL 354 Veritabanı Sistemleri. Entity-Relationship Model

BİL 354 Veritabanı Sistemleri. Entity-Relationship Model BİL 354 Veritabanı Sistemleri Entity-Relationship Model Steps in building a DB application Pick application domain Conceptual design How can I describe that data? What data do I need for my application

More information

The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3

The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3 The Relational Model Chapter 3 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase,

More information

Review Entity-Relationship Diagrams and the Relational Model. Data Models. Review. Why Study the Relational Model? Steps in Database Design

Review Entity-Relationship Diagrams and the Relational Model. Data Models. Review. Why Study the Relational Model? Steps in Database Design Review Entity-Relationship Diagrams and the Relational Model CS 186, Fall 2007, Lecture 2 R & G, Chaps. 2&3 Why use a DBMS? OS provides RAM and disk A relationship, I think, is like a shark, you know?

More information

Relational Normalization: Contents. Relational Database Design: Rationale. Relational Database Design. Motivation

Relational Normalization: Contents. Relational Database Design: Rationale. Relational Database Design. Motivation Relational Normalization: Contents Motivation Functional Dependencies First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form Decomposition Algorithms Multivalued Dependencies and

More information

Fundamentals of Database Systems. Laboratory Manual 1. Rajshekhar Sunderraman. Georgia State University. August 2010

Fundamentals of Database Systems. Laboratory Manual 1. Rajshekhar Sunderraman. Georgia State University. August 2010 Fundamentals of Database Systems Laboratory Manual 1 Rajshekhar Sunderraman Georgia State University August 2010 1 To accompany Elmasri and Navathe, Fundamentals of Database Systems, 6 th Edition, Addison-Wesley,

More information

Fundamentals of Database Design

Fundamentals of Database Design Fundamentals of Database Design Zornitsa Zaharieva CERN Data Management Section - Controls Group Accelerators and Beams Department /AB-CO-DM/ 23-FEB-2005 Contents : Introduction to Databases : Main Database

More information

Theory of Relational Database Design and Normalization

Theory of Relational Database Design and Normalization Theory of Relational Database Design and Normalization (Based on Chapter 14 and some part of Chapter 15 in Fundamentals of Database Systems by Elmasri and Navathe) 1 Informal Design Guidelines for Relational

More information

Theory of Relational Database Design and Normalization

Theory of Relational Database Design and Normalization Theory of Relational Database Design and Normalization (Based on Chapter 14 and some part of Chapter 15 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3) 1 Informal Design Guidelines for

More information

Lecture Notes INFORMATION RESOURCES

Lecture Notes INFORMATION RESOURCES Vilnius Gediminas Technical University Jelena Mamčenko Lecture Notes on INFORMATION RESOURCES Part I Introduction to Dta Modeling and MSAccess Code FMITB02004 Course title Information Resourses Course

More information

Conceptual Design: Entity Relationship Models. Objectives. Overview

Conceptual Design: Entity Relationship Models. Objectives. Overview Conceptual Design: Entity Relationship Models Craig Van Slyke, University of Central Florida cvanslyke@bus.ucf.edu John Day, Ohio University Objectives Define terms related to entity relationship modeling,

More information

Database Design. Adrienne Watt. Port Moody

Database Design. Adrienne Watt. Port Moody Database Design Database Design Adrienne Watt Port Moody Except for third party materials and otherwise stated, content on this site is made available under a Creative Commons Attribution 2.5 Canada License.

More information

Data Modelling and E-R Diagrams

Data Modelling and E-R Diagrams Data Modelling and E-R Diagrams So far we have considered some of the basic ideas behind relational theory, and we will continue with this in subsequent sections. In this section we look at the processes

More information

IT2304: Database Systems 1 (DBS 1)

IT2304: Database Systems 1 (DBS 1) : Database Systems 1 (DBS 1) (Compulsory) 1. OUTLINE OF SYLLABUS Topic Minimum number of hours Introduction to DBMS 07 Relational Data Model 03 Data manipulation using Relational Algebra 06 Data manipulation

More information

Relational Schema Design

Relational Schema Design Relational Schema Design Using ER Methodology to Design Relational Database Schemas The Development Process Collect requirements. Analyze the requirements. Conceptually design the data (e.g., draw an ER

More information