Data Structure Course (40 in total) Lesson 1 basic concepts and terms of Data Structure

Source: Internet
Author: User
Tags format definition

Subject:Basic concepts and terms of Data Structure

Purpose:Understand basic concepts of data structures and Common Terms

Teaching focus:Basic concept: data and data elements

Teaching difficulties:Four structural relationships between data elements.

Course content:

1. Definitions of data, data elements, data objects, and data structures

1. Data Definition

Definition 1: Data is a symbolic representation of objective objects.

Student ID Name Chinese Mathematics C Language
6201001 Zhang San 85 54 92
6201002 Li Si 92 84 64
6201003 Wang Wu 87 74 73
6201004        
...        

For example, Michael Scored 92 for the C language test and 92 for the student.

Definition 2: a general term for symbols that can be input into a computer and processed by a computer program.

For example, images and sounds.

Conclusion: The analysis, replication, and dissemination of information in the real world must be symbolic to facilitate processing, especially computer processing. If a parent or society wants to know a student's academic performance and abilities, they must look at his learning archives, which are the data that shows the student's learning situation.

2. Data Elements and data items

A data element is the basic unit of data. It can also be composed of inseparable data items. Description:

3. Data Objects

Is a set of data elements of the same nature. For example, the orders table of a class can be considered as a data object.

4. Data Structure

Define the relationship between each element in a Data Element Set (also known as a data object.

Define 2. A set of data elements with specific relationships between them.

Types of data structures:

  Features Example
Set Loose Relationship Between Elements
Linear Structure Strict one-to-one relationship between elements The elements in the tables Table above
Tree Structure Elements have a strict one-to-multiple relationship.
Graph structure (or mesh structure) Multi-to-many relationship between elements

Data structure format definition:

Data Structure name = (D, S)

Where D is the finite set of data elements, and s is the finite set of relations on D.

Logical Structure   The "relationship" in the "Data Structure" definition refers to the logical relationship between data. Therefore, the data structure is also called a logical structure.
Storage Structure   The representation of a Data Structure in a computer is called a physical structure. It is also called the storage structure.
Sequential Storage Structure
Chained Storage Structure

Storage Structure details:

Minimum unit for storing information in a computer:BitThe 8-bit is a byte, and the two bytes are a word. The byte, word, or more binary bits can be calledBit String.In the logical description, bit strings are called elements orNode.

When a data element is composed of several data items, the sub-string corresponding to each data item in the bit string is calledData domain(Data field ).

For example, the preceding orders table data is stored using the structure array classonestu [50] in C language:

Struct Stu {
Int stuno;/* data item, also known as a substring in the Stu string, or data field */
Char name [20];
Int maths;
Int language;
Int c_language;
} Classonestu [50];

Ii. Data Types

1. Definition: a data type is a set of values and a group of operations defined on this set of values.

For example, an integer in C language is a set of natural numbers within a certain range, and an operation that defines addition, subtraction, multiplication, division, modulo, and comparison of values on the set. The actual model has no modulo operation. Of course, integer data does not need to be rounded in.

2. Data Types:

  Features Example
Atomic type Values cannot be logically decomposed. Int float
Structure Type A value consists of several components in a certain structure. Struct Stu

Data Types encapsulate the details of data storage and operations.

Iii. Summary

DATA> data elements

Data Element Set with specific relationships-> Data Structure

Logical representation of data structures and physical storage-> Logical Structure and Storage Structure

People not only care about the logical structure and storage structure of data, but also the data processing methods (algorithms) and processing results-> Data Types

Data Type-> category

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.