| Author: Vidhya 26 Jul 2008 | Member Level: Gold | Rating: Points: 1 |
Entity-Relationship Diagrams (ERD)
Data models are tools used in analysis to describe the data requirements and assumptions in the system from a top-down perspective. They also set the stage for the design of databases later on in the SDLC.
There are three basic elements in ER models: .Entities are the "things" about which we seek information.
.Attributes are the data we collect about the entities.
.Relationships provide the structure needed to draw information from multiple entities.
|
| Author: Vidhya 26 Jul 2008 | Member Level: Gold | Rating: Points: 1 |
hi,
refer:
http://www.smartdraw.com/tutorials/software/erd/tutorial_01.htm
happy programming.............
|
| Author: Vidhya 26 Jul 2008 | Member Level: Gold | Rating: Points: 1 |
hi,
Definition: An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database. ER diagrams often use symbols to represent three different types of information. Boxes are commonly used to represent entities. Diamonds are normally used to represent relationships and ovals are used to represent attributes. Also Known As: ER Diagram, E-R Diagram, entity-relationship model
happy programming.............
|
| Author: Deepa 28 Jul 2008 | Member Level: Diamond | Rating: Points: 6 |
Definition: An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database. ER diagrams often use symbols to represent three different types of information. Boxes are commonly used to represent entities. Diamonds are normally used to represent relationships and ovals are used to represent attributes. Also Known As: ER Diagram, E-R Diagram, entity-relationship model Examples: Consider the example of a database that contains information on the residents of a city. The ER digram shown in the image above contains two entities -- people and cities. There is a single "Lives In" relationship. In our example, due to space constraints, there is only one attribute associated with each entity. People have names and cities have populations. In a real-world example, each one of these would likely have many different attributes.
|
| Author: Ratheesh 29 Jul 2008 | Member Level: Gold | Rating: Points: 1 |
Entity Relationship (ER) Diagram Generator helps users achieve a better understanding of their database schema by displaying the structure in a graphical format.
To view an ER Diagram:
Launch the ER Diagram Generator dialog by: Selecting Tools -> ER Diagram Generator from the Menu Bar OR Selecting Tools -> ER Diagram Generator from the right-click pop-up menu on a database object in the Schema Browser Select a Database and Schema (or All Schemas) In the left panel, select one or more types of objects to be scripted (Tables, Views or Both). Click the green check button to select all and the red X button to deselect all. All objects matching the selected schema & object types will appear in the right panel. Select one or more objects to be scripted. Click the green check button to select all and the red X button to deselect all. Click Next to generate the diagram Once the diagram is generated, the ER Diagram Viewer will open and display the new diagram. To change the layout of the diagram, select an entry from the Layout dropdown list. Supported layouts include:
Box Circle Hierarchical Tree Radial Tree Moen Fruchterman-Reingold (FR) Annealing Inverted Self Organising Map (ISOM) The Entity View drop-down list determines the amount of detail displayed for each entity in the diagram. Select Full to view all attributes or Header to view only the entity name. To save an image of the current diagram, click Save Image As. To print a hard-copy of the current diagram, click Print. Click on an entity to display more column & constraint detail in the lower left panel. ER Diagram Generator Enhancements: General ER Diagram: Indexed columns are now identified with an icon in the diagram. ER Diagram Generator Dialog - Added "Reverse Selection" to object selection, to reverse the current selection
|
| Author: chandramohan 01 Aug 2008 | Member Level: Gold | Rating: Points: 1 |
Developing an ERD
Developing an ERD requires an understanding of the system and its components. Before discussing the procedure, let's look at a narrative created by Professor Harman.
Consider a hospital: Patients are treated in a single ward by the doctors assigned to them. Usually each patient will be assigned a single doctor, but in rare cases they will have two.
Heathcare assistants also attend to the patients, a number of these are associated with each ward.
Initially the system will be concerned solely with drug treatment. Each patient is required to take a variety of drugs a certain number of times per day and for varying lengths of time.
The system must record details concerning patient treatment and staff payment. Some staff are paid part time and doctors and care assistants work varying amounts of overtime at varying rates (subject to grade).
The system will also need to track what treatments are required for which patients and when and it should be capable of calculating the cost of treatment per week for each patient (though it is currently unclear to what use this information will be put).
How do we start an ERD?
1. Define Entities: these are usually nouns used in descriptions of the system, in the discussion of business rules, or in documentation; identified in the narrative (see highlighted items above).
2. Define Relationships: these are usually verbs used in descriptions of the system or in discussion of the business rules (entity ______ entity); identified in the narrative (see highlighted items above).
3. Add attributes to the relations; these are determined by the queries,and may also suggest new entities, e.g. grade; or they may suggest the need for keys or identifiers.
What questions can we ask? a. Which doctors work in which wards? b. How much will be spent in a ward in a given week? c. How much will a patient cost to treat? d. How much does a doctor cost per week? e. Which assistants can a patient expect to see? f. Which drugs are being used?
4. Add cardinality to the relations
Many-to-Many must be resolved to two one-to-manys with an additional entity Usually automatically happens Sometimes involves introduction of a link entity (which will be all foreign key) Examples: Patient-Drug
5. This flexibility allows us to consider a variety of questions such as: a. Which beds are free? b. Which assistants work for Dr. X? c. What is the least expensive prescription? d. How many doctors are there in the hospital? e. Which patients are family related? 6. Represent that information with symbols. Generally E-R Diagrams require the use of the following symbols:
Reading an ERD
It takes some practice reading an ERD, but they can be used with clients to discuss business rules.
These allow us to represent the information from above such as the E-R Diagram below:
ERD brings out issues: Many-to-Manys Ambiguities Entities and their relationships What data needs to be stored The Degree of a relationship Now, think about a university in terms of an ERD. What entities, relationships and attributes might you consider? Look at this simplified view. There is also an example of a simplified view of an airline on that page
|
| Author: chandramohan 01 Aug 2008 | Member Level: Gold | Rating: Points: 1 |
The Entity-Relationship (ER) model was originally proposed by Peter in 1976 [Chen76] as a way to unify the network and relational database views. Simply stated the ER model is a conceptual data model that views the real world as entities and relationships. A basic component of the model is the Entity-Relationship diagram which is used to visually represents data objects. Since Chen wrote his paper the model has been extended and today it is commonly used for database design For the database designer, the utility of the ER model is: it maps well to the relational model. The constructs used in the ER model can easily be transformed into relational tables. it is simple and easy to understand with a minimum of training. Therefore, the model can be used by the database designer to communicate the design to the end user. In addition, the model can be used as a design plan by the database developer to implement a data model in a specific database management software.
|