In: Computer Science
Using Crow´s Foot Notation draw this Real Estate Company
ER Diagram
Carrying out the information collection of a real estate company
that operates in the city and that requires a database design for
its operations, we collect the following needs to proceed to a data
modeling:
The company is dedicated only to the sale of real estate, and on these properties that they call "properties" they possess data such as the property number that identifies them, the type of property, the date it was launched, the date it was sold , Property name, property owner, property description, address of property, number of rooms, price requested by the seller, price offered per buyer, agreed sale price, and other details of the property.
This company has a list of the possible characteristics of the properties; Listing that has coded. These codes are used to describe the characteristics of each property. Some possible features are: swimming pool, central air conditioning, etc. The properties can be of different types: apartments, farms, houses, or shops.
For apartments, in particular, you want to know in addition to the characteristics of the listing, amount of parking, name of the building in which it is, and also comments about the apartment.
For farms, in particular, it is desired to have information on size in hectares, a comment field related to "neighbors", and another more general comment field.
For the houses, in particular, you only want to have a very general comment field about this type of property.
For shops, in particular, you want to have information on which square you are in, as well as you want to save a comment field on them.
ER Diagrams Usage
While able to describe just about any system, ER diagrams are most often associated with complex databases that are used in software engineering and IT networks. In particular, ER diagrams are frequently used during the design stage of a development process in order to identify different system elements and their relationships with each other. For example, an inventory software used in a retail shop will have a database that monitors elements such as purchases, item, item type, item source and item price. Rendering this information through an ER diagram would be something like this:
ER diagram example with entity having attributes
In the diagram, the information inside the oval shapes are attributes of a particular entity.
History of ER Diagrams
ER diagrams are visual tools that are used in the
Entity-Relationship model initially proposed by Peter Chen in 1976
to create a uniform convention that considers both relational
database and network views. Chen envisioned the ER model as a
conceptual modeling approach that views real world data as systems
of entities and relationships. Entities are data objects that
maintain different relationships with each other. Additionally,
entities are also described further using attributes.
Since 1976, the ER model has been expanded and is sometimes used in
business management, product development, and strategy
formulations. However, database design remains its primary
application.
ER Diagram Symbols and Notations
Elements in ER diagrams
There are three basic elements in an ER Diagram: entity, attribute, relationship. There are more elements which are based on the main elements. They are weak entity, multivalued attribute, derived attribute, weak relationship and recursive relationship. Cardinality and ordinality are two other notations used in ER diagrams to further define relationships.
Entity
An entity can be a person, place, event, or object that is relevant to a given system. For example, a school system may include students, teachers, major courses, subjects, fees, and other items. Entities are represented in ER diagrams by a rectangle and named using singular nouns.
Weak Entity
A weak entity is an entity that depends on the existence of another entity. In more technical terms it can defined as an entity that cannot be identified by its own attributes. It uses a foreign key combined with its attributed to form the primary key. An entity like order item is a good example for this. The order item will be meaningless without an order so it depends on the existence of order.
Weak Entity Example in ER diagrams
Attribute
An attribute is a property, trait, or characteristic of an entity, relationship, or another attribute. For example, the attribute Inventory Item Name is an attribute of the entity Inventory Item. An entity can have as many attributes as necessary. Meanwhile, attributes can also have their own specific attributes. For example, the attribute “customer address” can have the attributes number, street, city, and state. These are called composite attributes. Note that some top level ER diagrams do not show attributes for the sake of simplicity. In those that do, however, attributes are represented by oval shapes.