Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Database logic

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Briefly describe the following concepts: data, data elements, data items, data objects, data structures, logical structures, storage structures, abstract data types. Answer: data: a symbolic representation of objective things, a general term for all symbols that can be input into a computer and processed by a computer program. Such as integers and real numbers used in mathematical calculation, strings used in text editing, graphics, images, sound, animation and other data defined by special coding. Data element: the basic unit of data that is usually considered and processed as a whole in a computer. In some cases, data elements are also called elements, nodes, records, and so on. Data elements are used to fully describe an object, such as a student record, a pattern (state) of the chessboard in the tree, a vertex in the graph, and so on. Data item: the smallest unit with independent meaning and indivisibility that make up the data element. For example, the student number, name, gender and so on in the student basic information table are all data items. Please add a link description to the data object: it is a collection of data elements of the same nature and a subset of the data. For example, the integer data object is the set N = {0, ±1, ±2, … }, the alphabetical character data object is the collection C = {'alphabetical character data object. , 'Zhuan,' such as Zhuan, 'Zhuan,' The student basic information table can also be a data object. Data structure: a collection of data elements that have one or more specific relationships with each other. In other words, a data structure is a collection of data elements with a "structure", which refers to the relationship between the data elements. Logical structure: describe the data from the logical relationship, it has nothing to do with the storage of the data, is independent of the computer. Therefore, the logical structure of data can be regarded as a mathematical model abstracted from specific problems. Storage structure: the storage representation of data objects in a computer, also known as physical structure. Abstract data type: a user-defined mathematical model that represents an application problem and a general term for a set of operations defined on this model. It includes three parts: the data object, the collection of relations on the data object and the collection of basic operations on the data object. 2. Give an example of data structure to describe the meaning and interrelationship of its logical structure and storage structure. Answer: for example, there is a form of basic student information, including student number, name, gender, place of origin, major and so on. Each student basic information record corresponds to a data element, please add a link description, the student record is arranged according to the sequence number, forming a linear sequence of the student basic information record. For the entire table, there is only one start node (there is no record in front of it) and one terminal node (there is no record behind it), and each of the other nodes has only one direct predecessor and only one direct successor. This relationship between student records determines the logical structure of the student table, that is, the linear structure. The storage representation recorded by these students in the computer is the storage structure. If these records are stored in continuous storage units (such as an array), it is called a sequential storage structure; if the storage units are not continuous, but randomly store each record, and then link with a pointer, it is called a chain storage structure. That is, the same logical structure can correspond to different storage structures. 3. Briefly describe the four basic relations of logical structure and draw their relation diagrams. Answer: (1) there is no relationship between the data elements of the set structure except the relationship that "belongs to the same set". For example, to determine whether a student is a member of a class, simply treat the class as a collection structure. (2) there is an one-to-one relationship between linear structured data elements. For example, arranging student information data according to the chronological order of their enrollment will form a linear structure. (3) there is an one-to-many relationship between tree structure data elements. For example, in the class management system, the monitor manages multiple team leaders, and each team leader manages multiple team members, thus forming a tree structure. (4) there is a many-to-many relationship between the data elements of graph structure or network structure. For example, the friend relationship between multiple students, any two students can be friends, thus forming a graphic structure or network structure. Among them, tree structure and graph structure belong to nonlinear structure. 4. Which two basic storage methods implement the storage structure? Answer: (1) Sequential storage structure represents the logical relationship between data elements with the help of the relative position of elements in memory, which is usually described by the array type of programming language. (2) the chain storage structure requires all the elements to be stored in a continuous storage space in turn, while the chain storage structure does not need to occupy a whole storage space. However, in order to represent the relationship between nodes, it is necessary to attach a pointer field to each node to store the storage address of the subsequent elements. So the chain storage structure is usually described with the help of the pointer type of the programming language.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report