Notes eMeroo(Some TechTips);

December 22, 2008

Data Flow Diagram(DFD) for a Purchasing Website.

Filed under: Analysis and Design Diagrams — Amira @ 4:14 pm

Last topic: Designing DB for a purchasing System. 1st step: ERD
I designed the ERD of a purchasing website, I described the tables and their attributes

Now I’ll design the DFD(Data Flow Diagram) of the system. But First, let me show you how does it looks like and how you can move from page to another, so you choose the item you look for.


@Home page:
You will see all types we have in our shop, when you move over one of the types. The categories of that type will be loaded in the same page. When you choose one of these categories, you will move to the subcategories page that list its subcategories. But if the chosen category has only one subcategory, you’ll be directed to the Items page that contains all items of the subcategory.(i.e you’ll not move to subcategories page)
EX. If you chose Computer Science category that’s dropped from Books Type, you’ll be directed to Subcategories page. But if you chose HP category that’s dropped from Laptop type, you’ll be directed to the Items page directly without passing to subdirectories page. Because HP category has only one subcategory that has all items, so there is no need for moving to subcategories.
At home page you can choose one of the best sellers, then you’ll move to the itemDetails page.
Also you can search for specific item, if there are results, they will be displayed at items page.

You can sign in, and then all price items will be displayed with the equivalent currency of your country.
You can make a new registration.

@Subcategories page:
You’ll be directed to this page after choosing a category from Home page, all subcategories of the chosen categories will be placed inside here.
In the left corner, there are all of the categories that dropped from the type you chose except the category you browse its subcategories now. Here the other categories of Books type.
You can choose one of the categories in the left corner. If that category has more than one subcategory, then its subcategories will be displayed in the right side of the same page. But if that category has only one subcategory, then the items of that subcategory will be displayed in the Items page.

Items Page

@Items page:
You can select any item or its related items to browse their details; also you can add this item directly to the cart

@Itemdetails page:
you can explore the item details then add to cart or back to choose another item

@Buy page:
you’ll see all item you had chosen and total price. Also you can remove some of these items or back to choose extra items. Now you can buy the selected items. If you agree you will directed to another page to type your secret information such name and credit card. The page will connect to bank and check your info. If true, you’ll finish buying. If not, you will be notified.

*******************************************

Now, let’s move to the DFD.
system analyst draws DFDs to
better understand the logical movement of data throughout a business. Data flow diagrams are structured analysis and design tools that

allow the analyst to comprehend the system and subsystems visually as a set of interrelated data.

Four basic symbols are used to chart data movement on DFDs :

Square: This is used to depict an external entity (another department, a

business, a person, or a machine) that can send data to or receive data from the system.

Entities should be named with a noun.
Rectangle with rounded corners: This is used to show the occurrence of a transforming

process. Process always denotes a change in or transformation of data.

Process assigns the name of whole system or a major subsystem. Use a verb-adjectivenoun

format for detailed processes.
Rectangle: which represents a data store. The data store symbol is simply

showing a depository for data that allows addition and retrieval of data. Each data store has

a unique reference number such as D1, D2, and so on to describe its level.
But here I used the SP1,SP2,SP3, and so on. Because I used stored procedures to deal with data. I used SP instead of D in the diagram to make it easy to understand. So instead of connecting with D1, D2 to retrieve items of subcategory, I’ll use only SP3.

Here are the used stored procedures:
SP1 GetCatOfType: return all categories of selected type.
SP2 CheckIfThereSubCat: check if there are more than one subcategory. If so, it return all subcategories of selected category. If there only one subcategory, it call SP3 to return the items of that subcategory.
SP3 Get ItemsOfSubCat: return all items of selected subcategory.
SP4 Search : used for searching for specific item.(I supposed the search process use this SP)
SP5 CheckValidUser: check the existence, the validity and his desire for changing price with his currency.
SP6 InsNewUser: used for registering new user.
SP7 GetItemDetails: check the type of the item, then connect with the suitable table to return the details.
SP8 GetBestSellers: return the best seller items
SP10 DelItem: used by the admin to remove any item
SP11 Updatedata: used by the admin to update any item
SP12: AddNewDate: used by admin to add new data

The arrow: that shows movement of data from one point to another, with the head of the

arrow pointing tow ards the data’s destination. A rrow s should be described w ith a noun.

Data Flow Diagram Levels:

The context diagram is the highest level in a data flow diagram and contains only one process, representing the entire system. The process is given the number zero. All external entities are shown on the context diagram as well as major data flow to and from the system. The diagram donot show any detailed processes or data stores.

Level1 is the explosion of the context diagram. Each process is numbered with an integer.

**********************************

Child Levels: Some processes on level1 may in turn be exploded to create a more detailed child diagram. The process on Diagram1 that is exploded is called the parent process, and the diagram that result is called child diagram. The processes or the child diagram are numbered using the parent process number, a decimal point, and a unique number for each child process. For example: Process 3 explode (in level 2) to create two processes 3.1 and 3.2. Process 3.2 explode(in level 3) to create three processes 3.2.1, 3.2.2 and 3.2.3 .

Here’s the Image URL:
Context: http://farm3.static.flickr.com/2011/1577378989_8faa037a42_o.jpg

Level 1:      http://farm3.static.flickr.com/2108/1577379021_10126f013d_b.jpg

Level 2:      http://farm3.static.flickr.com/2040/1578318110_2967c04610_b.jpg

Level 3:     http://farm3.static.flickr.com/2273/1578318116_7caa88cbf6_o.jpg

Amira

Designing DB for a purchasing System. 1st step: ERD

Filed under: Analysis and Design Diagrams — Amira @ 4:11 pm

This Post From My Old Blog

I want to build a website for a shop to support e-commerce.

How can you do so??
I suppose that my store database has different types of items (clothes, books, notebooks…etc). Each type has one or more category, each category has one or more subcategory, each subcategory has many items, and each item included in one or more subcategory (and therefore it may be included in many categories but in one type).

Notes:

Any purchasing system (of two levels in its hierarchy) can use this design.

I tended to normalizing the database for better performance while updating and adding the data.

In the ClassifiedItems table (relational table), I didn’t include CategoryID but I included SubCategoryID and therefore I can reach to CategoryID.

In Items table, I included the common fields in all different items. Also I included TypeID (the type id for that item) and ShipmentCost(how much does it cost to ship this item to somewhere for example New York). I’ll describe their use soon.

In Regions table, I included RegionShipmentValue. This field specifies a value that can be multiplied by ShipmentCost field in Items table, and the result will represent the shipment cost for that item for this region. For example, the RegionShipmentValue for Egypt is 3( i.e. triple the value specified in ShipmentCost) and by multiplying them I can have the shipment cost for Egypt for specified item.
why didn’t I specify the shipment cost for each region in the table directly , and I use a mathematical operation to get shipment cost for each region?
That is because each item have a shipment cost (shipping notebook cost you much more money than shipping a book for example. So with each item, I specify its shipment cost.
In Region table, I also included EquivalentValueForDollar field. It stores the region’s equivalent value for dollar. So for example after logging in with my username, the website can show items price directly with my currency.

For more details about some of classified items, I can add some of table to the database. For example, I can add BookDetails (TypeID, SSN, PageNumber, Publisher) and ClothesDetail (TypeID, Size, Color, MadeIn) and make a direct relationship between each new added detailed table and Items table, so that I added TypeID field to Items table to get some details about the item by connecting with the detailed table directly instead of joining 6 tables (Items, ClassifiedItems, SubCategories, Categories, Types, and any detailed table)

This an example of types added and has a relationship between Item table. Here I added bookDetails table and LaptopDetails table that have details about these types.

Amira

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.