2021年4月16日星期五

F6 ICT S3: Fundamental of Relational Database Systems

Candidates should be able to:

(a)      explain the importance of data as an asset to organizations such as schools and hospitals;
(b)      explain the types of data operation: sorting, validation and abstraction;
(c)      describe the characteristics of good data and information which can help users in making decisions;
(d)      explain the data hierarchy;
(e)      define database, database systems and database management systems (DBMS);
(f)       explain the importance of database systems in administration, business and daily life;
(g)      explain the importance of software, hardware, data, people and procedure as integrated components of a database system;
(h)      describe the functions of the DBMS components: data dictionary, data manipulation language (DML), and data description language (DDL);
(i)        describe the advantages of database systems as compared to file processing systems;
(j)        describe the representations of a relational database: table, row and column;
(k)      explain the concept of keys: primary key, foreign key and candidate key;
(l)        explain the concept of data integrity. 

------------------------------------------------------------------------------------------------------------

*代表额外知识,方便大家更好的理解


*Data
-An unprocessed raw facts and does not carry any useful meaning.
-A basic fact of required information for an organization.

*Information
-A processed data in an organized, useful, and meaningful form to the managers in helping them to solve problems or make decision



Importance of Data

-Provide accurate and up-to-date information.

-Allow organizations to determine the causes of problems more efficiently.

-Able to make informed decisions.



Data Operation

-An agile, process-oriented methodology for developing and delivering analytic.

-An organization-wide data management practice that controls the flow of data from source to value, with the goal of spending up the process of deriving value from data.


Types of Data Operation

➤Sorting

-Rearrange data in ascending or descending order according to Primary Key.
-Sort data according to certain categories.

➤Validation

-Examine whether the input or the stored data is correct.
-Method of checking the accuracy and quality of data.

➤Abstraction

-The reduction of a particular body of data to a simplified representation of the whole. 
-The process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.



Characteristics of Good Data And Information

➤ Accurate

-Refer to the degree to which information is free from error.

➤ Timely

-Refer to how current the information is.

➤ Complete

-Refer to the degree to which it is free from omission
-Data must tell the whole story about an issue.

➤ Relevant

-Refer to the degree to which it is relevant to the decision-making.
-Gather irrelevant information is wasting time and money.

➤ Consistent

-Same information must be produced any time constantly.
-Data duplication may occur if data is stored in multiple places and are not updated consistently.

接下来的东西可能有点难理解,要再读到后面ERD,sql时就会明白了。



Data Hierarchy

-Refer to the systematic organization of data, often in a hierarchical form.

➤ Bit

-Smallest unit of data
-An electronic signal.
-Exp: 0, 1

➤ Byte

-Combination of 8 bits, each byte makes 1 letter.

➤ Field

-Combination of bytes.
-A group of characters that formed word of data.

➤ Record

-Combination of fields.
-Group of the related fields about an entity.

➤ File

-Group of records with the same data fields

➤ Database

-A group of related files for a specific entity. 







Database(DB)

-Collections of data that are linked logically.


Database Systems (DBS)

-Overall system that consists of a database, DBMS application programs, and users with all of them integrating as one unit.

-Consist 5 components:

➤ User 

-People who interact with DB.
-Party that involved in DBS.
-Exp: Ordinary end-user, upper-level end user.

➤ Procedure

-Rules and instructions which explain the design and usage of a DB.
-so users and operators know how to operate the system. 

➤ Data

-Consists of raw data stored in files.
-Exp: numbers, characters

➤ Hardware

-Physical device on which database resides.

➤ Software

-Program that written by a programmer to solve a certain problem.

-Exp: DBMS.

#如题目问DBS的意思,可以说一个包括了5种components的system(记得list出来是哪几个


Importance of Database System

-Can avoid data duplication.

-Higher level of data consistency

-Provides effective data integration

-Increase the productivity of end-user

-Quick decision making

-Better problem solving and support service

这只是参考,只要答案合理都可以




Database Management Systems (DBMS)

-Software system that allows users to define, develop and maintain DB.
-A set of programs to access the interrelated data.

Components of DBMS

➤ Data Dictionary

-Contains the definition of the data stored structure in a data repository.
-Catalogue that stored metadata (data that is related to the specific DBS) of a DB.

➤ Data Manipulation Language (DML)

-Provides a set of operations, which support manipulation operations on data in DB.
-Helps to access and manipulate data.

-Exp: INSERT, DELETE, SELECT, UPDATE

#这里不明白没关系,后面学了SQL就会懂了

➤ Data Description/Definition Language (DDL)

-To define DB structure.
-Cannot use to manipulate data.
-Outcome is table that store data dictionary.








File Processing System

-A way of storing, retrieving, and manipulating data that is present in various files.
 
-Files are used to store various documents. All files are grouped based on their categories.
 
-The file names are very related to each other and arranged properly to easily access the files.


-Advantages of File Processing System : 

 

  • Cost friendly – 
    There is a very minimal to no setup and usage fee for File Processing System. (In most cases, free tools are inbuilt in computers.) 
     
  • Easy to use – 
    File systems require very basic learning and understanding, hence, can be easily used. 
     
  • High scalability – 
    One can very easily switch from smaller to larger files as per his needs.

-Disadvantages of File Processing System : 
 

  • Slow access time – 
    Direct access to files is very difficult and one needs to know the entire hierarchy of folders to get to a specific file. This involves a lot of time. 

  • Presence of redundant data – 
    The same data can be present in two or more files which takes up more disc space. 
     
  • Inconsistent Data –
    Due to data redundancy, the same data stored at different places might not match each other. 
     
  • Data Integrity Problems –
    The data present in the database should be consistent and correct. To achieve this, the data should satisfy certain constraints.
     
  • Difficulty in the recovery of corrupt data – 
    Recovery or backup of lost and corrupt data is nearly impossible in the case of File Processing System. 
     
  • Lack of Atomicity –
    Operations performed in the database must be atomic i.e. either the operation takes place as a whole or does not take place at all. 
     
  • Problem in Concurrent Access – 
    When a number of users operate on a common data in the database at the same time then anomalies arise, due to lack of concurrency control. 




Relational Database

-A type of database that stores and provides access to data that are related to one another.

-Collection of data items with pre-defined relationships between them.

-Based on the relational model.


Representation of Relational Database

1.Table

-In the Relational model, relations are saved in the table format. 
(It is stored along with its entities.)

-A table has two properties rows and columns. 
(Rows represent records and columns represent attributes.)


2. Row

-A single row of a table, which contains a single record


3. Column

-Represents the set of values for a specific attribute


4. Attribute

-Each column in a Table. Attributes are the properties that define a relation. 

-Exp: Student_Rollno, NAME


5. Degree

-The total number of attributes which in the relation is called the degree of the relation


6. Cardinality

-Total number of rows present in the Table.


7. Relation

-Table that consists of rows and columns.




Key Concepts 

-To identify a specific record.

1. Primary Key (PK)


-A column or group of columns in a table that uniquely identifies every row in that table. 

-Can't be a duplicate meaning the same value can't appear more than once in the table. 

-A table cannot have more than one primary key.

>可以独特区别/代表一个data

>每个PK一定要特别的,不能有重复


2. Candidate Key (CK)


-A set of attributes that uniquely identify tuples in a table. 

-The Primary key should be selected from the candidate keys. 

-Every table must have at least a single candidate key. 

-A table can have multiple candidate keys but only a single primary key.

>PK的候选/备份,除了被选中的PK,其他CK也有潜质当PK

>例如PK是学生编号,但是学生的IC号码也可以当PK,这个时候IC就是CK。






3. Foreign Key (FK)

-A column that creates a relationship between two tables. 

-To maintain data integrity and allow navigation between two different instances of an entity.
 
-It acts as a cross-reference between two tables as it references the primary key of another table.

>一个帮忙连接两个table的key。

>通常database会把信息分开储存,加入有两个table,一个是有学生信息的,一个关于教师
信息。为了把这两个table连接起来,会开一个FK,例如班级名,通过班级可以知道这个学
的老师是谁,可以知道这个老师的学生有谁。



#请一定要理解好几个key的区别,这对后面学的东西很重要,也是考题常问的。



Data Integrity

-Refers to the accuracy and consistency of data stored in a database.
-Refers to the safety of data in regards to regulatory compliance.

>通常是指数据的统一性,比如小明的电话号码是111,在数据库A存的是111,但是在数据库B的时候存的是112,这样就不能叫data integrity。




这个bab有点难理解是很正常的,因为都是非常基础的知识,后面学了怎样画ERD,entity
,attribute这些就会容易理解了。

没有评论:

发表评论