Skip to content

Database ER model

August 6, 2009
tags:

Data base process:

Data processing is the process of how to data has been stored into database and how it will retrieve from database. It has

1. data Entry

2. Data cleaning

3. data coding

4. Data translation

5. Data summarization

6. Data Aggregation

7. Data validation

8. Data tabulation

9. Statistical Analysis

10. Data warehousing

11. Data mining

In the data base processing has been done by three types

1. Batch processing

2. online processing

3. realtime processing

ER diagram:

This is the most important one for doing the database designing .For the design technique it has two types.

1. ER Modeling

2. Normalization

The ER model is a graphical representation for designing the database. In the ER modeling, we need to under stand following these things.

1. Entity

An Entity is an object or concept about which business user wants to store information.

2. Weak Entity:

A weak Entity is dependent on another Entity to exist. Example Order Item depends upon Order Number for its existence.Without Order Number, it is impossible to identify Order Item uniquely.

3. Attribute:

Attributes are the properties or characteristics of an Entity.

4. key attribute:

A key attribute is the unique, distinguishing characteristic of the Entity.

5. Multi valued Attribute:

A multi valued attribute can have more than one value. For example, an employee Entity can have multiple skill values.

6. Relationship:

Relationships illustrate how two entities share information in the database structure.

7. weak Relationship:

To connect a weak Entity with others, you should use a weak relationship notation.

These are the most important items in the ER modeling.

Before you design the ER diagram, you should follow these steps.

1. Identify the Entities

2. Find relationships

3. Identify the key attributes for every Entity

4. Identify other relevant attributes

5. Draw complete ER diagram with all attributes including Primary Key

6. Review your results with your Business users

For example, let us take the simple bank information design.

Step 1: Identify the Entities

i. BANK

ii. BRANCH

iii. LOAN

iv. ACCOUNT

v. CUSTOMER

Step 2: Find the relationships

1. One Bank has many branches and each branch belongs to only one bank, hence the Cardinality between Bank and Branch is one to many.

2. One Branch offers many loans and each loan is associated with one branch, hence the Cardinality between Branch and Loan is one to many.

3. One Branch maintains multiple accounts and each account is associated to one and only one Branch, hence the cardinality between Branch and Account is One to Many

4. One Loan can be availed by multiple customers, and each Customer can avail multiple loans, hence the cardinality between Loan and Customer is Many to Many.

5. One Customer can hold multiple accounts, and each Account can be held by multiple Customers, hence the cardinality between Customer and Account is Many to Many

Step 3: Identify the key attributes

1. Bank Code (Bank Code) is the key attribute for the Entity Bank, as it identifies the bank uniquely.

2. Branch NO (Branch Number) is the key attribute for Branch Entity.

3. Customer NO (Customer Number) is the key attribute for Customer Entity.

4. Loan no (Loan Number) is the key attribute for Loan Entity.

5. Account No (Account Number) is the key attribute for Account Entity.

Step 4: Identify other relevant attributes

1. For the Bank Entity, the relevant attributes other than Bank Code would be Name and Address.

2. For the Branch Entity, the relevant attributes other than Branch No would be Name and Address.

3. For the Loan Entity, the relevant attribute other than Loan No would be Loan Type.

4. For the Account Entity, the relevant attribute other than Account No would be Account Type.

5. For the Customer Entity, the relevant attributes other than Customer no would be Name,Telephone No and Address.

Advantages:

1. Easy to understand. Represented in Business Users Language. Can be understood by non technical specialist.

2. Intuitive and helps in Physical Database creation.

3. Can be generalized and specialized based on needs.

4. Can help in database design.

5. Gives a higher level description of the system.

Disadvantages:

1. Physical design derived from ER Model may have some amount of ambiguity or inconsistency.

2. Sometime diagrams may lead to misinterpretation

Data structures
By dhanasekar Chellamuthu, On 2/8/08 9:50 AM
Data structures:
Data structure is a process or way of storing data in the database. It hasso many types of data structures .like tree, binary tree, stack, Queue, and linked list. A well-designed data structure allows a variety of critical operations to be performed, using as few resources, both execution time and memory space, as possible. First, I would like to say about tree structures.
Tree:
In the tree structures, the data has been stored in tree format in database. It has parent and child relationship within the tree format. in the tree structure it has so many types of structures.
1. B+ tree
2. B tree
3. R Tree
4. Radix tree
5. Kd tree
Just I would like to say about B+ tree Introduction.
B+ tree (also known as a Quaternary Tree) is a type of tree, which is used to sorted data in a way that allows for efficient insertion, retrieval and removal of records, each of which is identified by a key. It is a dynamic, multilevel index, with maximum and minimum bounds on the number of keys in each index segment or node.
Binary tree
It has only two child nodes and one parent node. in the parent node it contains the data element, right pointer and left pointer. A “binary search tree” (BST) or “ordered binary tree” is a type of binary tree where the nodes are arranged in order: for each node, all elements in its left sub tree are less-or-equal to the node (<=), and all the elements in its right sub tree are greater than the node (>).
Stack
Also commonly know as a FILO structure (First In – Last Out). Like the queue, this comes in two flavors: arrayed and linked. A stack is often not used directly, but a very important concept in programming. Please note, that a queue and a stack are not real structures, because they just define how data is accessed rather then stored.
Queue:
This is also called a FIFO structure (First In – First Out). The queue comes in two variations, which have the same methods, but differ in their implementations: There is the arrayed queue, which obviously uses an array internally, and the linked queue, which is build upon a linked list. They are both very similar, except that the arrayed version has a fixed size and is faster.
A common application would be a command queue – imagine you have a unit in a strategy game and apply many commands that the unit should follow. All commands are enquired and afterwards desuetude and processed in order.
Linked Lists
A linked list is similar to an array. The main difference is that in an array, each cell contains just the data and is accessed by an index. A linked list consists of several node objects, which in addition to storing the data, manage a reference to the next node (singly linked) or to the next and previous node (doubly linked), in the list. Think of it as a more natural approach to work with sequential data.
Other benefits are that you can insert and remove data quickly by just calling the appropriate method on the node itself – you do not have to manage array indexes. Also in AS3 object, access is faster than array.
Single linked list.
Doublyliked list:
Access, so it competes very well in terms of performance when iterating over the list.
Advertisements
One Comment leave one →
  1. November 1, 2009 3:53 am

    I really enjoyed your blog, Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: