Question

In: Computer Science

5. Draw an entity-relationship diagram, including minimum and maximum cardinality, for the following: The system stores...

5. Draw an entity-relationship diagram, including minimum and maximum cardinality, for the following: The system stores information about two things: cars and owners. A car has attributes for make, model, and year. The owner has attributes for name and address. Assume that a car must be owned by one owner and an owner can own many cars, but an owner might not own any cars (perhaps she just sold them all, but you still want a record of her in the system).

6. Draw a class diagram for the cars and owners described in problem 5, but include subclasses for sports car, sedan, and minivan, with appropriate attributes.

7. Consider a system that needs to store information about computers in a computer lab at a university, such as the features and location of each computer. What are the domain classes that might be included in a model? What are some of the associations among these classes? What are some of the attributes of each class? Draw a domain model class diagram for this system.

8. Consider the classes involved when modeling a car and all its parts. Draw a domain model class diagram that shows the whole-part relationships involved, including multiplicity. Which type of whole-part relationships is involved?

Solutions

Expert Solution

(5)

(6)

(7)

Domain model class diagram:

Domain model class diagram is that the class exhibits in the problem domain about the objects.

• The associations and attributes are contained in the domain class.

Notation of domain model class diagram:

The domain model class diagram notations are used based on the following rules:

• Classes may represent the physical object, event, or concept and the first letter of the class must start in capital letter.

• A property of a class is called the attribute.

• The link between the classes is denoted by relationship.

• Multiplicity constraint represents the relationship between classes through following relationships such as,

• 0…1 (Zero or one)

• 0…* (Zero or more (optional))

• 1 (One and only one (mandatory))

• * (Zero or more alternate(optional))

• 1…1(One and only one alternate (mandatory))

• 1…*(One or more (mandatory))

step: 2

Considering the system needs to store the information about the computer in the computer lab at a university with specific attributes such as location, feature of the computer.

Domain classes in the model:

The following three domain classes are required in this model to store the information.

• Block class

• Laboratory class

• Computer class

step: 3

Associations among the classes:

There are two relationships created between these three classes. They are as follows:

Relationship between class Block and class Laboratory :

• From the Block to Laboratory the association is one-to-many relationship because the multiplicity is shown as one-to-many relationship in one direction.

• From Laboratory to Block the association is shown as many-to-one relationship beacuse the multiplicity is shown as many-to-one relationship in another direction.

Relationship between class Laboratory and Computer :

• From the Laboratory to Computer the association is one-to-many relationship because the multiplicity is shown as one-to-many relationship in one direction.

• From Computer to Laboratory the association is shown as many-to-one relationship because the multiplicity is shown as many-to-one relationship in another direction.

step: 4

Attributes of classes:

The following are the attributes for each classes. They are as follows:

• The Block class contains the attributes blockNumber and blockName.

• The Laboratory class contains the attributes labaoratoryLocation, numberOfHours, and laboratoryNumbers.

• The Computer class contains the attributes such as computerNumber, seatNumber, model, speedOfComputer, and typeOfMonitor.

step: 5

Domain model class diagram to store the information about the computer in university:

(8)

Domain model class diagram:

Domain model class diagram is that the class exhibits in the problem domain about the objects.

• The associations and attributes are contained in the domain class.

Whole-part:

Whole-part relationship is the association between the classes in which one class act as a component or part for another class.

• For example, “Car” is made up of parts such as body, wheels, breaking mechanism, and steering mechanism.

Notation used for whole-part relationship:

• The diamond shape in the diagram represents that the classes are divided into subclasses and it shows the whole-part relationship between the classes.(Refer below)

Domain model class diagram:

Considering the following domain model class diagram uses the whole-part relationship to model the car and its parts:

In the above diagram,

• The “Car” is the superclass and it is further divided into five classes.

• The diamond shape in the diagram represents that the superclass is “Car” and it is further subdivided into classes such as CarFrame, CarEngine, CarBody, Wheels, and InteriorDecoration.

• The superclass Car has its own attributes such as ProductDeveloper, year, and modelOfCar.

• The subclass CarFrame has its own attributes such as sizeOfFrame and specifications.

• The subclass CarEngine has its own attributes such as engineType and sizeOfEngine.

• The subclass CarBody has its own attributes such as numberOfDoors, roofStructure, and sizeOfCar.

• The subclass wheels has its own attributes such as numberOfWheels.

• The subclass InteriorDecoration has its own attributes such as colorOfCar and typeOfCar.

• Additionally the multiplicity constraint for all the classes will be “1” because the engine, frame, body, interior decoration are one except the class wheels.

• This is because the car contains four wheels so the multiplicity constraint will be “4” for “wheels”.

step: 2

Aggregation whole-part relationship:

From the above domain model diagram, aggregation is the type of whole-part relationship involved in the diagram. Because, the “Car” being the individual component , its parts are defined separately as carFrame, carEngine, carBody, Wheels, and InteriorDecoration.


Related Solutions

2. Draw an entity relationship diagram (ERD) for the following situation: The state of Georgia is...
2. Draw an entity relationship diagram (ERD) for the following situation: The state of Georgia is interested in designing a database that will track its researchers. Information of interest includes researcher name, title, position; university name, location, enrollment; and research interests. Each researcher is associated with only one institution, and each researcher has several research interests. 3. Visit a Web site that allows customers to order a product over the Web (e.g., Amazon.com). Create a data model that the site...
Based on the following situation,draw a complete Entity Relationship Diagram using theCrow’s Foot notation...
Based on the following situation, draw a complete Entity Relationship Diagram using theCrow’s Foot notation which includes:All entities and attributes Relationships Connectivity and relationship participation (4.5 Marks)Primary and foreign keys (3.5 Marks)A lecturer in a university can manage multiple projects. But, it is not compulsory for a lecturer to manage a project. Each project is managed by only one lecturer. Lecturer will have a staff number, a name, a rank, and a research specialty. Projects have a project number, a...
Instructions: Draw an ER diagram for the following description. Identify the keys and give the cardinality...
Instructions: Draw an ER diagram for the following description. Identify the keys and give the cardinality of all relationships (e.g. 1:1, N:1, N: M). Make sure you note your assumptions. Assume you are creating a database for a library system with the following properties: The library contains one or several copies of the same book. Every copy of a book has a copy number and is located at a specific location on a shelf. A copy is identified by the...
case study 1.    Draw an Entity Relationship Diagram (ERD) for the following problem. Make sure you identify...
case study 1.    Draw an Entity Relationship Diagram (ERD) for the following problem. Make sure you identify correct relationships, attributes, and identifiers (keys). 2.    Implement the database design into tables using an industrial-strength database management system (e.g. Oracle SQL+). case: HELP is a voluntary organization that provides aid to people. Based on the following brief description of operations, create the appropriate fully labeled Crow’s Foot ERD. Individuals volunteer their time to carry out the tasks of the organization. For each volunteer, their...
create an entity relationship diagram to describe the data requirements of the system. Your client is...
create an entity relationship diagram to describe the data requirements of the system. Your client is a local real estate company that wants to automate some of their processes. Here is how some of the business is described: - In a real estate transaction, there is a buyer, a seller, a property, a purchase agreement and a real estate agent - A seller may have one or more properties to sell - A buyer wants to buy only one property...
Create an entity relationship diagram to describe the data requirements of the system. Here is how...
Create an entity relationship diagram to describe the data requirements of the system. Here is how some of the business is described: - In a real estate transaction, there is a buyer, a seller, a property, a purchase agreement and a real estate agent - A seller may have one or more properties to sell - A buyer wants to buy only one property - A purchase agreement is between the seller and the buyer, and only for one property...
An Entity relationship diagram and workflow to implement a system that will allow consumers make online purchase.
An Entity relationship diagram and workflow to implement a system that will allow consumers make online purchase. 
SNOWMOBILE CLUB - Database Development Draw an Entity-Relationship Diagram which must include all entities and their...
SNOWMOBILE CLUB - Database Development Draw an Entity-Relationship Diagram which must include all entities and their attributes. Primary Keys underlined, Foreign Keys labeled, Weak entities double boxed. You have been asked to develop a database to help the Wisconsin Snowmobile Association track their club members. The following are the predefined business rules: 1) Snowmobile Clubs are tracked by Wisconsin county. 2) A club can be assigned to multiple counties. 3) Members can belong to one or more clubs. 4) Some...
Draw a use case diagram for the following scenarios: 7.40 Maximum Software is a developer and...
Draw a use case diagram for the following scenarios: 7.40 Maximum Software is a developer and supplier of software products to individuals and businesses. As part of their operations, Maximum provides a 1-800 help desk line for clients who have questions about software purchased from Maximum. When a call comes in, an operator inquires about the nature of the call. For calls that are not truly help desk functions, the operator redirects the call to another unit of the company...
(1) Draw the diagram showing the relationship between SAC and LAC. (2) Draw the diagram showing...
(1) Draw the diagram showing the relationship between SAC and LAC. (2) Draw the diagram showing the relationship between SMC and LMC.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT