What is the difference between internal and external representation of data?
Introduction to Information Technology
Computer Science Engineering
1130
Rajiv Sharma
Internal and external representations of data refer to how data is structured, stored, and accessed within a system or application.
Internal representation, also known as the internal data model, refers to how data is organized and stored within a computer system or software application. It is the representation used by the system to process and manipulate data internally. The internal representation is designed to optimize efficiency and performance for the specific tasks the system needs to perform.
The internal representation is typically hidden from the user or application layer and is optimized for the underlying hardware and software architecture. It may involve data structures like arrays, linked lists, trees, or databases, as well as low-level storage formats such as binary files, database tables, or indexes.
For example, a database management system may internally represent data using B-trees or hash tables for efficient indexing and retrieval. Similarly, an image editing software may internally represent an image as a matrix of pixels to perform various operations on it.
External representation refers to how data is presented, accessed, and exchanged between different systems or components. It is the representation that users or applications interact with and understand. The external representation is designed to be human-readable, standardized, and compatible with other systems.
External representation can take various forms depending on the context. It may include file formats, protocols, APIs, or any other means of representing and exchanging data. Examples of external representations include text files, images, audio files, XML, JSON, RESTful APIs, etc.
For example, a word processing software may store a document in an internal representation optimized for editing and formatting, but it provides an external representation in a file format like Microsoft Word (.docx) or Portable Document Format (.pdf) for sharing and interoperability with other applications.
In summary, the internal representation focuses on the system's efficiency and performance, while the external representation focuses on the interoperability and usability of data between different systems or components.
In the context of data and information processing, the terms "internal representation" and "external representation" refer to different ways of representing and organizing data.
Internal Representation:
Internal representation refers to the format or structure in which data is stored, processed, and manipulated within a computing system or a program. It is typically designed to be efficient for the computer or software to handle and may not be easily interpretable by humans. Internal representation is optimized for computational operations and may involve data structures, algorithms, and encoding schemes specific to the system or programming language.
For example, when you input data into a computer, it may be represented internally as binary code (0s and 1s) using a specific data structure, such as arrays or linked lists. This internal representation allows the computer to perform calculations, comparisons, and other operations on the data effectively.
External Representation:
External representation, on the other hand, refers to the format or structure in which data is presented or displayed to users or external systems. It is designed to be human-readable, understandable, and compatible with other systems or applications. External representation focuses on how information is communicated and interpreted by people or external entities.
For example, when you view a spreadsheet in a program like Microsoft Excel, the data is presented in a tabular format with rows and columns. This external representation allows you to read and interpret the data easily, perform calculations, and analyze the information in a meaningful way.
In summary, the main difference between internal and external representation of data lies in their intended purpose and audience. Internal representation is optimized for computational efficiency and is mainly used by computers and software, while external representation is designed for human comprehension and interaction.