picking out erd entities 14 th march 2011. steps in constructing erds 1.read and re-read the...

19
Picking out ERD Entities 14 th March 2011

Upload: trevon-garth

Post on 28-Mar-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

Picking out ERD Entities

14th March 2011

Page 2: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

Steps in Constructing ERDs

1. Read and re-read the narrative2. Make assumptions3. Identify the entities4. Define the relationships between the entities5. Identify the attributes of each entity6. Identify the primary key of each entity7. Identify the required foreign keys

Page 3: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

Identifying the Entities• Identifying entities in ERDs and DFDs is a

completely different process

• ERD entities are things of interest to a system that data will be stored about

• DFD entities deal with external people or groups that interact with a particular system or process

Page 4: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

• Sometimes an ERD and DFD entity will be the same.– A customer entity in a DFD may interact with an

online booking system such as IrishRail.ie. The processes a customer may undergo maybe the following: Selecting travel time and date; Selecting the ticket type; Giving credit card details to process payment and so on!

– An ERD for that system will include a Customer ERD entity. In order to book tickets online the customer must have an IrishRail.ie account. To create the account the database might store customer details such as username; email address; password; credit card details and so on in a Customer entity

Page 5: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

• Sometimes a customer entity in a DFD will not mean a customer entity in an ERD.– A customer entity in a DFD may interact with an in-

store shopping process such as Argos! The processes a customer may undergo at Argos maybe the following: Filling a order slip with selected product(s); Receiving a ticket to collect product; Payment for goods and so on!

– An ERD for that system does not include a Customer ERD entity. In order to buy a product from Argos the customer does not have to register their details. Anybody can go into Argos and pick a product(s) from the catalogue and purchase it. Argos does not care about storing the customer details. Entities that they care about are likely product; category; order

Page 6: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

Picking entities from Narratives• Use your personal experience to go through

each step of the narrative. Try to think about what logically happens. Identify where information or data must be captured.

• In a supermarket, what data does a system manage. Typically their systems don’t store customer details each time they purchase groceries. However, what happens when a product barcode is scanned at checkout.

Page 7: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

Picking entities

The High Street is a new supermarket in Grafton Street. They have a newly developed system that stores all their stock item and related details. The system caters for managing stock levels. A customer can use the High Street contemporary wooden enviro baskets to carry their selected products to checkout. When a product is added to a checkout transaction the system adjusts the quantity of stock. In order to keep efficient track of items the products are stored in categories in the system.

Page 8: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

Picking entities – Try to remove unnecessary details

Page 9: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

Picking entities – Identify Potential Entities

Page 10: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

Potential entities

• Stock Item• Product• Customer• Checkout Transaction• Category

Page 11: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

Potential entities

Page 12: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

“Nice Gifts” is a Cork City gift shop specialising in crystal and china products. The shop sells a wide range of products, which it periodically orders from a number of suppliers in the Cork area. These products are offered for sale to customers who enter the shop. A customer will enter the shop and purchase a product. The staff will subsequently check stock levels of the particular product and if levels are low, will submit an order to the relevant supplier. “Nice Gifts” keeps record of every order made to suppliers.

“Nice Gifts” also provides an additional service to customers. When customers require a product that is currently not sold by the shop, “Nice Gifts” will take the customers details and order the particular product. Shop staff will then use these details and order the particular product. Shop staff will then use these details to contact the customer when the product arrives on premises.

Page 13: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

“Nice Gifts” is a Cork City gift shop specialising in crystal and china products. The shop sells a wide range of products, which it periodically orders from a number of suppliers in the Cork area. These products are offered for sale to customers who enter the shop. A customer will enter the shop and purchase a product. The staff will subsequently check stock levels of the particular product and if levels are low, will submit an order to the relevant supplier. “Nice Gifts” keeps record of every order made to suppliers.

Take the first paragraph

Page 14: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

Potential Entities from 1st paragraph

• Product• Order• Supplier• Customer

• Determine which of these are entities!

Page 15: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

Take the second paragraph

“Nice Gifts” also provides an additional service to customers. When customers require a product that is currently not sold by the shop, “Nice Gifts” will take the customers details and order the particular product. Shop staff will then use these details and order the particular product. Shop staff will then use these details to contact the customer when the product arrives on premises.

Page 16: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

Potential Entities from 2nd paragraph

• Product• Staff• Supplier• Customer• Premises

• Determine which of these are entities!

Page 17: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

In-Class Exam

• 3 Questions – You must do 2• 1st is the ERD question (MANDATORY) (70%)• 2nd and 3rd will require short brief notes (30%)

Page 18: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

Question 1: ERD Tips• Neatness will be rewarded! Make full use of the

additional scrap paper provided.• Give your ERD a title!• Be consistent!• Make sure to follow the provided instructions• Read the narrative a few times and make sure

you understand it.• Try to storyboard for yourself what happens in

the narrative scenario (e.g. Does coffee dock require you to login before you can buy coffee?)

• Make assumptions explicit and include them on the answer sheet (NOT on the scrap paper)

Page 19: Picking out ERD Entities 14 th March 2011. Steps in Constructing ERDs 1.Read and re-read the narrative 2.Make assumptions 3.Identify the entities 4.Define

Question 2 and 3: Tips

• You will have an option to choose between 2 very short questions.

• Try to be concise – do not waffle. Use bullet points where possible.

• Include an illustrative example where possible