Substances and Relationships

0
0
2657 days ago, 610 views
PowerPoint PPT Presentation

Presentation Transcript

Slide 1

Elements and Relationships Database Principles

Slide 2

Database Principles What is an Entity? Something of intrigue, fit for autonomous presence A "remain solitary" thing or an idea A sort of thing, for example, Automobile and not "my auto". Something with properties. Representative is a substance with property SALARY is not an element on the grounds that on the off chance that I say SALARY you say, "Whose?" as it were, a SALARY just bodes well in the event that we are talking a some EMPLOYEE so it is not "fit for autonomous presence". In sentences, substances show up frequently as things ; tragically, so do properties. Look at Wikipedia and what it says in regards to elements.

Slide 3

Database Principles Exercise: Working in sets think of a rundown of (Entity,Property) sets. Both individuals in the combine need to concur. Try not to discard the sets, you'll require them later.

Slide 4

Database Principles What are Properties: The way that an element has a property regularly speaks to a particular business administer . A business or association is controlled by tenets. It is an outstanding mystery among database creators that the way toward planning a database is that of catching, in an unambiguous way, the guidelines of a business or association. The above is a business lead caught in the Entity-Relationship dialect by speaking to Salary as a property of the element, EMPLOYEE. Each representative wins precisely one compensation

Slide 5

Database Principles Exercise: Go back to your (Entity,Property) matches and express the related business rules. What "business" is every match a part of?

Slide 6

Database Principles Exercise: A database creator is in a novel position to see how a business is run. Talk about. How could a database architect helpfully utilize this power? How could a database creator adversely utilize this power?

Slide 7

Database Principles How would we picture an Entity? EntityName List of properties

Slide 8

Database Principles Was it generally thusly? No Chen's initial documentation, called an "Air pocket Diagram". . . . Property 2 EntityName Property 1

Slide 9

Database Principles Exercise: Discuss the upsides and downsides of every way to deal with drawing an element.

Slide 10

Database Principles Notational Confusion: Chen called EMPLOYEE a substance sort and Andrew Pletch an element . Other individuals said, if there is no perplexity how about we drop the "sort" and call EMPLOYEE a substance and Andrew Pletch an element occurrence (or only a case ). So Chen's unique approach ought to have been known as the We will utilize the terms substance and ( element) case. In some sense, a substance speaks to the arrangement of its examples. Elements are typically recognized in the particular Entity-Type Relationship-Type Approach

Slide 11

Database Principles EMPLOYEE EmployeeID FName LName DOB Salary This is an ENTITY This is a gathering of element cases Just to make it clear: Exercise: Why call it EMPLOYEE and not EMPLOYEES?

Slide 12

Database Principles Exercise: Work in little gatherings. In the accompanying passage distinguish things you believe are elements and things you believe are properties of substances. You can likewise consider things that are certainly (not unequivocally) alluded to in the section. The College at New Paltz is one of the grounds of the State University of New York. It is a human sciences school with projects in expressions, expressive arts, business, science and building. Its personnel and understudies originate from everywhere throughout the express, the United States and the world.

Slide 13

Database Principles What's in a Name? A rose, by whatever other name … It turns out, in database no less than, a name is insufficient . Both these arrangements of occurrences can really be called examples a substance called CAR yet they are NOT cases of a similar thing, would they say they are? Auto What are this present element's examples? { My auto, My child's auto, My better half's auto, Your auto, . . . } { VW Passat, Honda Accord, Toyota Corolla, Ford Escort, . . . }

Slide 14

Database Principles Exercise: How can the accompanying been viewed as various sorts of Entities? BOOK, PRODUCT, COURSE Give me a case of something else. Keep these cases around for two or three slides

Slide 15

Database Principles CAR underscore scratch traits { My auto, My child's auto, My better half's auto, Your auto, . . . } { VW Passat, Honda Accord, Toyota Corolla, Ford Escort, . . . } Attributes: Some properties of elements are called characteristics . Among the characteristics of a substance there are some that distinguish the element. These are called key properties . No two unique cases of a substance have similar qualities for their key traits. Make Model VIN

Slide 16

Database Principles The Key to Power; the Power of the Key Keys are additionally called remarkable identifiers . What is an identifier ? What is an exceptional identifier ? In the Earthsea Trilogy by Ursula Le Guin, a tale about a mage called Ged, individuals or things would be "under your control" on the off chance that you knew their actual name . In database you "control/know" a substance on the off chance that you know its key properties. On the off chance that you don't, you don't!! This is the main clue that in Entity-Relationship we are going to demand that we realize what we are discussing. Things being what they are as a dialect, Entity-Relationship is all around characterized . What does very much characterized mean?

Slide 17

Database Principles Exercise: Returning to our past illustration: What diverse keys are feasible for BOOK, PRODUCT and COURSE?

Slide 18

Database Principles Keys versus Entities There is a balanced correspondence between the unmistakable estimations of a key quality and the cases of the relating substance. Keys are surrogates for Entities – we can store key qualities where we can't store element occasions. Work out: Identify the keys for the accompanying substances BOOK CAR MEDICAL PROCEDURE PROFESSOR PROCESS APARTMENT COURSE {ISBN},{Author,Title} {VIN},{Make,Model} {Name},{Procedure Number} {Name}, {SSN} {ProcessID} {BuildingName,ApartmentNum} {Name},{Crs#},{Crs#.Sec#,Sem}

Slide 19

Database Principles Context: Notice that things exist in a "specific situation" and that unless the setting is clear, task of keys is difficult. For instance, the setting for recognizing the way to Apartment to be the (BuildingName, ApartmentNum) match is that we are just discussing condo in a solitary city and not the country over. On the off chance that you expand the unique circumstance, then something should be added to the key that recognizes occasions in various settings. Broadly, the new key to Apartment may be (City, BuildingName, ApartmentNum).

Slide 20

Database Principles A Final Word on Keys: Things with a similar key are a similar thing ! Work out: Find cases of things with a similar key however that at first glance have all the earmarks of being distinctive things. Clarify why they are truly a similar thing.

Slide 21

Database Principles A last word on traits: Although it is not an immovable lead, in this course we will demand that properties be single-esteemed . At the end of the day, not records and not records. Worker EmployeeID FName LName Address{ Street City, State, Zip} List_of_Jobs key characteristic great cases of properties terrible cases of traits NOTE: Any quality name that is communicated in the plural is most likely a rundown so seriously composed.

Slide 22

Database Principles CAMPUS PROGRAM FACULTY STUDENT Name Location CampusType Num_Faculty Num_Students Name Telephone Num_Depts Num_Faculty Num_Students SSN FName LName Office_Num Telephone StudentID FName LName Address Telephone Exercise: Let's return to the practice we took a shot at a while back. Assume these are our elements: Add some appropriate characteristics and underscore the key qualities. The College at New Paltz is one of the grounds of the State University of New York. It is an aesthetic sciences school with projects in expressions, expressive arts, business, science and designing. Its personnel and understudies originate from everywhere throughout the express, the United States and the world.

SPONSORS