Wednesday, January 29, 2020

Basic concepts of databases


Basic concepts of databases


Learning Outcomes:
  • Know database models, such as relational model and hierarchical model, and list examples of
    their usage.
  • Discuss the needs and trends of future database development and the corresponding applications. Trends in database models, including distributed, parallel, and multimedia, etc. and their impact, should be introduced.
  • Describe the purposes and functions of DBMS.
  • Explain the use of database instance and schema in database modelling.
  • Explain the concepts of data dictionary, and construct a simple data dictionary.
  • Explain the concept of program-data independence.


Database models:

  • Hierarchical database model

Data are organized into a tree-like structure. A record can only have a single parent. (But a parent can have multiple child records)
Example: Window Registry of Microsoft Windows operating system.

  • Relational database model

Data are organized into tables(relations).  A database is a collection of relations.
Example: Microsoft Access

  • Distributed database model

Database which is managed by distributed database management system. Data are stored in different physical sites(multiple database). Some data are replicated to facilitate frequent local use so that network traffic is reduced. From the user point of view, it appears as a single database.

  • Parallel database model

Parallel database has a more efficient data processing due to parallel use of resources i.e. multiple operations are done at the same time. Expensive equipment and software.

Relevant past paper:
DSE Elec A(SP-2016): 2012 2d. 2014 4d. 2015 3a. 2016 2d.


Purposes and functions of DBMS:

I.e. Why do we prefer relational DBMS to non-relational DBMS/non-database software? à What can relational database do (while others cannot or not as good)
  1. Control data redundancy and inconsistency
  2. Efficient data retrieval with indexing
  3. Performance with large volume of data
  4. Popular use of relational database à trained personnel more readily available

Relevant past paper:
DSE Elec A(SP-2016): 2013 3a. 2015 3c.


Database schema:


  • Name_of_relation (Composite_key1, Composite_key2, attribute, …)

The schema consists of the name and its attributes. The attributes are listed within the brackets. The primary key is underlined.

Relevant past paper:
DSE Elec A(SP-2016): 2015 2dii.

Data dictionary:

Data dictionary stores metadata. Metadata describes the structure of a database, structure of its tables and formats of the data in the tables.

Example
Field name
Data type
Width
Description
Example
PNUM
Character
4
Unique patient number
P001







Relevant past paper:
DSE Elec A(SP-2016): 2013 2bii.
AS CA(2000-2013): 2007 4a.

Program-data independence:

With the use of relational database, data are stored and managed by the DBMS.
Application programs make request to the DBMS to obtain the required data.
Any changes to the data structure shall not affect the application programs.

Advantages:
  • Easier to write the application programs. 
  • Changes in data structure would not lead to the need for rewriting the application programs.


Relevant past paper:
AS CA(2000-2013): 2007 4b.



References:

Parallel database:
Purposes and functions of DBMS: https://www.geeksforgeeks.org/need-for-dbms/

Syllabus comparison

 Syllabus comparison   DSE ICT 2025 New syllabus DSE ICT 2012-2024 CE CIT 2005-2011 CE CS 1994-2004 ...