Download presentation
Presentation is loading. Please wait.
1
Review Questions What is data modeling? What is the actual data model that is created called? Data modeling is a technique for organizing and documenting a system’s data. There are several notations for data modeling. The actual model is frequently called an entity relationship diagram (ERD) because it depicts data in terms of the entities and relationships described by the data
2
Review Questions What is an entity, an attributes and a relationship? Give some examples An entity is something about which we want to store data. Examples: Student, University, Book, house etc An attribute is a descriptive property or characteristic of an entity. Examples: Student name, student address, student GPA. A relationship is a natural business association that exists between one or more entities. Relationships are important to identify and describe because they are the logical link between business functions. They can be interpreted in both directions between multiple entities. Example: Surgeon Operation
3
Review Questions Why do primary key/identifier need to contain unique values? One of the aspects of the definition of an entity is the fact that there are multiple occurrences of the entity. If there are not multiple instances of something that is a potential entity, that something is not an entity in the system. Consequently, there must be a way of identifying each individual occurrence of an entity so that it can be picked out from amongst all the other instances of the entity. That is the purpose of having identifiers or primary keys with unique values
4
Review Questions What is cardinality? The term, cardinality, refers to the maximum number of times an instance in one entity can be related to instances of the other entity. If the cardinality is one, then we can infer that one instance of the entity can be related to just one instance of the other entity. If the cardinality is more than one, then we know that one instance of the entity can be related to more than one instance of the other entity. The determination of cardinality is based upon whatever is appropriate for the business situation being described
5
Review Questions Draw the following relationships: A patient must be assigned to only one doctor and a doctor can have one or many patients Patient Doctor assigned
6
Review Questions Draw the following relationships: An employee has one phone extension and a unique phone extension is assigned to an employee Employee Phone extension assigned
7
Review Questions Draw the following relationships: A movie theater shows many different movies and the same movie can be shown at different movie theaters around town Theater Movie Shows
8
Review Questions What is an associative entity? What role does it play in ternary relationships? What role does it play in resolving nonspecific relationships? Associate entity is an entity that inherits its primary key from more than one other entity The associate entity plays the connecting role in the ternary relationships It resolves nonspecific relationships by becoming the connecting factor that resolves the many-to-many relationship by using the foreign keys from other entities
9
Review Questions What is the primary key of shipped product Shipment Shipment Number (Primary Key) Product Product Number (Primary Key) Shipped Product Shipment Number + Product Number
10
Review Questions What is a week entity? The child entity of any identifying relationship is frequently referred to as a “weak” entity because its identification is dependent on the existence of the parent entity’s existence
11
Review Questions Differentiate between supertype and subtype entities An entity supertype is an entity whose instances store attributes that are common to one or more entity subtypes An entity subtype is an entity whose instances inherit some common attributes from an entity supertype and then add other attributes that are unique to an instance of the subtype
12
Interpreting the diagram University Student The model specifies a University entity (hence we want to keep data about Universities) The model specifies a student entity (hence we want to keep data about students ) A University can enroll one or more students. Each Student may be enrolled in zero or one University Enroll
13
Interpreting the diagram Course Student The model specifies a Course entity (hence we want to keep data about Courses) The model specifies a student entity (hence we want to keep data about students ) In each course zero, one or more students can be enrolled. Each Student may be enrolled in zero, one or many courses. Enroll
14
Interpreting the diagram Mother Children The model specifies a Mother entity The model specifies children entity A mother can have zero, one or more children Each child must have one mother has
15
Interpreting the diagram Husband Wife The model specifies a Husband entity The model specifies a wife entity A husband must have one wife A wife must have one husband. has
16
Review Questions Given the following attributes and entities, indicate which attributes could be identifiers for each of the entities. Map all the attributes to their appropriate entity. Remember, each attribute should describe one and only one entity. Entities: Seller, Buyer, Listing, House, Property Attributes: Seller name, House style, Square foot size, Listing price, Garage size, Number of bathrooms, Property size, Buyer name, Basement size, Buyer phone number, Property description, Seller Address, Listing Number, House Address, Seller: Buyer Listing House Property Seller Name, Seller Address Buyer Name, Buyer Phone Number Listing Number, Listing Price House Address, House Style, Square Foot Size, Number of Bathrooms, Garage Size, Basement Size Property Description, Property Size
17
Assignment 1 1. Construct a Context Diagram for Peak E-Book Publishing’s proposed sales and book tracking system, based on the narrative in Exhibit 1 above to illustrate the system’s interfaces with its environment and to describe project scope. (Marks 30%) Marks for tidiness and legibility of diagram, including spelling and grammar Main Process/System ] Entities/external agent Data flows
18
Assignment 1 2. Draw appropriate Level 0 Data Flow Diagram, based on the Context Diagram constructed in step 1 and the information provided. (Note: you may need to split the diagram onto 2 pages for clarity) (Marks 55%) Marks for correct use of DFD rules Marks for tidiness and legibility of diagram Marks for identification of suitable processes Marks for identification of suitable data stores Marks for the data flows and their description
19
Assignment 1 3. Draw a relationship between these entities: Author, Book, Salesperson. Describe, as a series of declarative sentences, the relationships you have drawn (Marks 15%) Marks for correct ER Diagram with tidiness Marks for correct description of relationships with good grammar and explanation The model specifies a University entity (hence we want to keep data about Universities) The model specifies a student entity (hence we want to keep data about students ) A University can enroll one or more students. Each Student may be enrolled in zero or one University University Student Enroll
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.