Before considering the use of files or the database approach, it is important to understand how data are represented. In this section critical definitions are covered, including the abstraction of data from the real world to the storage of data in files.
Reality, Data, and Metadata:
The real world itself will be referred to as reality. Data collected about people, places, or events in reality will eventually be stored in the file or database. In order to understand the form and structure of the data, information about the data itself is required. The information that describes data is referred to as metadata. The relationship between reality, data, and metadata is pictured above. Within the area of reality, there are entities and attributes; within the area of actual data, there are record occurrences and data item occurrences; within the area of metadata, there are record definitions and data item definitions.
Definition and Explanation of These Terms.
Any object or event about which someone chooses to collect data is an entity. An entity may be a person, place, or thing, for example, a salesperson, a city, or a product. Any entity can also be an event or unit of time such as a machine breakdown, a sale,
or a month or year.
Relationships are associations between entities (sometimes they are referred to as data associations). The first type of relationship is a one-to-one relationship (designated as 1:1), The second type of relationship is a one-to-many (1:M) association. Finally, a many-to-many relationship (designated as M:M) describes the responsibility that entities may have many associations in either direction.
An attribute is some characteristic of an entity. There can be many attributes for each entity. For example, a student (entity) can have many attributes such as last name, first name, street address, city, state, and so on. Data items or fields are used interchangeably with attributes.
A record is a collection of data items that have something in common with the entity described.
A key is one of the data items in a record that is used to identify a record. When a key uniquely identifies a record, it is called a primary key. For example, Roll* can be a primary key because only one number is assigned to each student in a class. In this way, the primary key identifies the real-world entity (Student).
When it is not possible to identify a record uniquely by using f the data items found In a record, a key can be constructed by choosing two or more data items and combining them. This is called a compound key.
The information that describes data is referred to as metadata. Metadata describes the name given and the length assigned each data item. Metadata also describes the length and composition of each of the records.
Firms have traditionally organized their data in a hierarchy that consists of:
The smallest logical entity for data storage is called field. It cannot be subdivided into meaningful units. In a payroll you found such elements as, employee number, name, designation, department, basic pay, house rent, conveyance allowance, union fund income tax, etc. are all fields.
The next step in the hierarchy is the record. A record consist of all the fields relating to a particular object or activity for example, relevant data of an employee working in account departments.
All the records of same type are organized into a file. A file is collection of data record that relate to a particular subjects, for example, purchase journal, sales journal, cash journal etc. when we talk about accounts department.
A database is an organized collection of files.
||Store numbers or numbers containing decimal points. Their can be mathematically manipulated. (Add, subtract).
||Store data that cannot be mathematically manipulated. Such as letters or alphabets.
||Store dates in particular format. Some mathematical operations are possible.
||Store text information such as narrative description (remarks) of an attribute of a person, object, or entity, which length cannot be specified.
||Store a single character of data such as T/F, Y/N, 0/1