Attributes and Domains

Slides:



Advertisements
Similar presentations
Chapter # 4 BIS Database Systems
Advertisements

Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Entity Relationship (ER) Modeling
Entity Relationship Diagrams
Chapter 5 Normalization of Database Tables
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
Weighting Unit and Taxes.  the unit of measure for weight  is applied globally throughout the store  The default weighting unit in Zen Cart is the.
Database Design Principles of database design. Relational Models Relational databases are designed to provide efficient structures for transaction processing.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Chapter 5 Entity Relationship (ER) Modelling
IMS 6217: Primary Key Reference 1 Dr. Lawrence West, MIS Dept., University of Central Florida Primary Keys Uniqueness of Table Rows Identifier.
Database Systems: Design, Implementation, and Management Tenth Edition
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
IMS 4212: Introduction to Data Modeling 1 Dr. Lawrence West, Management Dept., University of Central Florida Introduction to Data Modeling—Topics.
IMS 4212: Data Modeling—Attributes 1 Dr. Lawrence West, Management Dept., University of Central Florida Attributes and Domains Nonkey.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
Initial Design of Entity Types for the COMPANY Database Schema Based on the requirements, we can identify four initial entity types in the COMPANY database:
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
Database Design. The process of developing database structures from user requirements for data a structured methodology Structured Methodology - a number.
Database Design – Lecture 6 Moving to a Logical Model.
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
DES715 – Database Design Conceptual design. Database Life Cycle Database initial study Database design Implementation Testing Operation Maintenance.
Database Design – Lecture 7
IMS 4212: Database Implementation 1 Dr. Lawrence West, Management Dept., University of Central Florida Physical Database Implementation—Topics.
IMS 6217: Database Design & Entities 1 Dr. Lawrence West, MIS Dept., University of Central Florida Database Design--Topics DB Design.
IMS 4212: Normalization 1 Dr. Lawrence West, Management Dept., University of Central Florida Normalization—Topics Functional Dependency.
IMS 6217: Introduction to Data Modeling 1 Dr. Lawrence West, MIS Department, University of Central Florida Introduction to Data Modeling—Topics.
Data Base Design Steps 1.Define Entity Classes (Relations/Tables) and Keys. 2.Define Relationships between Entity Classes. Normalization Steps Eliminate.
Contents Design Process Modeling Constraints E-R Diagram Design Issues
Database Design Chapters 17 and 18.
Order Database – ER Diagram
Database Design.
Entity Relationship (E-R) Modeling
Data normalization. Integrity and Robustness.
Entity Relationship (E-R) Modeling
Entity-Relationship Model
MIS 322 – Enterprise Business Process Analysis
Tables and Their Characteristics
Database Design – Lecture 4
Primary Keys Uniqueness of Table Rows
Primary Keys—Topics Uniqueness of Table Rows
Entity-Relationship Model and Diagrams (continued)
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Database Fundamentals
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Some Normalization Examples
Relational Database Model
Database Modeling using Entity Relationship Model (E-R Model)
Chapter 8 – Part2 Database Design.
Chapter 8 – Part2 Database Design.
DCT 2053 DATABASE CONCEPT Chapter 2.2 CONTINUE
Relationships—Topics
MIS2502: Data Analytics Relational Data Modeling
Chapter 4 Entity Relationship (ER) Modeling
Relationship Problems—Topics
Attributes and Domains
INSTRUCTOR: MRS T.G. ZHOU
Database Normalization.
Entity Relationship (ER) Modeling
Chapter # 4 Entity Relationship (ER) Modeling.
Appendix A Data Modeling MANAGEMENT INFORMATION SYSTEMS 8/E
Relationships—Topics
Some Normalization Examples
Presentation transcript:

Attributes and Domains Nonkey Attributes Attribute Definition Identifying Attributes Attribute Considerations Derived Attributes Multi-valued Attributes Time-Dependent Attribute Values Space-Dependent Attribute Values Attribute Data Types Attribute Domain Business Rules

Non-key Attributes (cont.) Four major issues with non-key attributes Identifying descriptive attributes Placing attributes in the correct entity Rules of normalization Appropriate functional dependency Fixing problem attributes Identifying the appropriate data type for the attribute (field) Specifying appropriate domain business rules for the attribute (field) Later Later Later Later

Each student name one attribute for the ___________________ entity Attributes Exercise #1 Each student name one attribute for the ___________________ entity Name five ‘aspects’ or ‘characteristics’ that are observably true about occurrences of this entity but that the organization would not wish to record in the DB (or that would be illegal to record)

Identify all attributes for five entities in our data model Attributes Exercise #2 Identify all attributes for five entities in our data model Are any of them— Multi-valued Time-dependent Space-dependent Time and space-dependent Derivable

Describing Attributes Attributes must be described just like entities What do these mean for a Product entity? Price − Weight Supplier − ProductID “Street address excluding apartment number or P.O. Box where employee receives mail” “Shipping weight of one unit of product including packaging in decimal fractions of a pound” “Current retail price that will be charged to a customer purchasing this product” Use Attribute description in SQL table definitions

Describing Attributes Exercises Are there any attributes whose names are ambiguous? Write attribute descriptions for several attributes Choose some ‘obvious ones’ like address

Entities and Attributes There can be ambiguity—depending on perspective—in determining what should be an entity and what should be an attribute UCF may have an attribute of STUDENT that contains the high school each student graduated from The State of Florida Dept. of Education may consider high schools to be an entity with its own attributes Refinement of the database may require that some attributes be turned into new entities—watch for this as we continue in the course

Derived Attributes Meets our definition of an attribute (information we wish to record about an entity) Value can be derived or calculated from other data in the DB Same entity Multiple entities Student.GPA Employee.YearsOfService Employee.Age

Derived Attribute Exercise For each derived attribute discovered in the list: Identify how each record’s attribute value could be calculated Identify the pros and cons of explicitly storing a value for this derivable attribute Recommend whether or not the value should be explicitly stored

Multivalued Attributes (cont.) Remove multivalued attributes by creating a new entity PK of new entity is often the PK of the original entity plus the formerly multivalued attribute

Multivalued Attribute Exercise Select some multivalued attributes found in the entities and fix them How is the MV attribute problem similar to the M:M Relationship problem?

Time Dependent Data Sometimes the values of attributes are dependent on time Graduation requirements are dependent on catalog year Product prices will vary over time Organization may require access to historical values, not just current values A new record must be created for each time dependent value

Time Dependent Data (cont.) Create a new entity Consider original PK and StartTime or StartDate as composite PK Add attribute of interest as nonkey attribute Consider EndDate/EndTime as nonkey attribute that can be nullable Consider retaining current value of attribute in the original entity for performance purposes

Time-Dependent Attribute Exercise Fix attributes whose values vary with time when maintaining historical values is important Can you write the SQL to determine the price of a rental video on a specified date?

Time Dependent Data (cont.) Similar problems may exist for spatially dependent data Anybody remember “Prices slightly higher west of the Mississippi”? Start times for television programs Prices Sales tax rates What do we do if attribute values vary by space and time?

Location-Dependent Attribute Exercise Fix attributes whose values vary with location Fix attributes whose values vary with both location and time

Attribute Data Type Exercise Specify the data type for each attribute for some selected entities Support your decision Q: How does attribute data type selection affect our design goals?

Attribute Domain Business Rules Exercise Identify some attributes for which values legal under the attribute’s data type would not make business sense Specify business rules about these attribute values