1 / 0

Objectives for Week (1/29 & 1/31)

Objectives for Week (1/29 & 1/31). Know how to read, understand, and create a database model using a modeling tool - ERD’s. Know the process of completing a database design. Understand the structure and limitations of the relational model.

gerd
Download Presentation

Objectives for Week (1/29 & 1/31)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Objectives for Week (1/29 & 1/31) Know how to read, understand, and create a database model using a modeling tool - ERD’s. Know the process of completing a database design. Understand the structure and limitations of the relational model. Know how to identify and differentiate the required components of a database design.
  2. Visualization Method: Data Model (Blueprint) This ERD is referred to as a “logical” ERD
  3. Vocabulary about entities Entity: Person, place or thing about which we want to store data. Should be a noun. Entity instance: One row in an entity. In a customer entity, one customer such as “Joe’s Diner” is an entity instance. Strong entity: An entity that contains data we want to store regardless of its relationship to other data. Examples? Weak entity: An entity that doesn’t exist unless it is related to other entities. Examples?
  4. Vocabulary about keys One of the rules about a relational database is that each entity must have a primary key. Primary key: One or more attributes that has/have a unique value in each entity instance. Concatenated primary key: More than one attribute required for the primary key. Natural primary key: Can be created from existing attributes. Surrogate primary key: Is created by the database designer.
  5. Vocabulary about relationships Relationship: A business rule connection between entities. A relationship is a verb. Bi-Directional: All data relationships can be read both ways. Cardinality: describes the minimum and maximum number of instances that one entity has with another entity in a relationship. Foreign Key: Each relationship requires a foreign key. The primary key of one table is added to another table to link the two tables together. A concatenated primary key yields a concatenated foreign key.
  6. 1a. What is the purpose of the DoesBusinessIn entity? What data might be stored in that entity? 1b. What would be an appropriate primary key for the DoesBusinessIn entity? 1c. Is the DoesBusinessIn entity strong or weak? Why? 1d. Identify a composite attribute on the data model. What are the meaningful parts of that attribute?
  7. 1e. Where is a unary relationship on the data model? Explain the meaning of the relationship. Describe how the cardinalities of the relationship might differ for different organizations.
  8. 1f. Explain in words the relationship between the entities Vendor, Supplies, and RawMaterial. In what way might Pine Valley change the way it does business that would cause the Supplies entity to be eliminated?
  9. ERD 2a A corporation owns a series of shopping malls. Each shopping mall has similar stores (examples are: Footlocker, Walking Company, Jones New York, Abercrombie and Fitch) but each store is physically different at each mall. Each shopping mall is identified by a MallID. For each shopping mall, we want to keep track of the name of the mall, the address, zip code, and main telephone number. Each store is identified by a StoreID. For each store, we want to keep track of the name of the store and a long description of the type of the store. The corporation needs to associate a given store with a given shopping mall. For a given store at a given shopping mall, the corporation wants to keep track of the date the store opened at the mall, the name of the manager for the store, and the telephone number for that specific store in that specific mall.
  10. ERD 2b A student, identified by a studentID, can participate in zero or many campus-based organizations. Each organization is identified by an organizationID and we store the original date the organization was started on campus, as well as the name of the organization in the data. Each organization may have multiple students participating in that organization. For each student we store his or her name, address, and telephone number. For each student who participates in an organization, we want to store the date that the student started participating in that organization, and an attribute that indicates whether or not the student is willing to be an officer for the organization. There is only one start date per student per organization (in other words, we don’t care whether a student quits an organization and rejoins – we are going to store only one start date per student per organization).
  11. ERD 2c You have been asked to design a database for a single hospital. The hospital wants to keep track of data about patients. The hospital wants to keep track of patient admittance, as well as patient treatment by health care professionals. Patients are admitted to the hospital by physicians, but physicians are only one kind of health care professional (HCPROF) at the hospital. Assume that the hospital has a large number of HCPROF’s, but they don’t need to differentiate between physicians and other types of HCPROF’s. Attributes of HCPROF include HCPROFID (identifier), type, and specialty. The hospital wants to keep track of the date a patient was admitted and also the admitting HCPROF. It is possible that a patient may be admitted to the hospital more than once. This is an example of “time stamping” data so that the data can be maintained over time. The hospital wants to keep the patients on file with the assumption that the patient may be admitted more than once and the hospital needs to know each different date that a patient was admitted. Attributes of PATIENT include patient_id (identifier) and patient_name. Any individual patient who is admitted must have exactly one admitting HCPROF, but an HCPROF may admit no patients or many patients. Once admitted, a given patient may be treated by no HCPROF’s, but could be treated by multiple HCPROFs. The particular HCPROF who admits a given patient may or may not treat that same patient. A particular HCPROF may treat any number of patients, or may not treat any patients. Whenever a patient is treated, the hospital records the details of the treatment (TREATMENTDETAIL). Attributes of TREATMENTDETAIL include date, time, and outcome. It is possible that more than one HCPROF participates in the same TREATMENTDETAIL for a patient. The hospital wants to keep track of all HCPROF’s who participate in a treatment. For each HCPROF who participates in a TREATMENTDETAIL, the hospital wants to record the notes from the HCPROF and the amount of time that the HCPROF spent on the treatment. For example, if three HCPROF’s participate in a single TREATMENTDETAIL for a single patient, the hospital wants to keep track of the notes and time spent for each of the three HCPROF’s.
More Related