Relational Data Base Management System
Relational Data Base Management System
The simplest model for a database is a flat file. You have only a single table which includes fields for each element you need to store. Nearly everyone has worked with flat file databases. The problem with flat files is that they
Lets consider the classic example of a customer order entry system. Assume that you're managing the data for a company with a number of customers, each of which will be placing multiple orders. In addition, each order can have one or more items. Before moving on, lets describe the data that we wish to record for each component of the application:
Customers :Customer Number ,Company Name ,Address City, State ,Phone Number Orders : Order Number, Order Date Order Line Items: Item Number ,Description ,Quantity ,Price
It except some of the problems. Each time an order is placed, you'll need to repeat the customer information, including the Customer Number, Company Name, etc. What's worse is that for each item, you not only need to repeat the order information such as the Order Number and Order Date, but you also need to continue repeating the customer information as well. Example:Lets say there's one customer who has placed two orders, each with four line items. To maintain this tiny amount of information, you need to enter the Customer Number and Company Name eight times. If the company should send you a change of address, the number of records you need to update is equal to the sum of product of orders and order line items. Obviously this will quickly become unacceptable in terms of both the effort required to maintain the data and the likelihood that at some point there will be data entry errors and the customer address will be inconsistent between records. The solution to this problem is to use a Relational Data Base model for the data. The Relational Database is a collection of tables. The use of relational database may use this tables for inserting deleting and Modifying tables.The concept isn't that hard to understand. It simply means that in this example each order entered is related to a customer record, and each line item
is related to an order record. A relational database management system (RDBMS) is that manages groups of records which are related to one another. Let's take our flat file and break it up into three tables: Customers, Orders, OrderDetails
The fields are just as they are shown above, with a few additions. To the Orders table, we will add a Customer Number field, and to the OrderDetails table we will add an Order Number field. Here's the list again with the required additional fields and modified field names.
Customers
0 1 0 2 0 3 0 4 0 5 0 6 0 7 CustID CustName CustAddress CustCity CustState CustZIP CustPhone
Orders
0 1 0 2 0 3 OrdID OrdCustID OrdDate
OrderDetails
0 1 0 ODID ODDescription
2 0 3 0 4
ODQty ODPrice