P3C6: Databases
Databases - Outlines
- A flat file consists of a large number of records each of which comprises a number of fields.
- Each field has its own data type and holds a single item of data.
- Limitations of flat-file systems:
- separation and isolation of data
- duplication of data
- data dependence
- data inconsistencies
- difficulty in changing applications programs
- Relational databases store data in tables.
- Normalization is a set of formal rules that must be followed after a set of table is designed.
- Normal forms (NF):
- 1 NF: It doesn't have a repeated group of attributes
- 2 NF: There are no non-key fields attributes which are dependent on only part of the primary key
- 3NF: There are no dependencies between non-key attributes
- An entity - relationship (E-R) diagram shows the entities in the database and the relationships between them.
- A relational database gives the following advantages over flat files:
- Data are contained in a single software application.
- Duplication of data is minimized.
- Data inconsistency is reduced.
- The volume of data is reduced leading to faster searching and sorting of data.
- Data structures remain the same even when tables are altered.
- Existing programs don't need to be altered when a table design is changed or new tables created.
- Queries and reports can be set up quickly.
- A primary key is used to uniquely identify a record or row in a table.
- A foreign key attribute links to a primary key in a second table.
- A secondary key is used to get fast access when searching on this attribute.
- Different categories of user can see different views of the data - only what is needed for their job.
- Terminals in public areas may be refused access to sensitive data, even if the user has access.
- A DBMS (Database Management System) is a piece of software that provides the following facilities:
- a data definition language (DDL) that the database designer uses to define the tables of the database
- a data dictionary that contains all design information
- a data manipulation language (DML) for inserting, selecting, updating and deleting data records
- backup of the database data
- control of multi-user access to the data.
- The DML and DDL used by all modern database software is Structured Query Language (SQL).
No comments:
Post a Comment