One of the first lectures of my Database design class was the explanation of the differences between the file-oriented approach and the database approach when dealing with the storage and manipulation of data.
In a nutshell, we can say distinguish between the following advantages VS disadvantages.
But first, what is file-oriented approach? That's an "old" system where files are stored separately and each one of them is independent from the others. On the other side, a database approach allows us to associate data and keep and interdependent system.
In a nutshell, we can say distinguish between the following advantages VS disadvantages.
But first, what is file-oriented approach? That's an "old" system where files are stored separately and each one of them is independent from the others. On the other side, a database approach allows us to associate data and keep and interdependent system.
File-oriented approach disadvantages
- Data redundancy. There will be duplicates, as the files are created independently.
- This increases maintenance costs
- And also leads to data inconsistency, due to duplicates and/or similar data stored in different formats.
- Lack of data integration. This means we cannot associate data, as there are no association mechanisms.
- Program/data dependence to the physical format (the files themselves)
- Lack of flexibility. This means we are very limited on what we can do with our data:
- Limited information retrieval options
- Can only use pre-programmed reports
Database approach
Advantages
- Elimination of data redundancy, as we now have mechanisms to avoid duplicates.
- Now we have the ability to associate data, of course, like the relational model.
- Data is independent from the program used
- Usually, we'll enjoy better interfaces for managing the data
- More security and enforcement of integration of data
Disadvantages
- DBMS (DataBase Management Systems) are more complex to use than simply accessing isolated files
- The computers will need more resources
Types of Database models
The Database approach is not one single entity which only works using a single model, we have several models.- Hierarchical model. It follows a tree structure, 1:N, which means one-to-many. Each record can only have one parent. This is an old model with little use today. It cannot deal with data redundancy.
- Network model. Yes, this allows M:N, which means many-to-many relationships. Think about a typical business' departments organigram. One advantage of this model is that it can deal with data redundancy.
- Relational model. Which is made from 2-dimensional tables with implicit relationships. It is the most common today and some languages as SQL work under this model
- Important keywords/definitions of this model
- Tuple = row/record
- Attribute = column/field
- Cardinality = number of rows
- Degree = number of columns
- PK (Primary Key) = unique identifier
- Domain = pool of legal values
- Post-relational models. In the recent years we have seen some efforts to develope other models for managing and processing more general data.
Comentarios
Publicar un comentario