different between flat database and relational database [Resolved]

Posted by Rajesh081725 under C# on 11/6/2012 | Points: 10 | Views : 1524 | Status : [Member] | Replies : 4
hi,
any one know
different between flat database and relational database in .net?

Time is Gold
Thanks & Regards,
Rajesh Kumar,
9962038582.



Responses

Posted by: Bageshkumarbagi on: 11/7/2012 [Member] Starter | Points: 50

Up
0
Down

Resolved
Hi Rajesh

Go through this links
http://www.helium.com/items/2292210-the-difference-between-flat-file-and-relational-databases
http://wiki.answers.com/Q/Difference_between_Flat_File_Database_and_Relational_Database
http://answers.yahoo.com/question/index?qid=20070622031148AAWjFUF
http://www.ehow.com/about_5436936_flat-files-vs-database.html

Thanks,
Bagesh Kumar Singh
Mark as answer if you have been satisfied

Rajesh081725, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sugi on: 11/6/2012 [Member] Starter | Points: 25

Up
0
Down
A database is a collection of data, which is organized into files called tables. These tables provide a systematic way of accessing, managing, and updating data. A relational database is one that contains multiple tables of data that relate to each other through special key fields. Relational databases are far more flexible (though harder to design and maintain) than what are known as flat file databases, which contain a single table of data.

To understand the advantages of a relational database, imagine the needs of two small companies that take customer orders for their products. Company A uses a flat file database with a single table named orders to record orders they receive, while Company B uses a relational database with two tables: orders and customers.

When a customer places an order with Company A, a new record (or row) in the table orders is created. Because Company A has only one table of data, all the information pertaining to that order must be put into a single record. This means that the customer's general information, such as name and address, is stored in the same record as the order information, such as product description, quantity, and price. If customers place more than one order, their general information will need to be re-entered and thus duplicated for each order they place.

Whenever there is duplicate data, as in the case above, many inconsistencies may arise when users try to query the database. Additionally, a customer's change of address would require the database manager to find all records in orders that the customer placed, and change the address data for each one.

Company B is much better off with its relational database. Each of its customers has one and only one record of general information stored in the table customers. Each customer's record is identified by a unique customer code which will serve as the relational key. When a customer orders from Company B, the record in orders need contain only a reference to the customer's code, because all of the customer's general information is already stored in customers.

This approach to entering data solves the problems of duplicate data and making changes to customer information. The database manager need change only one record in customers if someone changes addresses.



Rajesh081725, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajesh081725 on: 11/7/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi sugi,

I didnt get your point clearly
can u give some examples of sql code

Time is Gold
Thanks & Regards,
Rajesh Kumar,
9962038582.

Rajesh081725, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 11/7/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Example for flat database and relational database
Flat Table: Unit of Measurement:
table_Name: :tbl_UOM
Fields: uomCode,uomName
Flat Table: Material Master
table_Name: :tbl_materialMaster
Fields: Materialcode,MatriialName,Uomname/uomCode

In UOM Table:
U001 -Meter
U002 -TON
U003- KG
In Material Master:
M001 - Sugar -- U003
M002 - USB Cable -- U001
M003 - Iron-- U002






Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Rajesh081725, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response