0% found this document useful (0 votes)
71 views

Database Concepts

The document defines key database terminology including: - Data is raw facts stored in a database to form meaningful information such as numbers, text, images. - Records contain fields of different data types organized in a fixed number and sequence, such as an employee record with fields for name, phone number. - Files contain related records on a specific topic, like a student file. - A database is a collection of organized data, files, and objects that allows rapid search and retrieval. It is managed using database management systems and structured query language (SQL).

Uploaded by

Daniel Izevbuwa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Database Concepts

The document defines key database terminology including: - Data is raw facts stored in a database to form meaningful information such as numbers, text, images. - Records contain fields of different data types organized in a fixed number and sequence, such as an employee record with fields for name, phone number. - Files contain related records on a specific topic, like a student file. - A database is a collection of organized data, files, and objects that allows rapid search and retrieval. It is managed using database management systems and structured query language (SQL).

Uploaded by

Daniel Izevbuwa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

BASIC DATABASE TERMINOLOGIES

(a) Data
Data is a collection of raw facts that are stored and used inside a database in order to form
meaningful information. Data can also be described as facts, and figures that we store or use.
They can be represented in form of numbers, text strings, sound video, document, etc. example is
a report. In computing, data can be described as information that has been translated into a form
that is move convenient to move or process.
(b) Character
These are digits, letters or special symbols. They do not make any meaning until they are brought
together. Example “F” ”A” ”M” ”I” ”L” ”Y”. The word “family” has six characters.
(c) Field
Fields are consecutive columns of positions reserved for a specific kind of data. Example:

(d) Record
A record is a collection of fields possibly of different data types typically in fixed number and
sequence. Records are composed of fields each of which contains one item of information.
Example: the employee table above contains three fields which are the last name field, the first
name field, and the phone number field. It also has three records.
(e) File
A file is a collection of related records. It is a major grouping of data that contains information of
specific types. Examples of file in database management system include students file, subject file,
result file, e.t.c. different types of files store different types of information. E.g program files
store programs whereas text files store text.
(f) Database
A database is an integral collection of data, records, files, and other objects. It is a collection of
data, information that is specifically organized for rapid search, and retrieval by a computer. The
tables in a database are linked with primary and foreign keys. These keys are used to establish
relationships among the tables.
Example of a database

Structured query language (SQL) which is the only language the database understands is used to query
the database. It is used to insert, update, delete, and perform other operations on the database.
(g) Database Management System
A database management system is a software package with computer programs that controls the
creation, maintenance, and use of a database.
Goals of Database Management System
The goals of DBMS are:
(a) Provide for mass storage of relevant data

(b) Making easy access to data for the authorized user.

(c) Providing prompt response to users’ requests for data.

(d) Eliminate redundantly (Duplicate) data.

(e) Allow multiple users to be active at one time.

(f) Allow the growth of the database system

(g) Provide data integrity.

(h) Protect the data from physical harm and unauthorized access.

(i) Serving different types of users.

(j) Provide security with a user access privilege.

(k) Combining interrelated data to generate a report

(l) Provide multiple views for the same data.

Database system models


(a) Hierarchical
(b) Network
(c) Relational
(d) Temporal
(e) Object-Oriented
(f) Deductive

(a) Hierarchical
Hierarchical database is the oldest and simplest kind of database. It arranges data in a "tree like"
structure, which is similar to folders and files on a computer. Just as related files on a computer are
grouped in folders, every record in the hierarchical database has one "parent". Hierarchical Database
Model defines hierarchically-arranged data. In this tree, a single tree acts as the "root" of the database
from which other trees "branch" out. Relationships in such a system are thought of in terms of
children and parents such that a child may only have one parent but a parent can have multiple
children. Parents and children are tied together by links called "pointers" (perhaps physical addresses
inside the file system). A parent will have a list of pointers to each of their children.
Applications of hierarchical model :
(a) Hierarchical models are generally used as semantic models in practice as many real-world
occurrences of events are hierarchical in nature like biological structures, political, or social
structures.
(b) Hierarchical models are also commonly used as physical models because of the inherent
hierarchical structure of the disk storage system like tracks, cylinders, etc. There are various
examples such as Information Management System (IMS) by IBM, NOMAD by NCSS, etc.
Example 1: Consider the below Student database system hierarchical model.

In the above-given figure, we have few students and few course-enroll and a course can be assigned
to a single student only, but a student can enroll in any number of courses and with this the
relationship becomes one-to-many. We can represent the given hierarchical model like the below
relational tables:
FACULTY Table
Name Dep Course-taught

John CSE CA

Jake CSE SE

Royal CSE DBMS

STUDENT Table

Name Course-enroll Grade

Gami CA 2.0

Mary SE 3.0

Maye
n SE 4.0

Example 2: Consider the below cricket database system hierarchical model scheme.

This database model can have one-to-one (1:1) or many-to-one (m:1) relationship.

Characteristics of the hierarchical model


(i) Does not support many to many relationships
(ii) If a parent is deleted, the child has also deleted automatically.
(iii) Data can be represented as a hierarchical tree as can be seen in the figure.
(iv) Each child record can have only one parent record
(v) Pointers are used to link the records. Pointer determines that which record is parent record and
which one is child record.
(vi) Parent and child records are stored close to each other on the storage device.
It helps to minimize the hard disk input and disk output.
(vii) Due to the short distance between parent to child, database access time and performance
is improved. Navigation through the database is very fast in a hierarchical model.
(viii) All relationships are predefined. Root nodes, parents, and the child are predefined in the
database schema.
(ix) It is difficult to re-organize the database due to hierarchy. It is difficult to re-organize because
parent to child relationships can be disturbed.

Advantages of hierarchical database model


1. Fast and efficient data retrieval: One of the key advantages of hierarchical databases is that
they allow for fast and efficient data retrieval, since data is organized in a predictable and
structured way.
2. Easy to add/delete information: In this type of database, you can easily add or delete the
information.
3. Predictable data structure: The hierarchical database model has a predictable and structured
data structure, which makes it easier to understand and navigate.
4. Efficient storage of data: Since hierarchical databases store data in a parent-child relationship,
they can be more efficient in terms of storage compared to other database models.
5. Good performance: Hierarchical databases can have good performance in terms of data retrieval
and querying, especially for large datasets.

Disadvantages of Hierarchical Database Model


1. Limited flexibility: One of the major disadvantages of hierarchical databases is that they are not
as flexible as other types of databases, and are not well suited for handling complex data
relationships or changes in data structures.
2. Difficult to maintain and update: Hierarchical databases can be difficult to maintain and
update, since changes to the data structure can impact the entire database.
3. Limited support for data manipulation: Hierarchical databases do not support complex data
manipulation operations, such as data aggregation or data mining.
4. Limited interoperability: Hierarchical databases are not compatible with other database models,
which can limit their interoperability with other systems and applications.
5. Lack of standardization: Since hierarchical databases are not as widely used as other database
models, there is a lack of standardization and best practices for their use and management.
(b) Network database model

This model was formalized by the Database Task group in the 1960s. This model is the
generalization of the hierarchical model. This model can consist of multiple parent segments and
these segments are grouped as levels but there exists a logical association between the segments
belonging to any level. Mostly, there exists a many-to-many logical association between any of
the two segments. We called graphs the logical associations between the segments. Therefore,
this model replaces the hierarchical tree with a graph-like structure, and with that, there can more
general connections among different nodes. It can have m:m relations i.e, many-to-many which
allows a record to have more than one parent segment.
Here, a relationship is called a set, and each set is made up of at least 2 types of record which are
given below:

An owner record that is the same as of parent in the hierarchical model.


A member record that is the same as of child in the hierarchical model.
Structure of a Network Model :

In the above figure, member TWO has only one owner ‘ONE’ whereas member FIVE has two
owners i.e, TWO and THREE. Here, each link between the two record types represents 1 : M
relationship between them. This model consists of both lateral and top-down connections between
the nodes. Therefore, it allows 1: 1, 1 : M, M : N relationships among the given entities which
helps in avoiding data redundancy problems as it supports multiple paths to the same record.
There are various examples such as TOTAL by Cincom Systems Inc., EDMS by Xerox Corp.,
etc. 
Example : Network model for a Finance Department.

Below we have designed the network model for a Finance Department :


So, In a network model, a one-to-many (1: M) relationship has a link between two record types.
Now, in the above figure, SALES-MAN, CUSTOMER, PRODUCT, INVOICE, PAYMENT,
INVOICE-LINE are the types of records for the sales of a company. Now, as you can see in the
given figure, INVOICE-LINE is owned by PRODUCT & INVOICE. INVOICE has also two
owners SALES-MAN & CUSTOMER. 
Let’s see another example, in which we have two segments, Faculty and Student. Say that student
John takes courses both in CS and EE departments. Now, find how many instances will be there?
For the above example, a students instance can have at least 2 parent instances therefore, there
exist relations between the instances of students and faculty segment. The model can be very
complex as if we use other segments say Courses and logical associations like Student-Enroll and
Faculty-course. So, in this model, a student can be logically associated with various instances of
Faculties and Courses.

Advantages of Network Model:

(a) This model is very simple and easy to design like the hierarchical data model.
(b) This model is capable of handling multiple types of relationships which can help in modeling
real-life applications, for example, 1: 1, 1: M, M: M relationships.
(c) In this model, we can access the data easily, and also there is a chance that the application can
access the owner’s and the member’s records within a set.
(d) This network does not allow a member to exist without an owner which leads to the concept of
data integrity.
(e) Like a hierarchical model, this model also does not have any database standard,

Disadvantages of Network Model

(a) The schema or the structure of this database is very complex in nature as all the records are
maintained by the use of pointers.
(b) There’s an existence of operational anomalies as there is a use of pointers for navigation which
further leads to complex implementation.
(c) The design or the structure of this model is not user-friendly.
(d) This model does not have any scope of automated query optimization.
(e) This model fails in achieving structural independence even though the network database model is
capable of achieving data independence.
Network Database model was designed to solve some of the more serious problems with the
Hierarchical Database Model. Specifically, the Network model solves the problem of data
redundancy by representing relationships in terms of sets rather than hierarchy. The network model is
very similar to the hierarchical model actually. In fact, the hierarchical model is a subset of the
network model. However, instead of using a single-parent tree hierarchy, the network model uses set
theory to provide a tree-like hierarchy with the exception that child tables were allowed to have more
than one parent. This allowed the network model to support many-to-many (m:m) relationships.
Visually, a Network Database looks like a hierarchical Database in that you can see it as a type of
tree. However, in the case of a Network Database, the look is more like several trees which share
branches. Thus, children can have multiple parents and parents can have multiple children.

Relational database model


The relational Model was proposed by E.F. Codd to model data in the form of relations or tables.
After designing the conceptual model of the Database using ER diagram, we need to convert the
conceptual model into a relational model which can be implemented using any RDBMS language like
Oracle SQL, MySQL, etc. 
In a relational database management system (RDBMS), the relationship between data is relational and
data is stored in tabular form of columns and rows. Each column of a table represents an attribute and
each row in a table represents a record. Each field in a table represents a data value.
Structured Query Language (SQL) is the language used to query RDBMS, including inserting,
updating, deleting, and searching records. Relational databases work on each table that has a key field
that uniquely indicates each row. These key fields can be used to connect one table of data to another.
Relational databases are the most popular and widely used databases. It supports 1:1, 1:m, m:1 type
of relationships.
 

The relational model represents how data is stored in Relational Databases.  A relational database
stores data in the form of relations (tables). Consider a relation STUDENT with attributes
ROLL_NO, NAME, ADDRESS, PHONE, and AGE shown in Table 1. 
STUDENT 

ROLL_NO NAME ADDRESS PHONE AGE

1 RAM DELHI 9455123451 18

2 RAMESH GURGAON 9652431543 18

3 SUJIT ROHTAK 9156253131 20

4 SURESH DELHI   18

 IMPORTANT TERMINOLOGIES
(a) Attribute: Attributes are the properties that define a relation. e.g.; ROLL_NO, NAME

(b) Relation Schema: A relation schema represents the name of the relation with its attributes. e.g.;
STUDENT (ROLL_NO, NAME, ADDRESS, PHONE, and AGE) is the relation schema for
STUDENT. If a schema has more than 1 relation, it is called Relational Schema.
(c) Tuple: Each row in the relation is known as a tuple. The above relation contains 4 tuples, one of
which is shown as:

1 RAM DELHI 9455123451 18


Diagram of a relational Database  
A relational database model can be represented in an Entity relationship diagram.
Advantages:
(a) It is a simple model
(b) It is Flexible
(c) It is Secure
(d) It has data accuracy
(e) It has data integrity
(f) Operations can be applied easily
Disadvantage:
(a) Not good for large database
(b) Relation between tables become difficult sometimes

Object-oriented database model


Object oriented database model is a database model that is based upon real world situations. These
situations are represented as objects, with different attributes. All these object have multiple
relationships between them.
In Object Oriented Data Model, data and their relationships are contained in a single structure which
is referred as object in this data model. In this, real world problems are represented as objects with
different attributes. All objects have multiple relationships between them. Basically, it is combination
of Object Oriented programming and Relational Database Model as it is clear from the following
figure : 

Object Oriented Data Model


= Combination of Object Oriented Programming + Relational database
model
Example:

Components of Object Oriented Data Model : 


(a) Objects – 
An object is an abstraction of a real world entity or we can say it is an instance of class. Objects
encapsulates data and code into a single unit which provide data abstraction by hiding the
implementation details from the user. For example: Instances of student, doctor, engineer in
above figure. 
 
(b) Attribute – 
An attribute describes the properties of object. For example: Object is STUDENT and its attribute
are Roll no, Branch, Setmarks() in the Student class. 
 
(c) Methods – 
Method represents the behavior of an object. Basically, it represents the real-world action. For
example: Finding a STUDENT marks in above figure as Setmarks(). 
 
(d) Class – 
A class is a collection of similar objects with shared structure i.e. attributes and behavior i.e.
methods. An object is an instance of class. For example: Person, Student, Doctor, Engineer in
above figure. 
Advantages of Object Oriented Data Model : 
 Codes can be reused due to inheritance.
 Easily understandable.
 Cost of maintenance can reduced due to reusability of attributes and functions because of
inheritance.
Disadvantages of Object Oriented Data Model : 
 It is not properly developed so not accepted by users easily.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy