Computer information technology course (notes)

summary:

Overview of information technology

Principle of computer composition

Computer software

Mobile communication internet

Digital media and its application

Computer information system

Definition: data intensive, man-machine interactive computer system with the main purpose of providing information services
Features: large quantity, lasting, sharing and providing a variety of services

Structure:

1,Resource Management(DBMS and DB All on this layer)
    Various data information and resource management systems, mainly including database management system, database, etc.
2,Business logic layer
    Processes, rules, policies, and procedures that implement business functions
3,Application presentation layer
    Feedback to users
4,Infrastructure layer
    Running hardware, network

DB (database):

 According to a certain data model, the current multi-purpose relational database has the advantages of high redundancy, high independence, easy expansion and easy sharing.

DBA (database administrator):

For example, database monitoring, security control, database update and maintenance, and database update and maintenance

Data model:

1,Hierarchical model: binary tree
2,Mesh model:
3,Relational model (used more): for example EXCEL The table is similar
4,Object oriented model: still exploring

Disadvantages of file system:

1,The organization of data is oriented to users' own specific programs
2,Data redundancy is large, and data consistency is difficult to guarantee
3,Poor data independence
4,The connection between things can not be well expressed

DBMS (database management system)

It is a system software that integrates the manipulation and management of large databases
1,Users only pass DBMS Can access DB Data in
2,dba Only through DBMS Can be carried out DB Management and maintenance of, not allowed DBMS Direct access db
3,DBMS Not necessarily a relational database

Common relational databases

oracle,DB2,sql server,access,vfp,Sybase,MySQL,postgresql

Composition of dbs (database system):

1,DB,dbms,The supporting environment of users, personnel and databases, in which DBMS Is the core
2,DBS Main features:
    from DBMS Unified management and data sharing

Application access order:

D B M S →   O S   →   D B DBMS\rightarrow~OS~\rightarrow~DB DBMS→ OS → DB

Features of database based information system:

1,Structural data
2,High data sharing and low redundancy
3,Applications and data are independent
    a,Physical independence: global mode[pattern]/Storage mode[Internal mode]Mapping between
    b,Logical independence: local mode[External mode]/Global mode[pattern]mapping
4,Unified management and control of data by DBMS realization.

SQL (Structured Query Language)

notes

Use single line comment "--" two bars and one space
You can also use the "##" annotation
"/ * * /" is used for multiline comments

sql classification

   ddl:Operation of database, table and column create,drop,alert,retrieve
        In short CRUD(create,retrieve,update,delete)And using the database
   dql: Data in query table
   DML:Data in addition and deletion table
   dcl:to grant authorization

Four basic databases

information_schema
mysql: 
performance:Performance debugging
test

Database creation

For example: show create database mysql;
Create database: create database db1(This is the database name)
At the same time, the name of the database is unique, so it is necessary to perform judgment
 For example: create database if not exists da2;Is to judge the creation of db2
 This creates a character set that can be specified,with gbk As column
 For example: create databese db character set gbk;

Database modification

alter: modify
eg: alter database utf-8;
drop:delete
eg: drop database db4;
Display database name: show database;
Query the database in use
eg: select dababase ();
Use database:
use Database name;

Operations on tables (also CRUD)

eg: show database;

Table creation: create table table name (column name character type, column name character type); Different from the type of C, its types are: int, float, double, DataTime, timestamp (timestamp), varchar() string type, and specify the maximum character, year, time, etc.

Table creation, copy, modification

    eg:
    create table student(
        id int,
        varchar(32) name,
        age int,f
        score double(4,1)
        );

Replication of tables

    eg:
    create table Table name like The name of the copied table;

Table modification:

    eg:

Modify table name

    eg:
    alter table Table name rename to New table name;

Modify the character set of the table:

    eg:
    alter table Table name character set The name of the character set;

Add a column

    eg:
    alter table Table name add Column name data type;

Modify the name and type of the table

    alter table Table name change Column name new column new data type;
    alter table Table name modify Column name new data type;

Column deletion:

    eg:drop table Table name drop Listing;

Add data

intsert into Table name(Column 1,Column 2,Column 3) values(Value 1,Value 2,Value 3);
If you do not add column names, data will be added for all columns

Delete data

    eg:
    delete from Table name [where condition];
    Table deletion delete from;The whole watch is gone
    Delete first and then create, TRUNCATE TABLE Table name;

Modify data

    update Table name set Listing = Value, column name =Value, where Listing;
    update Table name set Listing = Value, column name =Value, if condition;

DQL query:

            select * from Table name;
            Syntax:
            select
                    Field list
            from
                    Table name list
            where
                    Condition list
            groub by
                    Grouping field
            having
                    Conditions after grouping
            order by
                    sort
            linmit
                    Paging limit

Basic query:

    select * Field list  
    Remove duplicate result sets:
    select distinct surface from Table name; The query results to be recorded are exactly the same
    select name,mathenglish,math + english FROM sthdent;This sentence means to find the sum of math and English
    During this calculation null Once involved in the operation, the result is null,So judge,
    eg:select name,math,english,math + ifnull(english,0) from student;
    eg:
    select name,math,english,math + ifnull(english,0) as Total score from student;

sql operator:

Information system and database

Data access in information system

Introduction to relational database

SQL

Concept of database

Data: is a symbol describing things

Database: database has three basic characteristics: permanent storage, organization and sharing

Strictly speaking, a database is a certain data model organization of a large number of collections and data in the database stored in the computer, organized and shareable

Database management system: it is a layer of database management software located between the user and the operating system. Like the operating system, it is the basic software of the computer

Function:

    1. Database definition function
    2.Data organization, storage and management
    3.Data operation function
    4.Transaction management and operation management of database
    5.Establishment and maintenance of database
    6.Other (communication, data conversion function, mutual access and operation function, etc.)

Database system:

The system for storing, managing, processing and maintaining data is composed of database, database management system (and application development tools), DBA and

Database phase

 Manual management stage: None
 File system management: it can be saved, but it has poor shareability, redundancy and independence
 Database management system: the center of machining data turns to the stage centered around the shared database

Database structure

Logical independence: it means that the user's application is independent of logic
 Physical independence: refers to the independence between the user's application and the physical in the database
 Database data

database model

Conceptual model, logical model, physical model

Conceptual model:

Also known as information model, it is a data and information model according to the user's point of view, which is mainly used for data model
Basic concepts:
Entity:
attribute
Code:
Entity set:
Solid:
Contact:

The relationship between entities refers to the relationship between different entity sets, that is, one to one, one to many, many to many

Conceptual model:

E-R diagram

Logical model:

It is a data modeling from the point of view of computer system, which is mainly used for the implementation of database management system

Hierarchical model:

There is only one root node, that is, a binary tree

Mesh model:

chart

Relational model:

Table, similar to excel
Relationship: a relationship
Tuple: a row of a table
Attributes: a column of a table
Code: also known as code key, primary key is the unique identifier of tuple
Domain: a set of sets with the same data type values
Component: an attribute of a tuple
E-R diagram:
Entity, attribute and relationship
Solids: rectangles
Attributes: ellipse
Relationship: Diamond

physical model

Database model structure

The logic and characteristics of all data in the schema database only involve the description of type
 The model is relatively stable and the real column is relatively variable

Three level mode structure:

External mode, internal mode, internal mode
External mode:

That is, sub schema, that is, database user schema, (including database and programmer)
The description of the characteristics of the local data structure that can be seen and used is the data of the database user, the data view of a user and the logical representation of an application

Internal mode:

Also known as storage mode, a database has only one internal mode. It is the physical structure and storage description, and the description of the internal storage mode of data in the database

pattern:

Also known as the description of the logical structure and characteristics of all data in the database

Secondary impression:

Composition of database:

Hardware platform and database:
Software: database management system, operating system supporting the operation of database system, high-level language with database interface and compiling system.
Personnel: develop, manage and use database administrators, system analysts, database designers, application programmers, and terminal personnel
DBA responsibilities: determine database storage structure and storage strategy, define data security, integrity and constraints, monitor database and operation, database improvement, reorganization and reconstruction

Operation of two-dimensional table

Two dimensional table structure and integrity of relational data model

E-R diagram

### E-R diagram

1. Entity contact diagram
2. Conceptual model: it is to transform objects in the real world into data structures that do not depend on specific computer systems
Supplement: E-R diagram is independent of DBMS

E-R conceptual structure

Use the E-R diagram to intuitively explain the status of a unit's information, that's it!
E-R graphics:
Rectangle: an entity, that is, an objective object
Diamond: indicates the relationship description between related entities
Ellipses: representing attributes
Contact type: 1:1 or 1: n or n:n or n:1

Transform E-R diagram into relational pattern

1. Each entity can be converted into a two-dimensional table
a. The attribute of the entity becomes the attribute of the two-dimensional table
b. The primary key of an entity becomes the primary key of a two-dimensional table
2. Each connection can be transformed into a two-dimensional table
a. The attribute of the associated attribute is the attribute of the two-dimensional table
b. The primary key of each entity involved in the connection is also an attribute of a two-dimensional table
c. Primary key of 2D table:
1. If the relation is 1:1, the primary key corresponding to one end can be selected as the primary key of the relation table.
2. If the relation is 1: many, the n-end entity in the relation is the primary key
3. If the relation is multiple, select the primary keys of each entity to form a combination

Database control

Database broken ring

For example, system failure and multi-user concurrency lead to inconsistent data input, physical damage and illegal input

method

1. Safety control:
a. User ID and password
b. Access control
3. Audit technology
4. Data encryption
5. View protection
2. Backup and redundancy: such as VRRPC protocol in network engineering
3. Integrity control: ensure the integrity, accuracy, correctness and effectiveness of input
4. Concurrency control: that is, either complete or not, and limit the number of simultaneous accesses
OLTP: connected transaction processing: it is oriented to the operation and bottom personnel, that is, the addition, deletion, query and modification of data
OLAP: online transaction analysis and processing, which mainly needs the decision-making needs of decision-makers and high-level personnel to analyze and process data
DW (data warehouse): a database system that focuses on serving decision-making

Database access in C/S mode

1. Presentation layer (application layer similar to OSI), business logic layer (specific function implementation)
2. Resource management layer: completed by the server, database server
3. The application program of the client sends sql to the DBMS through the network connection and obtains the results processed by the DBMS
4. Features: suitable for fewer clients

Database access structure under B/S

Three tier mode (i.e. html/css/javascript)

1. The first layer: client layer: dynamic web interface
2. Layer 2: business logic layer (web server)
a. Web server: maintenance of web page data and query of local dynamic data
b. Application server (a kind of system software): execute back-end programs, such as asp, jsp and php, to complete the generation of dynamic web pages
3. Layer 3: the database service layer receives and processes the SQL sent by the application of layer 2, and then returns the access results to layer 2

Layer 2 and layer 3 interfaces ODBC/JDBC

Dynamic web page access database technology

The process of accessing database with ASP technology

1,stay ODBC Connect to the required database with the support of  
2,Specify the storage area to cache the results  
3,send out SQL,Database execution  
4,The results of the storage area are processed according to the requirements of the web page (such as sharing and checking)  

Database system and application of new technology

1. Development of database system architecture
a. Centralized database system
b. Client / server architecture (c/s)
c. Browser / server architecture (B/S)
2. Distributed database DDBMS
3. OLTP: a cooperation of local DBMS on nodes
4. OLAP: meet the decision-making needs of decision-makers and senior managers
5. DW (data warehouse): it is a decision-making subject oriented database composed of multiple data sources, which integrates historical data and focuses on reading

Typical information system

Manufacturing information system

classification

CIMS (Computer Integrated Manufacturing System)
a. Technical information system
1. CAD (Computer Aided Design)
2. Cap (Computer Aided Process Planning)
3. Cam (Computer Aided Manufacturing)
4. CNC (computer digital control)
5. CAQ (Computer Aided Quality Management)
6,...
b. Management information system
1. MRP (material requirement planning system)
2. MRP2 (manufacturing resource system)
3. ERP (Enterprise Resource Planning)

Electronic Commerce

1. Definition: electronization of the entire trading activity
a. Including the negotiation is completed through the network
b. Customer data acquisition
c. Automatic data acquisition
2. Classification
a. According to both parties of the transaction: B2C (enterprise customer), B2B (enterprise enterprise), C2C (customer customer)
b. According to the nature of traded goods: tangible goods, intangible goods and services
c. According to the type of network used: e-commerce based on EDI, Intranet / Extranet

e-government:

Definition: government agencies use modern network communication and computer technology to pass government management and service functions
It is a way to realize on the Internet after simplification, optimization, integration and reorganization.

GIS

Digital earth: to establish a global complex information organization with spatial location as the main line
system

Digital Library

Digital library D-Lib
1. The object of D-Lib collection is digital information. However, digital collection plus all kinds of information processing workers
With, it does not constitute D-Lib.
2. D-Lib is an environment that integrates collections, services and people. It supports digital data
The whole life cycle of information and knowledge (including generation, release, dissemination, utilization and preservation)
Department activities.
Characteristics or requirements:
1. It has a variety of media and rich digital information resources
2. A service mechanism that can provide readers with information conveniently and quickly

Data mining (DM)

method:
1. Connection analysis
2. Evolution analysis
3. Classification and clustering
4. Anomaly analysis (discrete point analysis)

cloud computing

1. Definition: the complex computing structure and related computer resources provided by the Internet back-end.
2. What is cloud The corresponding computer group and the computer group composed of it can provide hardware, platform
Computer network of software and other resources.
Benefits: pay as you go
Services:
1. IaaS - Infrastructure Service: package hardware resources into services, provide them to users through the Internet, and charge according to the actual usage of resources by users
2. PaaS - platform as a service: an application mode that takes platforms such as computing environment and development environment as a service.
3. SaaS - software as a service: This is a widely used cloud computing. It refers to the unified deployment of application software on the provider's server to provide application software services to users through the Internet.

Internet of things

layered:
1. Perception layer
2. Network layer
3. Application layer

big data

supplement

1. Glossary

relational model programmeruser
Relational modelfile structure Two dimensional table structure
Relationship (2D table)filesurface
tuplerecordthat 's ok
attributeData item (field)column

Keywords: Database Oracle PostgreSQL

Added by tina88 on Tue, 21 Dec 2021 17:07:20 +0200