Chapter 5 Exercises: #5.58, 5.62 Page 195 Answer the following questions using I
ID: 3644775 • Letter: C
Question
Chapter 5 Exercises: #5.58, 5.62 Page 195Answer the following questions using IE Crow's Foot notation.
5.58 Examine the subscription form shown in Figure 5.53. Using the structure of this form do the following:
A. Create a model with one entity. Specify the identifier and attributes.
B. Create a model with two entities, one for customer and a second for subscription. Specify identifiers, attributes, relationship name. type and cardinalities.
C. Under what conditions do you prefer the model in A to that in B?
D. Under what conditions do you prefer the model in B to hat in A?
Explanation / Answer
To create an entity: In the Entity Relationship Diagrammer, click Move the mouse pointer to the area of the diagram in which you want to position your entity. To create the new entity at the default size, click the mouse button. To create the new entity larger or smaller than the default size, drag the entity box to the desired size for the entity, and release the mouse button. Note: positioning the entity box in the appropriate position can create Sub-types and super-types. To create a super-type, position and stretch the entity box over and around the entity or entities that will become its sub-types, and release the mouse button. To create a sub-type, position the entity box inside the entity that will become its super-type, and release the mouse button. 4. Enter the name of the entity. 5. Enter a short name for the entity, then click OK. Note: If you do not enter a short name the tool will choose a default short name that is merely a shortened version of the full name. Therefore, you may want to specify your own short names to avoid the risk of any duplicate short names. Also, make sure the short names are not any Oracle system words (e.g., CON). b)To create two entity data models In Solution Explorer, right-click the server project (SharedEntityExample.Web), select Add, and then select New Item. The Add New Item dialog box appears. Select Data from the list of Installed Templates on the left, and then select the ADO.NET Entity Data Model template. Name the new file SalesModel.edmx and click Add. The Entity Data Model Wizard appears. In the Choose Model Contents screen, select Generate from database and then click Next. In the Choose Your Data Connection screen, create a data connection to the AdventureWorksLT database. If the AdventureWorksLT database does not appear in the dropdown list, click on New Connection, select the correct Server name, and then select the AdventureWorksLT data base from the drop-down menu in the Connect to a database box lower down in the window. Select Test Connection button to make sure the database is accessible and click OK. Make sure that the Save entity connection settings in Web.Config as check box is selected when you are returned to the Entity Data Model Wizard and change the value of the entity connection settings to Sales_DataEntities. Click Next. In the Choose Your Database Objects screen, select the SalesOrderHeader table. Click Finish. The entity model is created for the table. Repeat the previous steps in this section to create another Entity Data Model for the AdventureWorksLT database, but name it CustomerModel.edmx, change the value of the entity connection setting in Web.config to Customer_DataEntities, and select the Customer (SalesLT) table. Build the solution. Open the code file for the Sales entity model, and notice that the SalesOrderHeader class has a CustomerID property. You will use this property to associate SalesOrderHeader and Customer.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.