SlideShare a Scribd company logo
Visit https://ebookfinal.com to download the full version and
explore more ebook
Concepts of Database Management System 1st Edition
Shefali Naik
_____ Click the link below to download _____
https://ebookfinal.com/download/concepts-of-database-
management-system-1st-edition-shefali-naik/
Explore and download more ebook at ebookfinal.com
Here are some recommended products that might interest you.
You can download now and explore!
Database System Concepts 7th Edition Henry F. Korth
https://ebookfinal.com/download/database-system-concepts-7th-edition-
henry-f-korth/
ebookfinal.com
Concepts of Database Management 8th Edition Philip J.
Pratt
https://ebookfinal.com/download/concepts-of-database-management-8th-
edition-philip-j-pratt/
ebookfinal.com
A History of Indian English Literature 1st Edition M.K
Naik
https://ebookfinal.com/download/a-history-of-indian-english-
literature-1st-edition-m-k-naik/
ebookfinal.com
Modern Database Management 11th Edition Jeffrey A. Hoffer
https://ebookfinal.com/download/modern-database-management-11th-
edition-jeffrey-a-hoffer/
ebookfinal.com
Database Management Systems 2nd Edition Vijay Krishna
Pallaw
https://ebookfinal.com/download/database-management-systems-2nd-
edition-vijay-krishna-pallaw/
ebookfinal.com
Modern Database Management 12th Edition Jeffrey A. Hoffer
https://ebookfinal.com/download/modern-database-management-12th-
edition-jeffrey-a-hoffer/
ebookfinal.com
The New Relational Database Dictionary Terms Concepts and
Examples 1st Edition C. J. Date
https://ebookfinal.com/download/the-new-relational-database-
dictionary-terms-concepts-and-examples-1st-edition-c-j-date/
ebookfinal.com
Management of Retinal Vein Occlusion Current Concepts 1st
Edition Seenu Hariprasad
https://ebookfinal.com/download/management-of-retinal-vein-occlusion-
current-concepts-1st-edition-seenu-hariprasad/
ebookfinal.com
Supervision Concepts and Practices of Management Edwin C.
Leonard Jr
https://ebookfinal.com/download/supervision-concepts-and-practices-of-
management-edwin-c-leonard-jr/
ebookfinal.com
Concepts of Database Management System 1st Edition Shefali Naik 2024 scribd download
Concepts of Database Management System 1st Edition
Shefali Naik Digital Instant Download
Author(s): Shefali Naik
ISBN(s): 9789332537231, 9332537232
Edition: 1
File Details: PDF, 8.53 MB
Year: 2014
Language: english
CONCEPTS OF
DATABASE
MANAGEMENT
SYSTEM___
_ _ _ _ _ _ SHEFALI NAIK
ALWAYS LEARN I NG PEARSON
Concepts of Database
Management System
Shefali Naik
FM_Final.indd 1 3/18/2014 5:02:47 PM
Dedicated to
My husband Trushit, daughter Jisha, and son Harsheev
FM_Final.indd 2 3/18/2014 5:02:47 PM
Copyright © 2014 Dorling Kindersley (India) Pvt. Ltd.
No part of this eBook may be used or reproduced in any manner whatsoever without the
publisher’s prior written consent.
This eBook may or may not include all assets that were part of the print version. The
publisher reserves the right to remove any material in this eBook at any time.
10 9 8 7 6 5 4 3 2 1
Head Office: 7th Floor, Knowledge Boulevard, A-8(A) Sector 62, Noida 201 309, India.
Registered Office: 11 Community Centre, Panchsheel Park, New Delhi 110 017, India.
ISBN: 9789332526280
e-ISBN: 9789332537231
Contents
Foreword vii
Preface ix
Acknowledgements xi
About the Author xiii
Chapter 1 Basics of Database 1
1.1 Introduction 1
1.2 Data and Information 1
1.2.1 Data 1
1.2.2 Information 2
1.3 Database 5
1.3.1 Components of Database System 6
1.4 Database Management 11
1.5 Database Management System 11
1.6 Need for a Database 12
1.7 File-based Data Management System 12
1.8 Characteristics, or Features, or Advantages
of Database Systems 14
1.9 Limitations of Database 15
Summary 16
Chapter 2 Data Models and Architecture of DBMS 19
2.1 Evolution of Data Models 19
2.2 Hierarchical Data Model 21
2.3 Network Data Model 26
2.4 Relational Data Model 27
2.5 Object-oriented Data Model 30
2.6 Object-relational Data Model 32
2.7 Three Level Architecture of Database 33
2.8 Database Languages 35
2.9 Data and Structural Independence 36
Summary 36
Chapter 3 Relational Database Management System 41
3.1 Introduction 41
3.2 RDBMS Terminology 41
3.3 Various Types of Keys 44
3.4 Integrity Rules 48
FM_Final.indd 3 3/18/2014 5:02:47 PM
iv | Contents
3.5 Relational Set Operators 50
3.6 Retrieval Operators 52
3.7 CODD’s Twelve Rules of Relational Database 53
3.8 Database Life Cycle 54
3.9 Data Dictionary 54
Summary 55
Chapter 4 Developing Entity-Relationship Diagram 59
4.1 Introduction 59
4.2 Identifying Entities 60
4.3 Identifying Relationships 63
4.4 Types of Relationships 63
4.5 Relationship Participation 66
4.6 Strong and Weak Relationship 68
4.7 Managing Many-to-many Relationship 68
4.8 Example of E-R Model 68
4.9 Extended E-R Model 72
4.10 Converting E-R Model into Relational Model 73
4.11 Object Modelling 75
4.11.1 Subclass and Superclass 75
4.11.2 Specialization and Generalization 76
4.11.3 Class Diagram 76
Summary 76
Chapter 5 Normalization82
5.1 Introduction 82
5.2 Need for Normalization 82
5.3 Types of Dependencies 83
5.4 First Normal Form 88
5.5 Second Normal Form 88
5.6 Third Normal Form 94
5.7 Boyce-Codd Normal Form 96
5.8 Multi-valued Dependency 98
5.9 Join Dependency 100
5.10 Lossless and Lossy Decompositions 101
5.11 Normalizing Tables 102
5.12 Examples 103
Summary 108
Chapter 6 Managing Data Using Structured Query Language (SQL) 111
6.1 Introduction 111
6.2 Data Definition Commands 112
6.3 Data Manipulation Commands 114
6.4 SELECT Statement and Its Clauses 115
FM_Final.indd 4 3/18/2014 5:02:47 PM
Contents | v
6.5 Aggregate Functions 118
6.6 Date and Time Functions 119
6.7 String Functions 121
6.8 Conversion Functions 122
6.9 Mathematical Functions 122
6.10 Special Operators 123
6.11 Types of Constraints 125
6.12 Types of Join and Set Operators 127
6.13 Sub-query 128
6.14 Advances SQL Roll-up, Cube, Crosstab 129
Summary 132
Chapter 7 Introduction to PL/SQL 138
7.1 Introduction 138
7.2 Block of PL/SQL in Oracle 138
7.3 Cursors in Oracle 139
7.4 Procedures in Oracle 142
7.5 Functions in Oracle 143
7.6 Triggers in Oracle 144
7.7 Overview of Packages in Oracle 145
Summary 146
Chapter 8 Transaction Management in Database 148
8.1 Introduction 148
8.2 Definition of Transaction 148
8.3 Properties of Transaction 152
8.4 States of Transaction 155
8.5 Concurrency Control Using Locks 155
8.6 Deadlocks 158
8.7 Database Backup and Recovery 159
8.8 Security, Integrity and Authorization 161
Summary 161
Chapter 9 
Centralized and Distributed Database
Management System 165
9.1 Introduction 165
9.2 Types of Databases 165
9.3 Centralized Database Management System
vs. Distributed Database Management System 166
9.4 DDBMS Components 169
9.5 Distributed Processing 169
9.6 DDBMS Advantages and Disadvantages 170
Summary 170
FM_Final.indd 5 3/18/2014 5:02:47 PM
vi | Contents
Chapter 10 Advancement in Databases 172
10.1 Multidimensional Database 172
10.2 Mobile Databases 172
10.3 Multimedia Databases 174
10.4 Data Warehousing and Data Mining 174
10.5 Open Source Database 175
10.6 Spatial Databases 175
10.7 Moving Object Databases 176
10.8 NoSQL Database 176
Summary 177
Chapter 11 Overview of MS-Access 2007 180
11.1 MS-Access as an RDBMS 180
11.2 Elements of MS-Access 180
11.3 Creating Database and Tables 181
11.4 Data Types of MS-Access 183
11.5 Sorting and Filtering Records in MS-Access 187
11.6 Creating Queries in MS-Access 188
11.7 Creating Forms in MS-Access 196
11.8 Creating Reports in MS-Access 201
11.9 Creating Macros and Switchboard 205
Summary 211
Chapter 12 Overview of Oracle 221
12.1 Oracle as an RDBMS 221
12.2 Logging into Oracle 221
12.3 Command Summary of Oracle Database 10g XE 222
12.4 Database Administration 228
12.4.1 Managing Users 228
12.4.2 Managing Roles 229
12.4.3 Managing Privileges 231
Summary 233
References and Bibliography 235
Index 243
FM_Final.indd 6 3/18/2014 5:02:47 PM
Foreword
Database Management System is one of the most important subjects of the computer and IT
field. It is used in almost all the applications like management information systems, expert
systems, business information systems, mobile applications, and many more. Over the years, the
world has witnessed many inventions in database technologies. The most important invention
is relational database management system. Application developers, in the IT industry, are using
relational model-based databases for more than thirty years.
Students of IT, computer science and applications, are required to learn databases in one or more
courses. Databases are used to store and retrieve data. There are certain rules used to manage data
within a database. Database provides many features related to data, such as sharing and integration
of data, consistent transaction execution, security and recovery of data through authorization and
algorithms. The relational models use a common language, named as Structured Query Language
(SQL) to process data. With the rise of the Internet and mobile technologies, databases are also
evolving. To store huge amount of data which are spreading worldwide on the Internet and mobile
devices, relational database management systems are not enough. Special types of databases, such
as NoSQL (Not only SQL) are required for managing such data.Apart from NoSQL databases, the
databases which are able to store information related to moving objects, multimedia data, historical
data from multiple dimensions, spatial data, etc., are also needed. Automation of processes also
require maintenance of the existing applications and analysis of historical data. Analysis of histori-
cal data helps in improving business functions by taking important decisions.
In this book, the concepts of databases has been clearly explained giving examples in a lucid
language. All chapters are well-organized and comprehensively covering the syllabus of the
course on Database Management Systems. At the end of each chapter, summary is given to
quickly recap the concepts. The exercises include theory questions, multiple-choice questions,
andquestionsforstudent’spractice.Theoverviewofemergingtrendsindatabasesisthoroughly
explained. This book addresses the need of B.Tech, M.C.A., and IT programme students, faculty
members, and professional developers. I am sure that they will be benefited from this book.
Shefali Naik, the author of this book, is working as senior faculty member, since past thirteen
years, at the School of Computer Studies of the Ahmedabad University. She teaches courses
on database management systems at graduate and post-graduate levels. To her credit, she has
written a good number of articles and technical papers in the area of databases. I wish her good
luck for authoring this book and her academic career.
—Bipin V. Mehta
Director
School of Computer Studies,
Ahmedabad University
FM_Final.indd 7 3/18/2014 5:02:47 PM
Preface
This is the first edition of this book. I have tried to cover all the concepts of database manage-
ment system. This book is useful for the students of computer science, IT, and the courses in
which database is offered as an interdisciplinary subject.
The readers who are new to this subject, can start this book reading from the first chapter.
Those who are already familiar with databases, can read any chapter to know more about it.
Readers, who are willing to learn about any Relational Database Management System, may read
Chapters 11 and 12 which gives brief details on MS-Access and Oracle RDBMS, respectively.
Readers, who are interested in advancement in database, may read Chapters 8, 9 and 10 which
describe advanced topics in database, such as Transactions, Distributed Database, and emerging
trends in Database. Those who wish to learn programming language used in database, may read
Chapters 6 and 7 in which SQL and PL/SQL is discussed.
The details covered in each chapter of this book are as follows:
●
● Chapter 1 gives an overview of database by explaining the basic concepts of database,
such as data, information; database management system’s advantages on other record-
keeping system and limitations, its components, etc.
●
● Chapter 2 describes the evolution of database management system from different sys-
tems, such as hierarchical model and network model. It also describes the architecture of
DBMS.
●
● Chapter 3 explains Relational Database Management System.
●
● Chapter 4 explains Entity-Relationship Model, and Chapter 5 describes Normalization
Process.
●
● Chapters 6 and 7 explains the common languages SQL and PL/SQL, which is used in
relational database systems to create and manage database objects; add, remove, change
and retrieve data to/from tables and write small programs.
●
● In Chapter 8, Transaction is discussed; Chapter 9 explains Centralized and Distributed
database, and Chapter 10 describes advancement in databases.
●
● Chapters 11 and 12 cover two well-known relational database management systems MS-
Access and Oracle.
Any suggestions to improve the content of the book are welcome.
—Shefali Naik
FM_Final.indd 9 3/18/2014 5:02:47 PM
Acknowledgements
I am indebted to many people who were directly or indirectly involved with the creation of
this book.
I would like to thank Bipin V. Mehta, Director at the School of Computer Studies of the
Ahmedabad University, for his inspiration and contribution with the Foreword of this book.
I am grateful to my colleague and friend, Pratik Thanawala, for his technical suggestions
which helped me to improve the contents of this book. I am thankful to my friends from other
universities, Sonal Jain, Shivani Trivedi and Tripti Dodiya, for their guidance.
I would like to acknowledge the assistance provided by the editorial team of Pearson
Education, Noida; especially, Neha Goomer and Nikhil Rakshit, for their continuous assistance
in solving various queries related to the publishing of this book. I am also thankful to Uma
Tamang and Naresh Sharma. A big thanks to Pearson Education for publishing this book.
I thank my parents, Girish and Bharati Naik, and children, Jisha and Harsheev along with
rest of the family, for their love and patience. Finally, I owe it to my husband Trushit, for his
constant support and encouragement.
—Shefali Naik
FM_Final.indd 11 3/18/2014 5:02:47 PM
About the Author
Mrs Shefali Naik, the author of this book, is working as a senior faculty member for past 13 years
at School of Computer Studies, Ahmedabad University, Ahmedabad. She teaches subjects related
to Databases, Programming, Systems Analysis and Design, and Software Project Management
at undergraduate and post-graduate levels. She has obtained her Master’s degree in Computer
Applications (M.C.A.) and Bachelor’s degree in science with mathematics as a special subject
(B.Sc., Mathematics) from Ahmedabad, Gujarat.
The author has written few technical papers and articles in the area of databases.
Presently, she is pursuing her Ph.D. from S.P. University,VallabhVidyanagar,Anand, Gujarat,
in the subject of Distributed Databases.
FM_Final.indd 13 3/18/2014 5:02:48 PM
CHAPTER
1.1 | Introduction
In the current era, people of all ages use database in one way or the other. Everyone uses
database in different ways. For example, school children use database of e-mail programs and
mobile phones, youngsters use online movie and railway ticket booking database to book tick-
ets, housewives use database of books to order books online or access various community site’s
database, businessmen use database of airlines to book their trips, academicians use online
journals database to do research work and many more. Nowadays, computers are used every-
where. We may reform the proverb ‘Where there is a will, there is a way!’ as ‘Where there
is a computer, there is a database.’ Computerized Databases have made our life very easy and
comfortable. We can search any place, product, area, thing, etc., with the help of stored data in
a fraction of a second. Stored data processed with the help of database management systems
extracts the desired information, every time. Let us understand the database in some more detail.
1.2 | Data and Information
1.2.1 | Data
Data is a plural of word ‘datum’. In our daily life, we use the word data to describe facts about
any person, event, place or thing. Data are raw facts which may be numbers, values, names,
1
Basics of Database
• Understanding the meaning of data and information.
• Knowing how database and database management systems are useful in organizations to keep
records.
• Examples of database management system.
• Components of database system.
• Characteristics of data and DBMS.
• Differences between file-based management systems.
• Limitations of DBMS.
Chapter Objectives
CH_1_Basics of Database_Final.indd 1 2/26/2014 3:36:03 PM
2 | Chapter 1
dates, etc. When we combine related data, they describe any real-world entity. Related data
means data which belong to the same entity (person, place, event or thing). For example, If
we consider the entity ‘Doctor’ (person type of entity), then doctor’s name, doctor’s address,
doctor’s birth date, doctor’s qualification, doctor’s specialization, etc., are data related to
doctor. We cannot say that supplier’s name and doctor’s qualification are related data;
because both describe two different entities named supplier and doctor. Thus, when we want
to describe any real-world entity, we use data values. Data values alone do not have any
meaning because they are not processed yet.
1.2.2 | Information
When we process related data it gives some information. Information is useful to take deci-
sions, it can be stored for future use, it has some meaning. To obtain information, we need data.
For example, when we process students’ attendance data, we can get a list of students with low
attendance, students who are attending lectures regularly, students who come to college to at-
tend particular lectures, pattern of class bunking for each student, etc.
On the basis of this information, the college may decide the attendance policy, reschedule
the time-table to improve attendance, decide whether to inform parents or not, determine which
students should be allowed to sit for an examination, etc. This information could also be stored
for future use. In case, when students need a transcript, this information can be used to fill up
lecture-wise attendance details of each student or to generate attendance certificates which may
be required along with migration certificates when students change universities.
Data can be stored manually or electronically. Similarly, stored data may be processed manu-
ally or electronically. Table 1.1 shows some examples of data and information.
We can show the relationship between data and information as given in Figure 1.1.
Figure 1.2 shows an example of data and information.
Table 1.1 shows some examples of data, processes which should be applied on stored data
and information which could be obtained after processing certain data.
Table 1.2 shows a student’s examination result data which can be processed as per the follow-
ing condition to obtain grade-wise Result analysis.
Table 1.1 | Examples of Data and Information
Data Process Description Information
Census data Sort records based on area and count
total no. of persons gender-wise and
age group-wise
Area-wise male and female
ratio for different age groups
Board Exam Data Count subject-wise, no. of students
who passed or failed in an exam
Subject-wise total no. of passed
or failed students
Climate Data Maximum temperature and minimum
temperature during the year
Hottest and coldest day of the
year
CH_1_Basics of Database_Final.indd 2 2/26/2014 3:36:03 PM
Basics of Database | 3
If percentage  40 then, Grade = ‘F’
If percentage ≥ 40 and  50 then, Grade = ‘D’
If percentage ≥ 50 and  60 then, Grade = ‘C’
If percentage ≥ 60 and  70 then, Grade = ‘B’
If percentage ≥ 70 then, Grade = ‘A’
The following sample information may be obtained after processing the data given in Table 1.2:
Class-wise Result Analysis
Table 1.2 | Students’ Examination Result Data
Std No. Class Code Std Name Percentage Gender
1 FY Mitali Gupta 89 Female
2 FY Nirav Valera 91 Male
3 FY Jainam Vora 79 Male
4 FY Rajani Vyas 57 Female
5 FY Nidhi Jain 64 Female
1 SY Kartik Bhatt 82 Male
2 SY Kanika Yadav 84 Female
3 SY Karishma Yadav 70 Female
4 SY Siddharth Soni 39 Male
5 SY Akash Patel 69 Male
1 TY Paras Sanghvi 84 Male
2 TY Pankti Bindal 94 Female
3 TY Richa Singh 75 Female
4 TY Neel Shah 59 Male
5 TY Payal Shah 60 Female
Process
Data Information
Figure 1.1 | Relationship between data and information.
Students’ Attendance Data
Percentage of lectures attended by student
Total no. of lectures attended × 100
Total no. of lectures conducted
Data
Process
Information
Figure 1.2 | Example of data and information.
CH_1_Basics of Database_Final.indd 3 2/26/2014 3:36:04 PM
4 | Chapter 1
Class code: FY
No. of students who got ‘A’ Grade: 3
No. of students who got ‘B’ Grade: 1
No. of students who got ‘C’ Grade: 1
No. of students who got ‘D’ Grade: 0
No. of students who got ‘F’ Grade: 0
Class code: SY
No. of students who got ‘A’ Grade: 3
No. of students who got ‘B’ Grade: 1
No. of students who got ‘C’ Grade: 0
No. of students who got ‘D’ Grade: 0
No. of students who got ‘F’ Grade: 1
Class code: TY
No. of students who got ‘A’ Grade: 3
No. of students who got ‘B’ Grade: 1
No. of students who got ‘C’ Grade: 1
No. of students who got ‘D’ Grade: 0
No. of students who got ‘F’ Grade: 0
Overall total no. of students who passed in the exam:14
Overall total no. of students who failed in the exam:1
The above information may be stored and processed further to represent the result analysis
graphically or pictorially using bar charts as represented in Figure 1.3. X-axis will contains
class code and grades, and Y-axis contains total number of students.
1 1 1 1
1 1
0 0 0 0 0 0
FY
3
2.5
1.5
0.5
0
1
2
SY TY
3
3
3
A
B
C
D
E
Figure 1.3 | Bar chart represents class-wise grade-wise total number of students.
CH_1_Basics of Database_Final.indd 4 2/26/2014 3:36:04 PM
Basics of Database | 5
1.3 | database
As the name suggests, database is a collection of data, i.e., database is a storage area where we
can store all related data and process them. To understand the concept of database, let us take
some real-time examples of database (storage). One logical database which we carry with us
all the time is our brain. The brain stores all thoughts, ideas and things which we learn, view,
etc. and it relates them. We can retrieve, change or remove these stored ideas and thoughts any
time. The example of real-time physical database is a grain warehouse. When it is the season
for some grain/pulses, we store them and use them later as per the process requirements. When
we process the grains/pulses we obtain the information in the form of floor, sprouts, etc., which
could be used in further processing to cook food. The pulses/grains which we find useless could
be removed from the warehouse and could be replaced (updated) with fresh stock. In real-life,
we use the concepts of data, information and database everywhere.
Figure 1.4 shows an example of real-life database of children’s’ schoolbag. It is a stationery
database which contains entities such as notebook, textbook, compass box, geometry case, etc.
Entity Notebook has distinguished notebooks of various subjects; Entity Textbook has distin-
guished textbooks of various subjects; Entity Compass box has pencils, erasers, sharpeners,
ruler, etc., and Entity Geometry box has common mathematical tools.
A database is like an electronic storage, which contains computerized data files (entities).
It can contain one or many data
files. Data files contain various
related data within it. Database
should contain accurate, con-
sistent and non-redundant data
which could be shared by differ-
ent application programs. Data
can be related by defining rela-
tionships between proper data.
Also, conditions (constraints)
may be applied on data. Different
users may access different data
sets from the same database by
writing application program. We
may put security and authentica-
tion procedures to provide autho-
rised access of data. There may be
more than one database within a
database management system. All
related entities are kept together
in the same database. Data within database can be retrieved, updated or deleted directly by
database administrator or by authorized users or application programs written by users. To
describe data, other details are stored along with the data such as data type, size, constraints,
description, format, etc. Using this information, the database management software generates
data dictionary which contains ‘data about data’ or ‘metadata’.
Schoolbag: A database
of stationery items
Notebook: An entity
within a database
Geometry box: An
entity within a database
Compass box: An
entity within a database
Textbook: An
entity within a
database
Geometry box: An
fIGure 1.4 | Real-life example of a database.
CH_1_Basics of Database_Final.indd 5 2/26/2014 3:36:04 PM
6 | Chapter 1
Database contains data stored in computer. To process the stored data, we need application
programs. The processed data could be again stored into database for future use. The data, on
which we can do some processing, is known as operational data. Any organization contains
operational data. Table 1.3 contains some examples of organizations and operational data of a
particular organization.
A database stores data of various entities. These entities can be related using relationships.
Data also contains description, which is known as metadata. Along with the data, one can keep
constraints on its data types.
A cylindrical shape, as shown in Figure 1.5, is used to represent physical database. Physical
database is useful for the computer (i.e., how a machine sees data), while logical database is
useful for the user (i.e., how a human being sees data). It is a database of a university, which
contains various related entities, such as course, college, student, class, attendance, exam, etc.
There are many colleges in a university; each college contains many students in different courses
and classes. Students attend lectures, appear in exams and get results.
The ‘University’ database contains interrelated data which could be shared by different ap-
plication programs to obtain meaningful information.
1.3.1 | Components of Database System
Figure 1.6 shows components of any conventional database system.
1. User: User is any person who uses a database or any other object of the database. User
may be of different types and at different levels in an organization. Say for example, the
‘University’ database may be useful for different persons who are directly or indirectly as-
sociated with the university. Following are some categories of users who may use database.
Figure 1.5 | Example of ‘University’ database.
College
Attendance Class
Exam
Student
Course
Table 1.3 | List of Some Organizations and Related Operational Data
Organization Operational Data
Public Library Member data, Books data, Publisher data, etc.
Restaurant Customer data, Employee data, Food Items data, etc.
Super Mall Product data, Customer data, Supplier data, etc.
University Student data, Faculty data, Exam data, etc.
Hospital Patient data, Doctor data, etc.
CH_1_Basics of Database_Final.indd 6 2/26/2014 3:36:05 PM
Basics of Database | 7
a. Naive User, or End-user, or Layman: The clerk of the university uses the ‘university’
database to enter the data of applicants who have applied for various courses and the
same data are retrieved to generate a merit list. The clerk does not know anything about
the technical features of the database or the language, using which data is entered or
retrieved. He is completely unaware about the technology. Therefore, he/she is known as
an end-user or Layman or Naive user. Table 1.4 shows some examples of databases and
end-users of that database.
b. Software Programmer, or Application Programmer, or Application Developer: A soft-
ware programmer is a person who writes application programs or logic in some specific
language to insert, delete, update or fetch data to/from database. An application program-
mer has brief knowledge about database and Query Language which is used for writing
programs. Query Language is a generalized language which is available with all data-
bases. A programmer may or may not have deep understanding about database concepts,
but he/she is able to operate on data stored in the database.
Table 1.4 | Examples of End-users
Database End-user
Online University Database Applicants, Parents, University Staff, etc.
Hotel database Customer, hotel Employees, etc.
Online Railway Reservation
Database
Citizens of the country, Agents, Railway
officials, etc.
Figure 1.6 | Components of database system.
Datafile 1 Datafile 2
Data 1
Data 1
Data 2
Data 2
Data 2
D
a
t
a
f
i
l
e
1
D
a
t
a
f
i
l
e
2
Data2
D
a
t
a
2
D
a
t
a
f
i
l
e
2
D
a
t
a
1
D
a
t
a
2
D
a
t
a
1
User(Software
programmer)
writes programs
to view data
User(DBA) writes
validation programs
and manages
security on
Hardware on which
database is stored
Programs
programs
programs
Programs
programs
programs
Programs
Programs
Datafile 2
CH_1_Basics of Database_Final.indd 7 2/26/2014 3:36:05 PM
8 | Chapter 1
c. Database Designer: A database designer decides about entities (data files) which should
be stored within database, constraints to be applied on data, data types, format and
other specifications regarding data. The database designer is responsible for designing
of data files.
d. Database Administrator: A database administrator (DBA) is the person who is the over-
all in-charge of a database. He/she assigns authorization to users, writes validation proce-
dures, decides backup and recovery policies, and manages users and privileges. In short,
DBA keeps control on database.
2. Hardware: Hardware is a permanent storage where the database is stored. It may be a
hard-disc, or any other secondary memory. One single database may be stored on more
than one storage devices depending on the volume of data stored within the database. For
security purpose, a copy of database could be kept on some other storage device. Besides
storage device, other hardware, such as computer, peripherals, etc., are also required to
perform database-oriented operations.
3. Software (data dictionary management, database schema management, SQL):
Software are programs or applications which are used to access data from database.
These applications reside in DBMS or there may be some applications which could be
interfaced with DBMS to manage data. For example, programming languages are used
to display data on monitor. There are some software programs, which are part of DBMS,
that manage data dictionary or metadata, define schema for the database objects, and are
used to write query on database. The common language available with all the databases
is known as Structured Query Language; if which is popularly known as SQL and
sometimes pronounced as ‘Sequel’.
4. Data: Data is the most important component of a database system. Data is discussed in
detail in Section 1.1. When data is stored in database, it should be stored along with its
definition, data type and size, constraints, such as duplicate values are allowed or not,
possible range of values, formula if it is derived from some other data, etc., display format,
format in which it should be entered, validation rules, etc. Some examples of data
files/entities (tables) and data stored within the entity are given in Tables 1.5, 1.6 and 1.7.
These data files are inter-related data files which are part of the playschool’s database.
Table 1.5 | Example of Data within Data File ‘Kindergarten’
Data Name Data Type (Size) Constraint Input Format Display Format
Data File Name: Kindergarten
KG id Integer Unique number which
Should be generated
automatically.
— —
KG name Character(30) Must be entered. Should be entered
in upper case.
Should be dis-
played in title
case.
Address Character(100) — — —
No. of branches Integer ≥0 — —
Contact no. Integer — — —
Contact person Character (20) — — —
CH_1_Basics of Database_Final.indd 8 2/26/2014 3:36:05 PM
Basics of Database | 9
Table 1.6 | Example of Data within Data File ‘Class’
Data Name Data Type (Size) Constraint Input Format Display Format
Data File Name: Class
Class code Character (3) Must be entered Should be entered
in upper case.
Should be displayed
in upper case.
Class desc. Character (30) — — —
Class capacity Integer 0 and ≤30 — —
No. of divisions Integer 0 and ≤4 — —
Age criteria Float ≥2 — —
Table 1.7 | Example of Data within Data File ‘Class’
Data Name Data Type (Size) Constraint Input Format Display Format
Data File Name: Kindergarten Detail
Class code Character(3) Must be entered Should be entered
in upper case.
Should be displayed
in upper case.
KG id Integer Must be entered — —
Division Character(1) Upper case — —
No. of students Integer 0 and ≤30 — —
Table 1.8 | Example of Data Values within Data File ‘Kindergarten’
KG ID KG Name Address No. of Branches Contact No. Contact Person
Data File Name: Kindergarten
1 Innocent
Flower
Naranpura,
Ahmedabad
1 27417411 Mr S. T. Pandya
2 Smart Kids Navrangpura,
Ahmedabad
3 27477471 Ms K. P. Verma
3 Kids Zone Satellite,
Ahmedabad
4 26306301 Mr A. R. Nair
4 Teacher’s Pet Naranpura,
Ahmedabad
2 27567561 Mr T. R. Khanna
5 Little Star Ambawadi,
Ahmedabad
1 26466461 Ms N. J. Gupta
When data are entered into tables, Kindergarten, Class and Kindergarten Details (Tables 1.5,
1.6 and 1.7 respectively); the correctness of data are checked. Invalid data cannot be entered
into data files.
Tables 1.8, 1.9 and 1.10 contain some valid data values for the tables Kindergarten, Class and
Kindergarten Details, respectively.
CH_1_Basics of Database_Final.indd 9 2/26/2014 3:36:05 PM
10 | Chapter 1
Table 1.9 | Example of Data Values within Data File ‘Class’
The data in a database must have the following characteristics:
●
● Same data should be shared between different applications. For example, if there are two
departments , namely ‘accounts’ and ‘examination’, in a university, then data related to
student should be shared by these two departments. There should be no need to create a
copy of the same data.
●
● When data are shared, there is a question of integration. Integration means, changes in
one data file should also be reflected in the related data file. For example, if a clerk in the
accounts department deletes a record of any student, then it should also be deleted from
‘member data file’ used by the ‘library’ department of that university.
●
● When data are properly integrated, there are minimum chances of inconsistent data.
Data will be consistent if they are integrated properly.
●
● Data should be non-redundant: If possible to avoid duplication of data in different files,
data should be stored in one file, and whenever required, it should be referenced from the
original file. It is not possible to remove redundancy at all, but we should try to avoid redun-
dancy. Redundant data causes inconsistency within a database. For example, if a student’s
address is stored in the ‘enrolment’ file as well as in the ‘alumni’ file, then ‘address’ entry
for the same student would be redundant. Now, when the student’s address is changed,
the clerk changes the ‘address value’ in the ‘student’ file. He forgets to change address in
Class Code KG ID Division No. of Students Class Code KG ID Division No. of Students
Data File Name: Kindergarten Detail Data File Name: Kindergarten Detail
PG 1 1 15 JRKG 2 1 30
PG 1 2 13 JRKG 2 2 30
NUR 1 1 25 JRKG 2 3 30
NUR 1 2 25 JRKG 2 4 30
NUR 1 3 25 SRKG 2 1 30
NUR 1 4 25 SRKG 2 2 30
JRKG 1 1 30 PG 3 1 14
JRKG 1 2 30 PG 3 2 14
JRKG 1 3 30 NUR 3 1 20
JRKG 1 4 30 NUR 3 2 20
SRKG 1 1 30 NUR 3 3 20
SRKG 1 2 30 NUR 3 4 20
PG 2 1 15 JRKG 3 1 30
PG 2 2 10 JRKG 3 2 30
NUR 2 1 25 JRKG 3 3 30
NUR 2 2 25 JRKG 3 4 30
NUR 2 3 25 SRKG 3 1 20
NUR 2 4 25 SRKG 3 2 20
CH_1_Basics of Database_Final.indd 10 2/26/2014 3:36:05 PM
Basics of Database | 11
Table 1.10 | Example of Data Values within Data File ‘Class’
Class Code Class Describe Class Capacity No. of Divisions Age Criteria
Data File Name: Class
PG Play Group 20 2 2
NUR Nursery 25 4 2.5
JRK Junior KG 30 4 3.5
SRK Senior KG 30 4 4.5
the ‘alumni’ file. So, now database will show different addresses for the same table which
is conflicting. This is called ‘data inconsistency’, which occurs due to redundant data.
●
● Data should represent complete details. For example, only customer’s first name entered
in the name field represents incomplete detail. It should contain at least first name of the
customer along with the surname.
1.4 | Database Management
The process of managing data within database is called database management. To manage
database, a database management software/system is required. Database management includes
the following activities:
●
● Writing schema for creating new data files, updating structure of existing data file, delet-
ing a data file.
●
● Setting relationship among data files.
●
● Inserting, deleting and updating data values within data files.
●
● Maintaining data dictionary.
●
● Creating, updating and deleting database objects other than data files, such as views,
synonyms, procedures, functions, triggers, indexes, etc.
1.5 | Database Management System
Database management system is a collection of application programs which is used to man-
age database objects. Database Management System is a generalised software which is used to
manage database and database objects, such as tables, users, procedures, functions, etc., and
to connect database with any front-end (language) with the help of some hardware. Many types
of database management systems are available in the market nowadays. One can purchase
license of any database from its vendor and start using it. Also, there are some open source
database management systems for which there is no license required to use it. It is available
on the Internet. One can download it and use it. The source code is also available for free which
could be modified by any user and redistributed. MySQL is one of the most popular open source
database management system. Table 1.11 contains some examples of database management
system and the vendor company who provides it.
CH_1_Basics of Database_Final.indd 11 2/26/2014 3:36:05 PM
12 | Chapter 1
1.6 | Need for A Database
Following are some reasons for the need of a database:
●
● Database is required for efficient and easy storage, retrieval, updation and deletion of data
records.
●
● Interrelated data should be grouped in one named storage area for easy access. This storage
area may be physical or logical which resides in computer.
●
● For avoiding unnecessary repetition of data values, checking correctness of data by applying
some validation rule, and searching the required information faster thus saving time and ef-
fort, etc.
●
● Database is required for flexibility, i.e., as and when required we can connect the database
with different front-ends.
●
● Once a database is created, it can be shared by many users. Hence, to share data with many
applications a database is required.
●
● Database is needed for storing high volume and complex data, such as documents files, pho-
tographs or images, multimedia data, mobile user’s data, audio and video files.
●
● For managing multi-dimensional data.
●
● Database is required for proper transaction management or transaction handling.
1.7 | File-based Data Management System
File-based data management system is used by programmers to manage data. Languages, such as
C or COBOL contain file management system within it. Figure 1.7 shows a file-based system for
any ‘Playgroup’ in which different data files are used to manage admissions in (a) Nursery, (b)
Junior KG and (c) Senior KG—for which different application programs should be written to
handle different procedures. In file-based systems, data are managed using data files and these
files are created and manipulated by writing application programs. Each application program
contains its own data files.
File-based management system has the following disadvantages:
●
● File-based management system is not appropriate when volume of data is very high.
For example, it will be difficult to handle when daily transactions are in thousands
or more numbers.
●
● When number of data files increase, it becomes very complicated to manage data files,
i.e., if number of data files increase, number of application programs are also increased;
because to insert, update, delete or view data to/from data files, an independent applica-
tion program is to be written.
Table 1.11 | Examples of DBMS and Its Vendors
Database Management System Vendor (Supplier)
Oracle Oracle
SQL Server Microsoft
Access Microsoft
DB2 IBM
CH_1_Basics of Database_Final.indd 12 2/26/2014 3:36:05 PM
Basics of Database | 13
●
● Complex data structures, such as pointers, cannot be handled easily by a file-based
system.
●
● When the same data file is required by different programs at the same time, data sharing
is not possible. To use same files at the same time, copy of that data file must be created
and used. When these are two or more copies of same data file, it may result in inconsis-
tent and redundant data, because changes made in one file may not be carried out in the
other files.
●
● In a file-based system, the programs should only be written in a structured manner.
●
● It is not possible to set relationships between data files. Programs should be written to
relate them.
●
● Security settings cannot be applied on data files.
●
● Set of data files created in a specific file-based system cannot be used with other file-
based systems as storage formats of different file-based systems vary.
Database system is required to overcome the limitations of file-based management system. The
traditional database system contains data files which could be used to store data. The examples
of simple database management system are dBASE and FoxPro. These DBMS contains CUI
(Character-based User Interface) which provides faster access of data using commands. There
is no need to create data files manually. In simple DBMS, data files with data field names and its
data type can be created. However, a simple DBMS does not provide the facility to define keys.
Student
datafile
Applicant
datafile
Enrolment
process
Class
datafile
  
Attendance
datafile
Class
datafile
Student
datafile
Attendance
process
Result
process
Result
datafile
Exam
datafile
Student
datafile
Class
datafile
Figure 1.7 | File-based management system to manage data of ‘Playgroup’.
CH_1_Basics of Database_Final.indd 13 2/26/2014 3:36:06 PM
14 | Chapter 1
As keys cannot be defined, it is not possible to define relationship between data files either. If
user wants to relate data files, then he/she has to write programs to relate two or more file. An
example of such a program is given below in Figure 1.8.
But the advantage of simple DBMS, over file-based system, is that we can share data files be-
tween applications. Simple commands can be used to search, insert, update, delete and view data.
1.8 | Characteristics, or Features, or Advantages
of Database systems
●
● It provides facility to use same data file with different applications, i.e., data can be shared.
As shown in Figure 1.8, ‘Employee’ data file can be used by ‘Accounts’ department to
generate salary slip and by ‘Human-Resource’ department to evaluate the performance
of the employee.
●
● Duplication of data can be minimized. There is no need to enter same data again and
again as data can be shared between different applications.
●
● Proper transaction management is provided by DBMS. When data are shared between
applications, there is a problem of updation when two users try to change same data at
the same time. Data can be changed by only one user at a time. DBMS itself decides the
priority to allow only one user to change the data at a time. The priority is decided by the
DBMS software on the basis of some algorithms. In this way, DBMS handles transac-
tions more efficiently than the file-based management system.
●
● There is no need to write long programs to manage data. It can be done by writing a
simple single line command using structured query language, which is the generalized
language provided with DBMS software.
●
● It is easy to maintain data file structures in DBMS using structured query language.
●
● Data can be integrated easily, i.e., change in one data is reflected automatically in the
related data file’s data. For example, if we delete any record from ‘Customer’ table, the
related child records from ‘Purchase Order’ data file will be deleted.
●
● Data inconsistency can be avoided. As data are integrated, user is not bothered about up-
dation of same data in different data files. It is handled by the database software. In this
way, data will be consistent.
●
● User management becomes easier. There may be many users of the same database who
may access the database from local or remote machines. By providing user rights and
authorization checks, the DBMS can control and restrict users.
Accounts
department
Human-resource
department
Employee
data file
Figure 1.8 | Example of data file of DBMS which is shared by various departments in an
Organization.
CH_1_Basics of Database_Final.indd 14 2/26/2014 3:36:06 PM
Basics of Database | 15
Table 1.12 | File-based Management System vs. Database Management System
File-based Management System Database Management System
Needs individual application program to per-
form any operation on data file.
Any operation on data file is done using
single-line commands.
Programming is done using 3GL (Third Genera-
tion Languages, such as COBOL, C, PASCAL).
Programming is done using 4GL (Fourth
Generation Languages such, as SQL-
Structured Query Language).
Transaction management is very difficult. Transaction management is easy.
Same data file cannot be used simultaneously. Same data file can be used simultaneously.
Security features cannot be enforced. Security features can be enforced.
Backup and recovery facility is not available. Backup and recovery facility is available.
Duplication of data cannot be minimized. Duplication of data can be minimized.
Examples: C, COBOL, PASCAL languages’ file
management system.
Example: dBASE, FoxPro, MS Access, Oracle.
●
● Validation rules can be applied on data before data is entered in the database. It will pre-
vent wrong data inputs.
●
● Change in data file structure becomes very easy.
●
● Security can be enforced on data by assigning privileges for different users.
●
● Appropriate backup procedure is available to avoid loss of data in any adverse circum-
stances, such as power failure, server failure, hardware crash. In case of failure, the data
can be recovered using recovery procedures.
●
● DBMS provides Import and Export facility using which data files can be imported from
one DBMS and exported to another.
Table 1.12 shows the difference between file-based management system and database manage-
ment system.
1.9 | Limitations of Database
Nothing is 100% perfect. Advantages also bring along limitations with them. Database manage-
ment system also has some limitations. They can be described as:
●
● Cost of database management system is very high. As the number of users increase, we
need to pay more.
●
● To install database in a network, high-end hardware and skilled personnel to manage the
network and database is required.
●
● As data can be shared through DBMS, it is difficult to control and keep track of data ac-
cessed by users. Proper encryption and decryption techniques are required to secure data
over a network.
●
● Efficient employees are required to handle users and decide policies about data access,
which requires considerable and constant training.
CH_1_Basics of Database_Final.indd 15 2/26/2014 3:36:06 PM
16 | Chapter 1
●
● If data volume is very high, performance will be poor. Also, when too many users are
using database at the same time, it may generate traffic on network and slow down the
response time.
●
● It will be more complex when DBMS contains many databases within it. It may reduce
the speed of data access.
Summary
●
● Data means raw facts. It may be any values, such as integer numbers, float numbers,
characters, dates, images, Boolean.
●
● Examples of integer type of data are roll numbers form number, order number; float type
of data are salary, balance amount, fees, product price; character type of data are person’s
name, address, qualification, product name; date type of data are birth date, admission
date; retirement date, order date; image type of data are person’s photo, image of property
location, image of property; Boolean type of data are customer status, payment status,
gender.
●
● Interrelated data represent any entity, i.e., data are characteristics of entity. For example,
student name, student birth date and student gender are data (characteristics) related to
student entity. An entity is a distinguishable object of real-world.
●
● Data related to an entity are kept together in a data file, i.e., data file is a collection of
related data.
●
● Data may be stored manually or electronically. When we apply any process on stored
data, it gives some valuable information. The process on data stored electronically can be
applied by writing application programs.
●
● The data on which we do some operation, is known as operational data. Operational
data belongs to any organization. For example, student’s data is an operational data for
the ‘University’ organization. By processing student’s data, we can generate information
like a student’s mark sheet, list of college-wise total number of students, etc.
●
● Database is a collection of data files or tables which contain data within it. Relationship
can be set to access data from different files.
●
● The process of managing data within database is called database management.
●
● Database system contains the components data, user, hardware and software.
●
● Using database we can share and integrate data between applications.
●
● Database management system is a collection of software programs through which
database can be managed.
●
● File-based management system requires manual creation of data files which are very dif-
ficult to handle. Within file-based management system, independent programs should be
written to do operations such as insert, delete, update and view data.
●
● Database management system provides structured query language to store and access data
from database. There is no need to write long programs to access data. Data redundancy
and data inconsistency problems can be avoided using database management system.
CH_1_Basics of Database_Final.indd 16 2/26/2014 3:36:06 PM
Basics of Database | 17
●
● Database management system provides automatic transaction management, backup and
recovery facility, export and import facility, user management and other functionalities.
●
● The limitations of database management systems are: they are complex, expensive,
requires knowledge to use them, data control is difficult, performance may suffer because
of high data volume, etc.
Exercises
1. Define Data and Information. Show relationship between these two.
2. Give any two examples of data. Write any two types of information which could be ob-
tained by processing these data.
3. Define the terms:
a. Database
b. Database management
c. Database management system
d. Operational data
e. Metadata
4. For any restaurant system, which data are operational data? Write two examples of infor-
mation related to that.
5. Draw a diagram of components of database system and explain.
6. List down different types of users of database system with their roles.
7. Name any four DBMS along with their supplier company.
8. What is an open source database? Give an example.
9. Which are the characteristics or features of data in a database?
10. Write a short note on file-based management system.
11. Give an example of file-based management system. Mention the disadvantages of this
system.
12. List down and explain advantages of database management system over file-based man-
agement system.
13. What are the limitations of database management system?
14. Discuss data redundancy and data inconsistency with relevant example.
15. Write/Tick the correct answer.
i. Data means:
		 a. Unprocessed facts			 b. Processed facts
		 c. Unprocessed information		 d. Processed information
ii. The operational data related with ‘Hostel’ are:
		
a. Mess data				b. Customer data
		
c. Patient data				d. Doctor data
iii. DBMS is an abbreviation of ______________.
		 a. Database Management System b. Distributed Management System
		 c. Data Management System		 d. Database Modification System
CH_1_Basics of Database_Final.indd 17 2/26/2014 3:36:06 PM
18 | Chapter 1
iv. Database contains data files or tables.
		
a. True				b. False
v. Data represents ______________ of an entity.
		 a. Relationship			 b. Definition
		
c. Type				d. Characteristics
vi. DBMS supports structured query language (SQL) which is _________.
		
a. 1GL				b. 2GL
		
c. 3GL				d. 4GL
vii. The user who does not know working of a database is called _____________.
		
a. End-user				b. Database Designer
		
c. DBA				d. System Analyst
viii. _____________ is responsible for overall control of database.
		 a. Data Analyst			 b. Database Administrator
		 c. Programmer			 d. End-user
ix. Among the following, which one is not a component of database system?
		
a. Hardware				b. Data
		
c. Software				d. None
x. Data redundancy causes ________________ data in database.
		
a. Accurate				b. Complete
		
c. Meaningful				d. Duplicate
CH_1_Basics of Database_Final.indd 18 2/26/2014 3:36:06 PM
CHAPTER
2
Data Models and Architecture
of DBMS
• Evolution of data models.
• Knowing the traditional data models.
• Advantages and disadvantages of various types of data models.
• Three-level architecture of database management system.
• Understanding languages used to define objects, manage and control data and transaction.
Chapter Objectives
2.1 | Evolution of Data Models
●
● Data are the primary requirement of any application. It is important to store data appropri-
ately for easy access. During the 1940s and 1950s, use of computer to write applications
in programming language for automation increased. The file-based management system
was not sufficient to manage data. Hence, evolution of data models took place. Figure 2.1
shows the block diagram of evolution of data models from manual record keeping system
to file-based management system, and from file-based management system to database
management system.
●
● COBOL (Common Business-oriented Language) and FORTRAN (Formula Translation)
were two primary programming languages used to create enterprise applications during
the 1950s. The file systems of these languages were not able to handle data which are
required by the applications developed in these languages.
●
● Therefore, in the 1960s, IBM and Rockwell International developed a hierarchical data-
base system named IMS (Information Management System). Later, C.W. Bachman pro-
posed Network Data Model and, on the basis of this model, General Electric developed
a network database model named IDS (Integrated Data Store). Both IMS and IDS were
accessible from the programming languages using an interface. Using these database
systems, application development and data management within application had become
easy, but a complex task.
CH_2_Data Models and Architecture of DBMS_Final.indd 19 2/26/2014 3:37:02 PM
20 | Chapter 2
Manual record keeping
Manual record keeping
Manual record keeping
Manual record keeping
Manual record keeping
Data kept manually
.
.
.
Data stored in computerized
file using file-based management
system
Data stored in database using
database management system
Figure 2.1 | Evolution from manual record keeping system to file-based management
system and, from file-based management system to database management system.
●
● In 1970, Edgar F. Codd proposed a different data model, in which he had suggested that
data in a database could be represented as a two-dimensional table structure, which is
known as relation, and could be accessed without writing lengthy programs to access
data. This model is known as relational data model. Nowadays, many vendors provide
relational database management systems. Some well-known RDBMS are MS-Access and
MS-SQL Server provided by Microsoft; Oracle provided by Oracle; DB2 provided by
IBM, and many more.
●
● Along with RDBMS, the object-oriented concept evolved. The use of object-oriented
programming languages increased in the 1980s, and along with it increased the need
of a database system which would be able to handle classes and objects. Thus, evolved
the object-oriented data model. Many vendors had developed OODBMSs namely Gem-
Stone, ObjectDesign, Versant, O2, Objectivity, etc.
●
● Extensive use of object-oriented languages resulted in an object-relational DBMS
which is a combination of object-oriented and relational DBMS. Many vendors, such as
Oracle, IBM, provided functionalities of object-oriented concepts in their RDBMS (see
Figure 2.2).
CH_2_Data Models and Architecture of DBMS_Final.indd 20 2/26/2014 3:37:03 PM
Data Models and Architecture of DBMS | 21
Data Models
Hierarchical
Example: IMS,
Mark IV
Network
Example: IDS, DMS
1100
Relational
Example: QBE,
MAGNUM,
Oracle
Object-oriented Object-relational
Example: OPAL Example: Oracle
Figure 2.2 | Data models.
2.2 | Hierarchical Data Model
●
● The data model describes data and its definition. In case of an object-oriented data model,
it describes the object and its behaviour. A data model is a logic which is based on con-
cepts, while its implementation is called, ‘database management system’, i.e., database
management system is a physical implementation of data model. Entity-relationship
model is a conceptual model which shows entities and relationships between entities.
●
● The hierarchical data model was the very first data model developed in the 1960s. The
hierarchical data model named IMS (Information Management System) was developed
by IBM and Rockwell Company and widely used during the 1960s and1970s. The enti-
ties and relationships between entities were managed with the help of a tree-like structure
in the hierarchical model. In this tree, there exists a root and it is related with its child. A
root is known as a parent. One parent may have many children in hierarchical structure,
but one child cannot have more than one parent, i.e., if there is a child entity which is
related with more than one parent entities, then two independent parent nodes should be
created which contains redundant child records. The redundant child records should be
linked with both the parents. On root, there will be entity occurrences from the parent
entity. One entity occurrence means one segment. If this segment is on the root, it is
called root segment. The entity occurrence, which falls under the root segment (parent),
is known as dependent segment (child), i.e., collection of entity occurrences are called,
‘segments’. Root segment and dependent segments are connected through link. In a
hierarchical structure, one root segment may have many dependent segments, but a de-
pendent segment will have only one root segment. To explain this, many-to-many rela-
tionship between root and dependent segments is not possible in a hierarchical structure.
●
● Entity occurrence from parent entity is shown as a root segment, and its related entity
occurrences are shown as its dependent segments. The entity occurrences of same entities
are shown at the same level in a tree. The related entity occurrences, which fall under it,
are its branch.
●
● To give an example, consider the entities given in Figures 2.3 and 2.4. Figure 2.3 contains
entities Zone, Region, Item and Area; while Figure 2.4 contains entities as Salesman and
Sales. All the entities are related with the following relationships with each other.
CH_2_Data Models and Architecture of DBMS_Final.indd 21 2/26/2014 3:37:03 PM
22 | Chapter 2
●
● Figures 2.3 and 2.4 represents the following entities:
○
○ Zone
○
○ Region
○
○ Area
○
○ Item
○
○ Salesman
○
○ Sales
Region
Region ID Region Name Zone ID
1 Punjab 1
2 Himachal Pradesh 1
3 Gujarat 4
4 Maharashtra 4
5 West Bengal 2
6 Kerala 3
7 Karnataka 3
8 Andhra Pradesh 3
9 Rajasthan 4
10 Bihar 2
11 Assam 2
13 Jammu and Kashmir 1
Zone
Zone ID Zone Name
1 North
2 East
3 South
4 West
Item
Item No Item Desc. Price (in `)
1 Bulldozer 200000
2 Soil Stabilizer 300000
3 Scraper 350000
4 Excavator 200000
5 Dump Truck 150000
Area
Area Code Area Name Region ID
1 Ludhiana 1
2 Amritsar 1
3 Bilaspur 2
4 Shimla 2
5 Hamirpur 2
11 Calicut 6
12 Cochin 6
13 Munnar 6
14 Patiala 1
31 Anantnag 13
32 Srinagar 13
33 Ahmedabad 3
34 Udhampur 13
44 Surat 3
55 Baroda 3
61 Kolkata 5
62 Darjeeling 5
63 Baranagar 5
71 Patna 10
72 Nalanda 10
73 Vaishali 10
81 Guwahati 11
82 Digboi 11
83 Sibsagar 11
111 Bangalore 7
112 Mysore 7
113 Coorg 7
121 Hyderabad 8
122 Vishakhapatnam 8
123 Vijaywada 8
131 Pune 4
132 Mumbai 4
133 Nashik 4
141 Jaisalmer 9
142 Jodhpur 9
143 Bikaner 9
Figure 2.3 | Entities Zone, Region, Area, and Item.
CH_2_Data Models and Architecture of DBMS_Final.indd 22 2/26/2014 3:37:03 PM
Data Models and Architecture of DBMS | 23
Salesman
Salesman ID Salesman Name Area Code
1 A. P. Singh 1
2 K. N. Kapoor 1
3 R. K. Chopra 2
4 P. G. Singh 2
5 S. N. Pathan 3
6 R. K. Khan 3
11 S. R. Trivedi 4
12 P. K. Jain 4
21 T. P. Khan 5
22 A. R. Khan 5
29 D. C. Khanna 31
30 P. T. Mehra 31
51 A. K. Garoo 34
52 D. N. Brave 34
61 T. N. Khan 32
62 A. P. Mishra 32
101 P. K. Damani 141
102 A. R. Agrawal 141
109 P. F. Karnik 131
110 A. M. Panzade 131
111 S. R. Sukhadiya 143
112 V. R. Jain 143
123 S. D. Sharma 142
124 K. K. Jain 142
145 S. E. Tendulkar 132
146 V. V. Manjrekar 132
147 P. N. Khedekar 132
165 A. R. Narayan 112
175 R. Benerjee 61
176 S. Tagore 61
178 L. M. Srinivasan 113
183 T. Ray 62
184 M. Ghosh 62
187 F. Srivastava 63
188 V. Jain 71
189 T. Chaterjee 71
190 S. B. Pillai 12
191 A. R. Nair 11
221 K. Yadav 81
222 G. F. Mishra 133
223 J. J. Raina 133
231 T. R. Naik 44
232 S. V. Joshi 44
261 A. F. Ghoshal 13
271 M. N. Shah 33
272 T. N. Sanghvi 33
273 A. A. Pathak 33
281 S. G. Gupta 55
282 K. D. Mistry 55
331 S. Chattopadhyay 82
81 D. Mathur 83
991 S. Mudaliar 111
Salesman No. Item No. Total_Qty_Sold
1 1 2
1 2 1
1 3 2
2 1 2
2 2 2
3 1 2
3 3 2
4 1 4
4 3 5
5 1 4
5 2 3
6 4 2
6 5 3
11 1 2
11 5 7
12 2 3
12 3 4
29 3 2
29 4 4
30 1 4
30 2 3
51 4 3
51 5 2
52 1 10
52 2 3
52 3 1
52 4 7
52 5 3
61 1 1
62 3 2
62 5 2
101 1 2
102 2 3
109 4 3
110 5 2
111 1 3
112 1 3
123 3 2
124 4 1
145 1 1
146 1 2
147 4 3
165 2 3
175 1 3
176 1 5
178 1 2
183 1 1
184 2 2
187 2 2
188 2 2
189 1 1
Figure 2.4 | Entities, Salesman, and Sales.
CH_2_Data Models and Architecture of DBMS_Final.indd 23 2/26/2014 3:37:04 PM
24 | Chapter 2
●
● The entities as shown in Tables 2.3 and 2.4 are related with the following relationships:
○
○ Each Zone contains many Regions (1 Zone–Many Regions)
○
○ Each Region contains many Areas (1 Region–Many Areas)
○
○ Each Area contains many Salesman (1 Area–Many Salesman)
○
○ Each Salesman sells many Items, and each Item is sold by many Salesman. (1 Salesman–
Many Items and Many Salesman–1 Item, i.e., many-to-many relationship between
Salesman and Item).
●
● Figure 2.5 shows the hierarchical model which represents the entities of Figures 2.3
and 2.4.
●
● Hierarchical data model can represent one-to-many relationships very effectively, but it
is not possible to represent many-to-many relationship because a child can have only one
parent in hierarchical model.
●
● To solve this problem, many-to-many relationship should be represented as two indepen-
dent trees. For example, to represent the relationship, ‘Each Salesman sells many Items
and each Item is sold by many Salesmen.’; the first tree will have Salesman as parent and
Item as child, and the second tree will have Item as parent and Salesman as Child. These
two different scenarios are shown in Figures 2.6(a) and 2.6(b).
●
● The hierarchical data model has the following advantages and disadvantages.
Advantages:
1. It is easy to understand.
2. The one-to-many relationship can be handled quite effectively.
Disadvantages:
1. It is not possible to insert a dependent record without inserting a parent record. For ex-
ample, as shown in Figure 2.6(b), it is not possible to insert the details of any item until
it is been sold by any Salesman. Similarly, as shown in Figure 2.6(a), it is not possible to
insert the details of any Salesman until he supplies any item.
Figure 2.5 | The hierarchical model.
1
2
Level 0 - Root Segment: ZONE
Level 1: Child
Segment: Region
Himachal Pradesh Jammu  Kashmir
Ludhiana Amritsar Patiala Level 2: Child
Segment: Area
Level 3: Child
Segment: Salesman
Level 4: Child
Segment: Items Sold
A. P. Singh K. N. Kapoor R. K. Chopra P. G. Singh
Bulldozer Soil Stabilizer Stomper
Quantity
sold
North
1
1
1
1 2 2 1
2 3 4
2 14
3
Punjab
3 2
CH_2_Data Models and Architecture of DBMS_Final.indd 24 2/26/2014 3:37:04 PM
Data Models and Architecture of DBMS | 25
A. P. Singh
K. N. Kapoor
R. K. Chopra
P. G. Singh
S. N. Pathan
S. R. Trivedi
D. N. Brave
T. N. Khan
P. T. Mehra
S. E. Tendulkar
V. V. Manjrekar
P. K. Damani
S. R. Sukhadiya
V. R. Jain
G. F. Mishra
J. J. Raina
A. A. Pathak
T. N. Sanghvi
T. R. Naik
A. F. Ghoshal
R. Benerjee
S. Tagore
T. Ray
T. Chaterjee
K. Yadav
S. Chattopadhyay
1
2
2
2
4
4
2
10
1
4
1
2
2
3
3
1
2
1
1
2
3
2
3
5
1
1
3
4
Bulldozer
L. M. Srinivasan
A. P. Singh
K. N. Kapoor
R. K. Chopra
P. G. Singh
S. N. Pathan
D. N. Brave
A. P. Mishra
D. C. Khanna
S. D. Sharma
S. G. Gupta
A. R. Nair
S. B. Pillai
3
2
2
5
5
3
4
1
2
2
2
2
4
1
A. P. Singh
K. N. Kapoor
S. N. Pathan
S. R. Trivedi
D. N. Brave
P. T. Mehra
P. K. Jain
P. K. Jain
2
1
2
3
6
3
3
3
3
2
3
3
3
2
2
2
4
Soil Stabilizer Stomper
Excavator Dump Truck
A. P. Mishra
A. M. Panzade
S. Mudaliar
Quantity
A. R. Agrawal
M. N. Shah
S. V. Joshi
K. D. Mistry
A. R. Narayan
M. Ghosh
F. Srivastava
V. Jain
D. Mathur
R. K. Khan
A. K. Garoo
A. K. Garoo
D. N. Brave
D. C. Khanna
P. F. Karnik
P. N. Khedekar
K. K. Jain
4
2
3
7
4
1
3
3
R. K. Khan
S. R. Trivedi
D. N. Brave
4
3
7
2
3
2
2
1
(a)
Bulldozer
A. P. Singh
Soil Stabilizer
Stomper
1
2
1
2
Bulldozer
K. N. Kapoor
Soil Stabilizer
Stomper
2
2
2
5
Quantity
(b)
Figure 2.6 | (a) A tree representing item supplied by various salesman; (b) A tree representing
salesman supplies various items.
CH_2_Data Models and Architecture of DBMS_Final.indd 25 2/26/2014 3:37:04 PM
26 | Chapter 2
2. If we delete any root segment, then the dependent segments which falls under it, are also
deleted. For example, refer to Figure 2.6(a), if we delete root segment of the item Bulldozer,
then all the Salesmen, who have supplied Bulldozer, will also be deleted. As a result, the
Salesman who has sold only Bulldozer will be permanently deleted from the hierarchy
model. His record will be inserted again, only when he will supply some other item.
3. It is difficult to update any Child segment. As the number of segment increases, the tree
becomes extremely complex.At that time, it is very cumbersome to search for any segment
and update it, i.e., to search the last dependent segment of the last root segment of a tree,
one has to traverse all the dependent segments of all the root segments.
4. The hierarchical model can represent only the one-to-many (1: M) relationship. Here, the
many-to-many relationship causes redundant data.
2.3 | Network Data Model
●
● The Network data model represents data using link between records. The parent record
is called Owner Record, and the child record is called Member Record. If the Owner
and Member records are related with the many-to-many relationship, then they are con-
nected through connector record which is known as Set. The entities, given in Figures 2.4
and 2.5, are represented as a network model as shown in Figure 2.7.
●
● Figure 2.7 shows part of a network model, where:
○
○ Zone records are Owner records of Region records and Region records are Member
records.
○
○ Region records are Owner records of Area records, and Area records are Member re-
cords of Region.
○
○ Area records are Owner records of Salesman records, and Salesman records are
Member records of Area.
○
○ Salesman records are Owner records of Item records, and Item records are Member
records of Salesman which are connected through the ‘Set’ Sales. Sales record is a con-
nector record between Salesman and Item.
Bulldozer 200000 Soil Stabilizer Stomper 350000
North
1
Punjab HP J  K
1
Ludhiana
1
2 3
Amritsar
2 Patiala
14
A. P. Singh
1 K. N. Kapoor
2 R. K. Chopra
3
1 1 2 1 2 1 1 3 2
1 2 3
P. G. Singh
4
300000
Figure 2.7 | The network model.
CH_2_Data Models and Architecture of DBMS_Final.indd 26 2/26/2014 3:37:04 PM
Data Models and Architecture of DBMS | 27
●
● The Owner record is linked with the first Member record, the first member record is
linked with the second Member record, and the second Member record is linked with the
third Member record, and so on up to the last Member record. The last Member record is
again linked with the Owner record. Management of the many-to-many relationship in a
network model is quite simple.
●
● Following are the advantages and disadvantages of a network model.
Advantages:
1. The many-to-many relationships can be represented more easily in a network data model
than that of a hierarchical data model.
2. The network data model supports Data Definition Language and Data Manipulation
Language.
3. To insert data of a new Item, say item no. 6, we would need to create a new Item record.
There will be no connector record for the new Item until it is sold by any Salesman. Item
no. ‘6’ will contain a single link from Item no. ‘6’ to Item no. ‘6’ itself, initially.
Disadvantages:
1. Searching is more complicated than hierarchical model in network model because of its
complex data structure.
2. The DML is also very complex as there are many constructs, such as records and links.
2.4 | Relational Data Model
The concept of relational model was given by E. F. Codd, in 1970, in his landmark paper on
relational data model. In the relational model, data are represented in a tabular form which is
called, relation (table), and they are associated with relationships. Therefore, the name of this
model is relational data model. Each entity is converted into relation and association is handled
through primary and foreign keys. The detailed explanation of relational model is given in
Chapter 3. Each entity occurrence is known as tuple (record) and characteristic of an entity
is called an attribute (column). It is very easy to represent many-to-many relationship using
relational data model. The relational model is widely used worldwide, nowadays, to store data.
Figures 2.8 and 2.9 show the relational model of data as shown  in Figures 2.3 and 2.4. All the
relations are associated, with each other as listed here:
●
● Relation Zone is related with Region through ‘zone id’.
●
● Relation Region is related with Area through ‘region id’.
●
● Relation Area is related with Salesman through ‘area code’.
●
● Relation Salesman is related with Sales through ‘salesman id’.
●
● Relation Item is related with Sales through ‘item id’.
For relations:
●
● Zone—‘zone id’ is a primary key which is referred in Region relation.
●
● Region—‘region id’ is a primary key which is referred in Area relation, and ‘zone id’ is
referenced from Zone relation in Region relation.
●
● Area—‘area code’ is a primary key which is referred in Salesman relation and ‘region id’
is referenced from Region relation in Area relation.
CH_2_Data Models and Architecture of DBMS_Final.indd 27 2/26/2014 3:37:04 PM
28 | Chapter 2
●
● Salesman—‘salesman id’ is a primary key which is referred in Sales relation and ‘area
code’ is referenced from Area relation in Salesman relation.
●
● Sales—Combination of ‘salesman id’ and ‘item id’ is a primary key. ‘Salesman id’
is referenced from Salesman and ‘item id’ is referenced from Item relation in Sales
relation.
Region
Region ID Region Name Zone ID
1 Punjab 1
2 Himachal Pradesh 1
3 Gujarat 4
4 Maharashtra 4
5 West Bengal 2
6 Kerala 3
7 Karnataka 3
8 Andhra Pradesh 3
9 Rajasthan 4
10 Bihar 2
11 Assam 2
13 Jammu and Kashmir 1
Zone
Zone ID Zone Name
1 North
2 East
3 South
4 West
Item
Item No. Item Desc. Price (in `)
1 Bulldozer 200000
2 Soil Stabilizer 300000
3 Scraper 350000
4 Excavator 200000
5 Dump Truck 150000
Area
Area Code Area Name Region ID
1 Ludhiana 1
2 Amritsar 1
3 Bilaspur 2
4 Shimla 2
5 Hamirpur 2
11 Calicut 6
12 Cochin 6
13 Munnar 6
14 Patiala 1
31 Anantnag 13
32 Srinagar 13
33 Ahmedabad 3
34 Udhampur 13
44 Surat 3
55 Baroda 3
61 Kolkata 5
62 Darjiling 5
63 Baranagar 5
71 Patna 10
72 Nalanda 10
73 Vaishali 10
81 Guwahati 11
82 Digboi 11
83 Sibsagar 11
111 Bangalore 7
112 Mysore 7
113 Coorg 7
121 Hyderabad 8
122 Vishakhapatnam 8
123 Vijaywada 8
131 Pune 4
132 Mumbai 4
133 Nashik 4
141 Jaisalmer 9
142 Jodhpur 9
143 Bikaner 9
Figure 2.8 | Relations Zone, Region, Area and Item.
CH_2_Data Models and Architecture of DBMS_Final.indd 28 2/26/2014 3:37:04 PM
Data Models and Architecture of DBMS | 29
Sales
Salesman ID Item ID Total_qty_Sold
1 1 2
1 2 1
1 3 2
2 1 2
2 2 2
3 1 2
3 3 2
4 1 4
4 3 5
5 1 4
5 2 3
6 4 2
6 5 3
11 1 2
11 5 7
12 2 3
12 3 4
29 3 2
29 4 4
30 1 4
30 2 3
51 4 3
51 5 2
52 1 10
52 2 3
52 3 1
52 4 7
52 5 3
61 1 1
62 3 2
62 5 2
101 1 2
102 2 3
109 4 3
110 5 2
111 1 3
112 1 3
123 3 2
124 4 1
145 1 1
146 1 2
147 4 3
165 2 3
175 1 3
176 1 5
178 1 2
183 1 1
184 2 2
187 2 2
188 2 2
189 1 1
Salesman
Salesman ID Salesman Name Area Code
1 A. P. Singh 1
2 K. N. Kapoor 1
3 R. K. Chopra 2
4 P. G. Singh 2
5 S. N. Pathan 3
6 R. K. Khan 3
11 S. R. Trivedi 4
12 P. K. Jain 4
21 T. P. Khan 5
22 A. R. Khan 5
29 D. C. Khanna 31
30 P. T. Mehra 31
51 A. K. Garoo 34
52 D. N. Brave 34
61 T. N. Khan 32
62 A. P. Mishra 32
101 P. K. Damani 141
102 A. R. Agrawal 141
109 P. F. Karnik 131
110 A. M. Panzade 131
111 S. R. Sukhadiya 143
112 V. R. Jain 143
123 S. D. Sharma 142
124 K. K. Jain 142
145 S. E. Tendulkar 132
146 V. V. Manjrekar 132
147 P. N. Khedekar 132
165 A. R. Narayan 112
175 R. Benerjee 61
176 S. Tagore 61
178 L. M Srinivasan 113
183 T. Ray 62
184 M. Ghosh 62
187 F. Srivastava 63
188 V. Jain 71
189 T. Chaterjee 71
190 S. B. Pillai 12
191 A. R. Nair 11
221 K. Yadav 81
222 G. F. Mishra 133
223 J. J. Raina 133
231 T. R. Naik 44
232 S. V. Joshi 44
261 A. F. Ghoshal 13
271 M. N. Shah 33
272 T. N. Sanghvi 33
273 A. A. Pathak 33
281 S. G. Gupta 55
282 K. D. Mistry 55
331 S. Chattopadhyay 82
81 D. Mathur 83
991 S. Mudaliar 111
Figure 2.9 | Relations salesman and sales.
CH_2_Data Models and Architecture of DBMS_Final.indd 29 2/26/2014 3:37:05 PM
Exploring the Variety of Random
Documents with Different Content
Concepts of Database Management System 1st Edition Shefali Naik 2024 scribd download
Concepts of Database Management System 1st Edition Shefali Naik 2024 scribd download
The Project Gutenberg eBook of He who
served
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.
Title: He who served
Author: Ray Cummings
Illustrator: Alex Schomburg
Release date: August 1, 2024 [eBook #74165]
Language: English
Original publication: New York, NY: King-Size Publications, Inc, 1954
Credits: Greg Weeks, Mary Meehan and the Online Distributed
Proofreading Team at http://www.pgdp.net
*** START OF THE PROJECT GUTENBERG EBOOK HE WHO SERVED
***
Concepts of Database Management System 1st Edition Shefali Naik 2024 scribd download
He Who Served
By Ray Cummings
This surely was the blackest of
crimes—to be newly built, and
lead the blind, and be a friend
beyond all human understanding.
[Transcriber's Note: This etext was produced from
Fantastic Universe September 1954.
Extensive research did not uncover any evidence that
the U.S. copyright on this publication was renewed.]
Ray Cummings has delighted two generations of
science fantasy readers with his unforgettable
tales of the infinitely small and the infinitely
large. We are all atom conscious today, but Ray
was the first to discern the realms of gold
spinning in miraculous splendor far below the
threshold of the visible. He has explored newer
realms here, in a story so human and heart-
warming you won't be ashamed to shed a tear
on completing it.
2 RY could remember the quick bright warmth of the afternoon sun
on his burnished copper and silvery plating. He could remember
every prideful moment of his early training in the big yard of the
James Erg factory. Every afternoon, at first only in good weather, he
and others of the newly-built had been taken into the yard from the
quiet dimness of the storeroom indoors. Not only was he the largest,
the finest robot of them all, but he was the most intricately
constructed and the most adept at complicated tasks. And he had
been the first of the newer models to be trained.
There were only twenty-five others of Model 2 RY under construction
—the supreme achievement of the genius of James Erg, the
culmination of a lifetime of work. For a quarter of a century no other
robot-builder had been able to compete with the world famous Erg
product.
The big Erg factory in the suburbs of New York dominated the world
market, its products ranging from modest one-task models up to the
most elaborate. Model 2 RY was now the most elaborate, costing
two hundred and fifty thousand dollars. It was guaranteed slow-
trained over a full two year period. The training included, of course,
additional instruction for any specialized tasks desired by its
purchaser; and association with the members of his family so that
the timbre of their human voices would produce no untoward
reactions.
2 RY was big, just under seven feet. His frozen countenance, with its
square-cut contours, and faceted eyes, and his sturdy body-box gave
him the aspect of a rough-hewn statue, but was in no way
grotesque. His voice, hollow yet with several emotional gradations to
it, was soft and pleasing. He could remember that the human voice
of the Instructor was very much like his own—gentle and quiet, and
beguiling in its infinite patience.
2 RY had been taught just simple things at first. Toory, come here.
He had learned to balance upright the first day. Come, Toory. Stand
here by me. With his great jointed legs swinging, and sometimes
clanking because of his untrained awkwardness, Toory would obey.
Very good, Toory. Now—sit down. Flat—all the way down. That's it,
Toory.
How patient the man had remained! Now—raise your right hand.
No, not that one. The right hand, Toory. That's splendid!
And when he failed to realize he had made a mistake, the question
would come again. You're using your left hand. Do you understand,
Toory?
Yes, Toory would say.
He could remember every glorious moment of those two years.
Outdoors in rainy weather, with the rain dimming his eye-lenses so
that he had to learn to polish them with a bit of fabric. And more
often in cold weather when all his motions seemed to require more
effort. His reactions then would be slower if he did not automatically
quicken them. Quite as varied were the many tasks indoors in the
training rooms. They were mostly domestic tasks, because Toory had
been designed essentially, not for factory or business work, but for
the home.
At last he realized that his training was over, and one day soon after
that, his prospective purchaser came. His name was Robert Doret.
He was a wealthy man and an important one. The faint, red-glowing
beams from Toory's eyes, deep-set under his ridged brows, gazed
down in apprehension at the man who perhaps might buy him.
So you're trained to be called 'Toory'? Robert Doret asked. Is that
correct?
Yes, Toory replied, striving to remain calm.
You're right, Doret said to James Erg, who stood beside him.
Quite a pleasant, well-modulated voice. Certainly far more human-
sounding than the other models.
Try him on emotion, Erg suggested.
Doret thought a moment. I'm not sure I'm entirely pleased with
you, Toory, he said.
I do not understand why, Toory murmured, contritely. But I am
sorry.
You will find several emotion-gradations like that, Erg said.
I see. Yes, it's a very impressive model, Erg—far in advance of your
others. Doret smiled thoughtfully. He was a small man, bulging
about the middle, with a rosy, pleasant face. I guess he's worth the
price, Erg.
The skin around the blue eyes crinkled with tiny traceries of white
lines and Toory suddenly felt glad that Robert Doret might purchase
him. It was like the glow he experienced when he understood a task,
and accomplished it perfectly.
The next day Toory learned that the sale had been made. He was to
serve in Doret's country home, up in the hills north of the city. Toory
needed no specialized training for that. But he learned that there
was to be intensive, new-task instruction for a month to prepare him
for his duties as a domestic helper for Babs Doret, the purchaser's
daughter, for whom he had been bought.
She came with her father the next day—a small, brown-haired girl in
a trim blue suit. Toory learned afterward that she was eighteen
years old.
This is Miss Babs, Toory, Erg explained. You'll have to learn her
voice well, and be quick to obey. Speak to her now.
Yes, Miss Babs, Toory said.
Talk to him, Babs, Doret urged.
Hello, Toory, Babs said. Give me your hand. I want to grasp it.
Toory's mailed hand was sheathed in a soft black glove. He was
careful to keep his work-pincer retracted as he had been taught. He
held out his hand, keeping it well lowered because the girl was quite
small, two feet shorter than himself. Her own hand fumbled around
for an instant. Fumbled because—Babs Doret was blind.
It will be comforting, she said, when her fingers at last closed over
the glove. Father, you've made me very happy.
The new training should not take more than a month, Erg said.
You must work with him an hour or two each day. You'd better
practice walking with him in the city traffic, if you plan to go into the
city.
Not much, Babs said. Certainly for this summer, anyway, I'll be
staying close to home.
One of my Operatives will report tomorrow, Erg told her. I'll
deliver Toory to you this afternoon.... You will learn the new tasks,
Toory?
Yes, Toory promised.
Then in the big Erg truck he was taken up into the hills to the Doret
summer home where he remained under wait-command in the foyer
until the Instructor arrived the next day. How warmly he
remembered him from the training periods in the factory.
Immediately the new-task training began. It was simple, letting Babs
Doret hold his dangling gloved hand, leading her where she directed
him to go.
For only a short while was the Erg man really needed. The three of
them took long walks together so that Toory would become familiar
with the neighborhood.
With the Instructor intently watching, Toory soon learned to lead the
girl safely through the traffic of the village streets. Quickly he
developed a sixth-sense alertness to the dangers to Babs that must
be seen, and avoided. That was the important thing—avoiding
danger to this blind girl whose hand he held, avoiding it so that
instantly with permanent order for automatic action instilled in him,
his response would come with split-second timing.
The voice of the Instructor remained everlastingly patient when for
the hundredth time he repeated the permanent-order so that it
would be impressed on Toory beyond the possibility of error.
Danger to Miss Babs must be avoided, Toory. Danger to Miss Babs.
Any danger. Do you understand, Toory?
Yes, Toory replied.
He learned all the traffic signals quickly. He was pleased with a
warmth inside him that kept getting brighter. He's all right, the Erg
man said at last. We've certainly given him plenty of tests, Miss
Doret. His reactions are all that could be desired.
Yes, Babs agreed. You've no idea how comforting it is, how safe I
feel.
It was nice that she was pleased. She asked, You're not mixed up
about anything, Toory?
No, Toory replied.
Then the Erg man went away, and Toory's independent service
began. It caused him no confusion. There were the daily walks with
Miss Babs, sometimes shopping trips to the village, and visits to the
homes of her friends. Everywhere Toory was admired, so large and
shining a model he seemed, so comprehensive and smooth of
response. Toory glowed inwardly. His brain-tapes received the
warmth, and his memory etched it down.
There was really little for Toory to do but assist and watch over
Babs. The Doret home was a many-roomed, spacious house set in a
grove of trees on a heavily wooded hillside a mile from the village.
There were several human servants, and on the day of his arrival
they had come in a little group to gaze at him curiously.
Babs told him their names and their general duties. There was
Annie, the maid, and Higgins and his wife who served as steward
and cook. There were also Tom, the chauffeur, Nerina, who was Miss
Babs' personal maid, and old Jacques, the gardener.
Mrs. Higgins, that first day, had seemed alarmed. Her whisper to her
husband had been very faint, but Toory's electronic hearing-grids
had picked it up clearly. Sure gives you the creeps, that thing lookin'
at you with them red eye-beams.
All the other human servants had warmed to Toory, but Mrs. Higgins
had remained hostile. It's because we ain't never worked in a house
with one of those machines, Miss Babs, her husband had
murmured, apologetically. Not even a little one.
She'll get used to it, Miss Babs assured him. None of you will ever
have to give him an order. He'll stand here in the foyer under wait-
command when I don't need him.
There was little confusion in Toory's new life. During the nights the
foyer and the rooms adjoining it were dim and silent, so that Toory's
eye-beams remained motionless while he waited. But by day his
gaze roamed a bit, because there was more sound and movement.
Annie the parlour maid would be cleaning and dusting, or the thin,
sharp-faced Gil Higgins would be moving about, swiftly, deftly at his
duties. And there also was Nerina—she who was Miss Babs' personal
maid—who quite often darted to and fro. Of them all, only Nerina
ever spoke to him. She would say Morning, Toory. And Miss Babs
had taught him to respond with a cheery Hello!
It was all very comfortable to Toory as his memory-tapes etched
down the many little incidents of the passing days. There was never
any bewilderment. He made no mistakes, and he rejoiced in the
warmth of his memories. All the things going on around him here in
a house that had been new at first, but that now seemed completely
homelike. Mostly Toory liked going out with Babs, which they did
nearly every afternoon when the weather was right.
Generally they stayed out quite a long time. But there was one
afternoon when they started, and came quickly back. Feeling
unusually tired, Miss Babs went at once upstairs to her room and
Toory resumed his silent, motionless wait-command in the foyer
recess.
For a while there was nothing for his eye-beams to follow. Then he
heard the soft tread of Higgins moving about in the library. In the
quiet, somber dimness, Toory's eye-beams shifted. Through the
foyer archway he could see Higgins clearly.
The steward was sliding back a wall panel, disclosing a big square
metal box which was built solidly into the space behind it. As Toory
watched, Higgins turned a knob on the box. It opened, and Higgins
took something out and dropped it into his right coat pocket—
something which for an instant as Higgins held it, sparkled in the
faint light.
Toory had seen the sparkling object before. He had seen it on Miss
Babs' neck, and he recognized it instantly.
It was a new incident. Never before had he seen anyone open the
big metal box except Babs and her father. Higgins closed the box at
once, wiping it off carefully with his handkerchief. It was like
watching Annie dusting furniture. Then he slid the panel closed,
wiped that off also, and came quickly out into the foyer. His tread
was almost silent on the heavy rugs as he went back toward the
pantry.
In the foyer suddenly he noticed Toory. It seemed to frighten him.
Gawd! It saw me! he muttered to himself. The blarsted machine
—
All the rest of that afternoon Toory could feel confusion faintly
stirring in him, because what Higgins had done had been something
new. He was vaguely relieved when Nerina passed him, going
upstairs with Miss Babs' supper.
Hello, Toory, she said as she went past.
Hello, he responded.
There were no visitors that evening. Mr. Doret had gone away for
about a week, and in his absence the house was much quieter. Still
under wait-command, Toory stood in the hall with almost nothing to
see, and little to hear.
At midnight he automatically shifted to be on guard-command. It
had been part of his training, and after a little while he had never
failed to respond properly to the surprise tests the Instructor had
devised for him.
Now Toory's sight-beams were intensified, compensating the dimmer
light; and the audio-circuits were at the highest magnification. He
could hear many faint and distant tiny sounds, sounds which no
human ear could distinguish. Already he was familiar with the
accustomed sounds of the night. There was always the faint whir of
the many electronic appliances in the house, blending with the
ponderous ticking of the big hall clock. And often the stir of the
breeze under the eaves. Especially on windy nights.
Distant murmurs of voices inside the house always came distinctly to
Toory when he was on guard-command. A few floated to him now.
Yeah, his name's Peter and he's a nice boy, too. Got plenty of
money. Soon as I met him he started spending it on me. Toory
knew that was Annie the parlour maid, who roomed high upstairs
with Nerina.
Presently there were other, very faint murmurs, faint because they
came from the top of the most distant wing of the big house.
Sure I hid it. You don't think I'd be such a fool, keeping it here in
the house? It's hid down in the woods, in that place I showed you.
Thirty thousand pounds sterling we'll get for the diamond-string. It's
worth easy that.
Gil, is it really?
If it's worth a farthing.
The murmurs came from Higgins and his wife. The barking of the
dog down the hill swelled louder, so that Toory listened to the animal
as it bayed at the moon. It often did that, mostly all night. Then
there was Higgins' murmur again.
I say, don't lose your nerve, old girl. It'll be a mess. We'll be
suspected, of course, but so will all the staff, which makes it quite all
right. See what I mean? Miss Babs being blind, anybody could have
sneaked up on her to watch her open that strongbox. It's a simple
lock, like I said. Anybody could have done it.
Or even a visitor, Gil.
Of course. Lots of people knew she had that necklace. There'll be a
lot of stink when Miss Babs finds out it's been stolen. But they'll
never pin it on us. I'm not a fool, wiped everything off. Not a chance
I left any fingerprints.
But Gil, the police! they'll—
Sure. They'll question us all. So what? We'll just sit tight, and leave
the necklace down there in the woods while we wait a good two
years. Then all we do is say we'll have a go at service in England
again. I'll sell the diamonds over there one by one. Who'll ever be
the wiser?
It was nice to hear the drone of the voices for a while, and then
Toory's attention drifted away. The weathercock on the roof gable
began squeaking again. It was always loud on windy nights. It
blended with the human-voice murmurs.
I didn't know the blarsted thing was in the house, I tell you. I
thought it had taken Miss Babs out for a walk.
Gil, it saw you take the necklace!
It did. But I tell you I didn't know it had come back with Miss Babs.
I never thought about it at all.
You could have waited until some other day. You could have—
Stop jawin' at me, Mary. It's done now.
But it will tell what it saw.
Don't be a fool! That blarsted machine's not smart enough to talk—
not unless somebody questions it.
But they will question it. Miss Babs will ask it if it saw anyone at the
safe.
Not until she finds out the necklace is gone, and she won't find out
until she goes to that party Friday night. Gives me three days to shut
up that damn machine. You'll see.
Gil, I'm scared. It could even be listening to us now! It's down there
in the foyer, and I heard Miss Babs say once that when it's on guard-
command it can hear better than any dog.
The voices softened a little. Toory's eye-beams swung idly around
the foyer as he listened to the human voices, and the baying dog
down the hill and the creaking weathercock. It was very simple
being on guard-command. There was no danger here. Miss Babs
was safe. He could remember how the Instructor had given him the
permanent-order to guard Miss Babs. The human voices went on
droning.
So it's listenin' to us now? So what? A machine can't say, or do
anything on its own. You have to give it an order. And I tell you I got
everything figured out. Nobody's going to question a machine to find
out what's on its memory-tapes. I'm not that much of a fool.
Gil! What you going to do?
Smash it, that's what. I'm going to take it out tomorrow night and
smash it to smithereens.
Gil! You're crazy. You wouldn't dare go near it. It's got the strength
of fifty men—
That's how much you know. I'll take it outdoors, in the night. You
know that little catwalk swing-bridge over the gorge? It's only about
a mile from here. Well, it's been condemned. A sign on it says you
don't dare cross it now, it ain't safe, and might collapse.
I know. I saw the sign. But Gil—
So I take that blarsted machine out there and I order it to walk
across the bridge. A machine that weighs a couple of tons will crash,
won't it? Two hundred feet down to the rocks! Smash, Mary—the
memory-tape of what it saw and heard gone forever. See what I
mean? Simple, eh?
But Gil, how can you take it out for a walk? It won't take orders
from you. It won't, will it?
No, maybe it wouldn't, right now. But I'll fix that tomorrow
afternoon. And tomorrow night I'll take it out. What difference what
anybody suspects if they can't prove anything? A piece of damn
machinery goes wrong, wanders out in the middle of the night and
gets itself smashed, ruined. Who can prove different?
But Gil—suppose it turned on you? Suppose, while you're orderin' it
out—
Don't you see I have no choice? If that thing blabbed it saw me
take the diamond-string I'd be done for. A machine can't lie, Mary.
It's got a memory-record nobody could get away from. Go to sleep
now. Let me do the worrying.
The human voices went silent.
The big foyer clock was sonorously chiming. Toory could remember
that Erg's reception room at the factory had a chiming clock too.
Now as the hours passed, and the new day began, Toory stood in
his hall niche with his eye-beams fixed on their usual resting place
across the foyer. Soon it would be time to shift automatically from
guard-command to wait-command. It was nice to know that he
never made any mistakes. Most of all, that was what he prided
himself on.
The next afternoon Miss Babs took him for a walk again. It was a
day of dancing summer sunlight, and very happily he led her down
the little path through the garden, and out the side gate where the
road passed that led to the village.
Take the path to the stream, Toory. Then we can come back the
other way—around the hill.
Yes, Miss Babs, Toory said.
They had walked here many times, and it was easy not to do it
wrong. Toory followed the road until they reached the rocky hill that
lay beyond it. The stream roared as it tumbled through the ravine
where the swaying catwalk swing-bridge dangled from a dizzy height
across the cliff-tops. Here in the open it was placidly babbling over
moss-covered stones.
He remembered how Miss Babs had told him that the little brook
was always happy here, because it laughed all the time. At the
stream edge she sat down in the sunlight, and motionless under
wait-command Toory stood pridefully at her side.
A big flyer was faintly roaring as it passed high overhead. The red
eye-beams of Toory's gaze streamed up to it, but he didn't have to
be alert, because it wasn't dangerous to Miss Babs. Presently he
heard footsteps approaching and recognized the tread of Higgins. He
had been aware of the sound very faintly behind him almost all the
way from the house.
Then Higgins came in sight. He walked straight past Toory toward
Miss Babs. Nice afternoon, Miss Babs, he said.
Oh—is that you, Higgins, the blind girl asked.
That it is, Ma'am. My day off, you know. A chap can do with a bit of
walking outdoors now and then.
Yes, it's a beautiful day, Higgins, Miss Babs agreed.
The steward's slim, wiry body was clad in a white-striped blue suit,
and he wore a high stiff collar, and a red necktie. He had no hat, so
that the summer breeze was ruffling his thin, sandy hair. He
lingered, standing beside Babs with a cigarette dangling from his
lips.
Toory waited motionless nearby, and presently he knew from the
unheeded blur of their words that they were talking of Model 2 RY.
And I never once spoke to it, Miss Babs. Not all this time.
The girl smiled. Did you want to, Higgins?
Well, I don't know. Gives you a sort of rummy feeling, a thing like
that standin' around all the time. Shall I try speakin' to it now, Miss
Babs?
She laughed. Of course, if you wish. Go ahead, and say, 'Hello' to
him.
Hello, Toory, Higgins said.
Hello, Toory responded. It was just like Nerina's greeting, and easy
to answer properly.
Science is sure wonderful, Higgins said. He remembers everything
he ever knew, don't he? That's what Mr. Doret was saying—the
thing's got a memory-tape that puts everything down, just like he
was writin' it in a book. Does he learn new things easy, Miss Babs?
Yes, he's quite quick to learn, Miss Babs assured him.
What I mean, if you tell him something new—not just something
he's been taught—what would he do? Could I try him out, Miss
Babs?
Why—why yes, I suppose so, Miss Babs frowned. Try, if you want
to, Higgins. But you'd better make it something simple.
Higgins swung around. Wade across the stream, Toory, he said.
Toory's eye-beams lifted. It was an order taking him off wait-
command. He started to move, then stopped. Something seemed to
be wrong, and he was trying very hard not to make a mistake. It
was like those puzzling moments in his training when he couldn't
decide what he should do.
It would be bad for you to get your legs wet, wouldn't it? Higgins
asked.
No, Toory responded. His eye-beams swung to Babs.
Do it, Toory, Babs said.
The wide rocky stream was shallow directly below the gorge, so that
it hardly wet Toory's knees as he waded across.
Now, come back! Higgins called.
Toory came back. Again under automatic wait-command, he stood
motionless. He knew that he had done the task properly. It was
strange that the unpleasant feeling inside him should persist. It was
just as though he had done something wrong.
Certainly is real wonderful, Miss Babs, Higgins was exclaiming.
Real wonderful!
He gave Toory a few more orders while Babs listened, and Toory
responded dutifully. But it all seemed wrong. Toory was glad when
Higgins lighted another cigarette and wandered on; and then
presently Toory was leading the girl home around the base of the
rocky hill in the familiar way he knew so well.
It was Toory's last task for the day, and nightfall found him quiescent
again in the hall niche. A storm was in the making, so that there
were more little noises than usual, especially after midnight when his
hearing became sharpened. At monotonous intervals the big clock
chimed, but soon after midnight the voice-murmurs in the house
died away.
Then they started again and it made Toory's eye-beams shift and his
head cock a little sidewise as he listened. The voices were familiar
and he knew it was Higgins and his wife whispering together in the
east wing.
Oh Gil, be careful.
Sure I will. I can handle that blarsted thing now. I gave it lots of
orders this afternoon.
The murmurs blurred into the wind under the eaves. The night had
been mostly cloudy, Toory knew, because no moonlight showed at
the windows. But there was a little moonlight there now. Toory stood
in his hall niche, watching it. Presently he could hear faint distant
footsteps, a familiar tread, and he knew that Higgins was coming
softly down through the house.
It was so new a thing that a queer, sharp jangling sprang up in
Toory. He was on guard-command, ready to give an alarm-call if the
need came. He remembered his guard-command training, the
surprise tests in the night, the whispers of two strange men outside
a window he'd been guarding.
It had been easy to give the alarm-call then. But surely this was
different. It was so hard, trying to understand. Somehow it seemed
that now there were things in his memory—things he had seen and
heard—that ought to fit together like little widely scattered parts of a
difficult order. You had to understand all the parts. He wanted very
much to understand, because when he didn't, he made mistakes. It
had seemed easy during his training. He wondered why Higgins was
giving him parts so much harder to fit together than anything he had
ever tried to understand before.
The faint sound of Higgins' tread was growing louder. Toory's gaze
clung alertly to the staircase as he waited. Presently Higgins was at
the top, and coming quietly, swiftly down the padded steps. He was
wrapped in a greatcoat with a dark hat on his head.
Toory stirred. One of his feet jerked with an impulse to move, but he
remained motionless. Surely there was no need to shift to alarm-
order, and give a warning cry. Higgins was a member of the
household.
Answer me soft, Toory, Higgins said, his voice low and tense. You
and I are goin' out together. You understand what I'm sayin'?
Yes, Toory answered softly.
It was easy to understand. Miss Babs often would tell him that they
were going out, and he would wait until she was ready. Toory stood
motionless. In the faint red glow of his eye-beams the sweat-beads
on Higgins' thin, sallow face glistened with tiny sparkling points of
light.
You've learned to take orders from me, Higgins said. Remember?
Even new orders.
Yes, I remember, Toory said. He remembered that Babs had asked
him to obey the orders. That seemed to make a difference.
Now Higgins was standing a little back toward the foyer wall, away
from Toory. He said, I'm takin' you out with me. We're leavin' by the
front door. You go first.
Toory's eye-beams swayed, his great burnished body standing
irresolute. He could feel his legs and arms trembling because the
jangle of confusion was suddenly worse in him. It seemed terribly
hard not to make a mistake.
Higgins' voice was insistent, even though it remained soft. Get
going, Toory. You'll obey orders, won't you?
Yes, Toory responded.
Then open the front door.
Toory's great measured steps took him to the door. The latch
fastenings clanked as he opened them, because his arms and hands
were trembling. The heavy door swung wide, and bumped back
against the stopper with a thump.
I told you not to make a noise, Higgins murmured sharply.
Toory remembered. He always remembered the right response when
he had done something wrong. I am sorry, he said. I did not
mean to do anything wrong. He stood at the open doorway, trying
to stop the quivering in his legs.
You go first, Higgins whispered. Take the garden path to the side
gate. Start now.
With slow long strides Toory went out, and down the little steps. He
could hear Higgins softly closing the door after them. Broken clouds
floated overhead and the dim garden was faintly silvered with
moonlight. The garden path was a little threading passage between
the shrubs and flower-beds.
Keep goin', Toory. You hear me?
Yes, Toory said. He could hear Higgins' breathing, close behind
him. And back at the house, suddenly now there were faint sounds.
As he turned back to stare he heard the click of the front door
opening, and a familiar voice calling to him.
Toory! Toory! It was Babs! Very clear was the tapping of her cane
as she felt her way out to the flagging outside the door.
Toory would have responded, even without direct-command. But
instantly Higgins muttered, Don't speak, Toory!
Toory did not speak. He remembered that always, a direct command
had to be responded to first. Higgins jerked at his arm. Come with
me, over here. Stand quiet.
They stood a few feet off the path, by the edge of a shrub. She's
blind, she can't see us, Higgins whispered. And she mustn't hear
us either. Don't make any noise!
Silently Toory stood with his eye-beams wildly swaying. If only Miss
Babs would give him a direct-order. He wanted so desperately to
obey it.
Now the summer moonlight aureoled the slender figure of Babs as
she came slowly along the garden path, feeling her way with her
cane. If only he could have led her as he always did.
Toory, surely I heard you opening the front door, she called out
suddenly. Where are you, Toory? Answer me!
Before Higgins could interfere Toory spoke loudly. Here I am, Miss
Babs!
Toory, you shouldn't have come out. Did someone order you?
Yes, Miss Babs.
Who was it, Toory?
Higgins whispered protests were vehement, but Toory hardly heard
them.
Higgins, Toory said.
Higgins ordered you? Where is he now, Toory?
He is here beside me, Miss Babs.
Higgins cursed bitterly, and stepped out into the moonlight. I—I
didn't tell him to come out, Miss Babs! he said.
Oh—so you're here, Higgins? The blind girl's voice sounded
startled. Toory could see them standing together on the garden
path, the moonlight pallid on Higgins' frightened face.
I came out to get the blarsted thing, Higgins said quickly. I saw
him out here, and thought I'd have a go at getting him back.
You couldn't have made a mistake, Toory? Babs said. Answer me
carefully now. Why did you come out?
He told me to obey him, Toory said. He told me to go, and open
the front door quietly.
So you ordered him out, Babs said. I can't understand this,
Higgins. What possible reason—
I didn't! Higgins protested. He's got it all mixed up!
It has to be true, Babs told him. She was calmly angry. We'll go
back to the house now, Higgins. We'll soon see why you—
Oh no we won't! In a panic Higgins had suddenly gripped her
shoulders. I don't know what he's talkin' about. It's all crazy talk!
Crazy—
Higgins, take your hands off me. How dare you?
You think I'm lettin' a crazy machine say things about me? I'm tellin'
you—
Take your hands off me, Higgins.
Now the struggling Babs was frightened. It sent a horrible jangle
through Toory. There was something wrong, and Miss Babs was
frightened about it. Suddenly he saw that she was trying to scream
and Higgins in a panic had put his hand over her mouth.
Within Toory the jangling confusion grew worse, as if some horrible
corroding acid burned at him. He had a permanent-order always to
avoid danger to Miss Babs. Wasn't she in danger now? It was so
terribly hard, trying to puzzle things out, without training-memory or
an order. He could feel the jangle mounting to a bursting tumult. If
only he could think for himself, act for himself, without any orders.
He heard himself saying, I want to hold your hand, and lead you,
Miss Babs.
The words so startled the two humans in front of him that they
ceased to struggle. It was as though Model 2 RY suddenly had
crossed a great abyss, and it was terrifying.
Why—why Toory— Babs cried.
I want to hold your hand and lead you, Miss Babs. I am going to do
it now. Toory's great metal legs clanked as he took a slow step
forward.
The thing's gone wild, Higgins choked. It's comin' at us! Tell it to
keep away from us! You tell it—
W-wait, Toory, Babs whispered.
You hear? Higgins almost screamed, You hear that, you crazy—
No, Toory said. The disobedience was a shattering thing. It so
frightened Toory, hearing his own voice say it, that his huge body
stood twitching with a chaos impossible to control.
I am going to lead you home, Miss Babs. It is better for us to go
home now.
It was more than just independent thinking. Toory didn't know what
it was; but in all the tumult within him there seemed to be the
knowledge that this was the only right thing for him to do. Now he
was clanking forward with determined steps.
Higgins jumped behind Babs and gasped wildly, You keep away!
No, Toory said.
In the confused darkness of her blindness the girl was stammering
something. Toory did not hear it. His swinging, heavy hand reached
down and she recoiled from it, as if terrified by his inhuman
strength. In his awkwardness he reached out again, and she gave a
little cry, and wilted down at his feet.
He said, Miss Babs, I am sorry. I did not mean to frighten you. I will
carry you home now.
It was as though a floodgate had broken, releasing in Toory an
enormous surge of shining confidence. Higgins had backed further
down the path, and Toory's eye-beams swung to his pallid, panic-
stricken face.
You keep away from me! Higgins gasped.
No, Toory said.
You got to take orders from me! Do you hear?
Toory moved from the fallen Babs, and started remorselessly toward
Higgins. In wild panic Higgins stooped, picked up a stone and sent it
clanking against the glistening plate of Toory's chest. Toory
continued to advance, his hands extended with the work-pincers out.
For just an instant, like a terror-stricken animal with its foot in a
trap, Higgins stood shaking. Then he turned and fled down the path.
To no avail. With monstrous clanking bounds Toory was on him as
he reached the garden gate.
It was all a strange and terrible confusion to Toory. Dominating him
was the thought that he must carry Miss Babs back in safety, just as
if she had been hit by an autocar and needed instant care.
Now he had caught Higgins up, and was pressing the frail human
body against his massive chest. There may have been an instant
when Higgins screamed and struggled. But if there was, it was soon
over. The mangled thing became quiet.
Toory found himself on the highway that passed along at the foot of
the hill. Beyond the steeply-rising, ragged cliff was dark against the
sky, and a light was suddenly bathing Toory as he stood irresolute in
the road with his burden—the headlights of an oncoming autocar. It
ground to a stop, and men leaped out and stood gasping.
It's Doret's new model. It has killed a man!
Another car came along and the distress sirens of both cars started
wailing. Then a police car arrived; and still Toory stood confused and
trembling, grasping the thing that had been a man. It was terribly
frightening, because so many new thoughts seemed to be needed to
make sense of the confusion.
Now he could hear the men. Don't try to give it orders, it might leap
at us!
And a voice from back at the garden. Here's Babs Doret. It must
have killed her too!
No—no. That was wrong. Surely he had not hurt Miss Babs. He saw
them up in the garden, bending over her. Somebody shouted, She's
fainted!
He didn't want anyone to hurt Miss Babs. He would not permit
anyone to hurt her, because he had a permanent-order to protect
her.
The humans were all babbling. If we could get the fuse out of it—
It's up in the center of the back, up at the shoulders, isn't it?
I wouldn't know, it's a new model.
Take the fuse out? Out of him? The fuse—
Maybe we could hit the eye-lenses with bullets.
No—no. With smashed eye-lenses he would be blind, like Miss Babs.
How could he guide her through the village traffic if his eye-lenses
were broken?
Don't get too close! It might jump at us!
Now bullets were thudding against Toory. He thought for an instant
one of them had hit an eye-lens. But it was only the metal plate of
his forehead. The bullets sang after him as he flung Higgins' body
down, and fled up into the darkness of the rocky cliff....
The dawn was approaching and still, somewhere up in the rocky
darkness, Model 2 RY was crouching. Everyone knew that he could
not have taken refuge elsewhere, for the cliff had been surrounded.
James Erg had been summoned, and had arrived in an Erg truck.
Doret, too, had been hastily sent for. And there was a swarm of
police.
Erg stood with Doret, a little apart from the men in uniform. The
grey-haired scientist was pale, frightened and awed. This model of
yours, Erg said, is fortunately the only one of its kind I've sold,
Doret. I'll refund your money, of course, and never make another 2
RY robot. I dare not do anything else.
Babs had talked with her father; and the hysterical, stricken Mary
Higgins had confessed the theft of the diamond-string, and revealed
where her husband had hidden it. Everyone knew all of the
circumstances now.
It encountered so many problems so far afield from its training,
James Erg was saying. It's understandable, in a way, but I never
anticipated anything like this.
Something new had been added by a mysterious destiny to Model 2
RY, something that not all the genius of science could build into it.
It beats me, one of the Erg Instructors said. You can't build fear
into a machine. But it's hiding up there now because it's afraid!
Babs Doret's hair gleamed brightly in the dawnlight on the rocky
hillside. You try calling to him, Babs, Doret suggested. You were
closer to him than any of us.
She called quaveringly, Toory—Toory, where are you? Can you hear
me?
He could hear her where he crouched, trembling. Here I am, Miss
Babs, he called back.
Her father prompted her. She called again. We are going to take the
fuse out, Toory.
No—no—that would be wrong. He did not want that. In fear and
trembling he heard her voice again. Stand up, Toory.
He wanted very much to do what was right. But this—
Stand up, Toory.
He stood with the rose-glow of the coming sunlight glistening on
him. Now he could see Miss Babs clearly, low down among the
rocks, with men around her. One of the men was whispering to her.
Turn your back to us, Toory, she called suddenly.
He turned around. His knees clanked with their trembling, but he
steadied himself.
Now lie down, Toory. Flat—all the way down.
He lay staring up the wavering eye-beams. He could see the clouds
high up, flushed with the dawnlight. An aircar was drifting past, up
there, but an aircar was not a danger to Miss Babs.
We're sending a man up to take the fuse out, Toory. Turn over, face
down. That's it. Do this for me, Toory.
He lay with his face pressing into the rocky ground. The rock was
dark and blurred, so close to his eye-lenses. He could remember
how proud he'd felt down there in the warm sunlit valley standing
under wait-command beside Miss Babs. She had said that the little
brook as it babbled over the stones was laughing. It was always
happy, because it laughed all the time. How he wished that he could
hear the brook now.
The Erg man is coming, the girl called. Don't move, Toory.
It was very strange that Miss Babs would order this. He tried
desperately to reason why, but he could not.
Now he heard her voice again. Will you lie quiet, Toory, while he
takes out the fuse? Answer me.
Yes, Miss Babs. I will lie quiet.
Now the Erg man was bending over him. He pressed his face down
harder against the rock. And there was Babs' voice calling once more
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookfinal.com

More Related Content

PDF
Concepts of Database Management System 1st Edition Shefali Naik
PDF
Immediate download Concepts of Database Management System 1st Edition Shefali...
PDF
Concepts of Database Management System 1st Edition Shefali Naik
PDF
Database System Concepts 6th Edition, (Ebook PDF)
PDF
(eBook PDF) Database System Concepts 6th Edition
PDF
(eBook PDF) Database System Concepts 6th Edition
PDF
(eBook PDF) Database System Concepts 6th Edition
PDF
Database Management Systems 3rd Edition Raghu Ramakrishnan
Concepts of Database Management System 1st Edition Shefali Naik
Immediate download Concepts of Database Management System 1st Edition Shefali...
Concepts of Database Management System 1st Edition Shefali Naik
Database System Concepts 6th Edition, (Ebook PDF)
(eBook PDF) Database System Concepts 6th Edition
(eBook PDF) Database System Concepts 6th Edition
(eBook PDF) Database System Concepts 6th Edition
Database Management Systems 3rd Edition Raghu Ramakrishnan

Similar to Concepts of Database Management System 1st Edition Shefali Naik 2024 scribd download (20)

PDF
Data Architecture A Primer for the Data Scientist A Primer for the Data Scien...
PDF
(eBook PDF) Database System Concepts 7th Edition by Abraham Silberschatz
PDF
Fundamentals_of_Database_Systems,_6th_Edition.pdf
PDF
(eBook PDF) Database System Concepts 7th Edition by Abraham Silberschatz
PDF
(eBook PDF) Modern Database Management, Global Edition 13th Edition
PDF
Database System Concepts 6th Edition, (Ebook PDF)
PDF
Database Fundamentals Strategies For Efficient Access To Information And Enha...
PDF
Data Structures and Algorithm Analysis in C++, 3rd Edition by Dr. Clifford A....
PDF
(eBook PDF) Modern Database Management, Global Edition 13th Edition
PDF
Asp.net
PDF
A Practical Guide to Database Design.pdf
PDF
666 computer technology 7th sem
PPT
Building High Performance MySQL Query Systems and Analytic Applications
PPT
Building High Performance MySql Query Systems And Analytic Applications
PDF
Database System Concepts 6th Edition, (Ebook PDF)
PPT
PDF
Oracle Business Intelligence Publisher for Primavera Contract Management Trai...
PDF
Open source programming
PDF
Software Architecture for Big Data and the Cloud 1st Edition Ivan Mistrik
PDF
Database Programming With Visual Basic Net And Adonet Tips Tutorials And Code...
Data Architecture A Primer for the Data Scientist A Primer for the Data Scien...
(eBook PDF) Database System Concepts 7th Edition by Abraham Silberschatz
Fundamentals_of_Database_Systems,_6th_Edition.pdf
(eBook PDF) Database System Concepts 7th Edition by Abraham Silberschatz
(eBook PDF) Modern Database Management, Global Edition 13th Edition
Database System Concepts 6th Edition, (Ebook PDF)
Database Fundamentals Strategies For Efficient Access To Information And Enha...
Data Structures and Algorithm Analysis in C++, 3rd Edition by Dr. Clifford A....
(eBook PDF) Modern Database Management, Global Edition 13th Edition
Asp.net
A Practical Guide to Database Design.pdf
666 computer technology 7th sem
Building High Performance MySQL Query Systems and Analytic Applications
Building High Performance MySql Query Systems And Analytic Applications
Database System Concepts 6th Edition, (Ebook PDF)
Oracle Business Intelligence Publisher for Primavera Contract Management Trai...
Open source programming
Software Architecture for Big Data and the Cloud 1st Edition Ivan Mistrik
Database Programming With Visual Basic Net And Adonet Tips Tutorials And Code...
Ad

Recently uploaded (20)

PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Classroom Observation Tools for Teachers
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Complications of Minimal Access Surgery at WLH
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
master seminar digital applications in india
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Institutional Correction lecture only . . .
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Lesson notes of climatology university.
Pharmacology of Heart Failure /Pharmacotherapy of CHF
O7-L3 Supply Chain Operations - ICLT Program
Microbial diseases, their pathogenesis and prophylaxis
Supply Chain Operations Speaking Notes -ICLT Program
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Renaissance Architecture: A Journey from Faith to Humanism
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Classroom Observation Tools for Teachers
Abdominal Access Techniques with Prof. Dr. R K Mishra
Complications of Minimal Access Surgery at WLH
PPH.pptx obstetrics and gynecology in nursing
master seminar digital applications in india
2.FourierTransform-ShortQuestionswithAnswers.pdf
Final Presentation General Medicine 03-08-2024.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Institutional Correction lecture only . . .
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
O5-L3 Freight Transport Ops (International) V1.pdf
Pharma ospi slides which help in ospi learning
Lesson notes of climatology university.
Ad

Concepts of Database Management System 1st Edition Shefali Naik 2024 scribd download

  • 1. Visit https://ebookfinal.com to download the full version and explore more ebook Concepts of Database Management System 1st Edition Shefali Naik _____ Click the link below to download _____ https://ebookfinal.com/download/concepts-of-database- management-system-1st-edition-shefali-naik/ Explore and download more ebook at ebookfinal.com
  • 2. Here are some recommended products that might interest you. You can download now and explore! Database System Concepts 7th Edition Henry F. Korth https://ebookfinal.com/download/database-system-concepts-7th-edition- henry-f-korth/ ebookfinal.com Concepts of Database Management 8th Edition Philip J. Pratt https://ebookfinal.com/download/concepts-of-database-management-8th- edition-philip-j-pratt/ ebookfinal.com A History of Indian English Literature 1st Edition M.K Naik https://ebookfinal.com/download/a-history-of-indian-english- literature-1st-edition-m-k-naik/ ebookfinal.com Modern Database Management 11th Edition Jeffrey A. Hoffer https://ebookfinal.com/download/modern-database-management-11th- edition-jeffrey-a-hoffer/ ebookfinal.com
  • 3. Database Management Systems 2nd Edition Vijay Krishna Pallaw https://ebookfinal.com/download/database-management-systems-2nd- edition-vijay-krishna-pallaw/ ebookfinal.com Modern Database Management 12th Edition Jeffrey A. Hoffer https://ebookfinal.com/download/modern-database-management-12th- edition-jeffrey-a-hoffer/ ebookfinal.com The New Relational Database Dictionary Terms Concepts and Examples 1st Edition C. J. Date https://ebookfinal.com/download/the-new-relational-database- dictionary-terms-concepts-and-examples-1st-edition-c-j-date/ ebookfinal.com Management of Retinal Vein Occlusion Current Concepts 1st Edition Seenu Hariprasad https://ebookfinal.com/download/management-of-retinal-vein-occlusion- current-concepts-1st-edition-seenu-hariprasad/ ebookfinal.com Supervision Concepts and Practices of Management Edwin C. Leonard Jr https://ebookfinal.com/download/supervision-concepts-and-practices-of- management-edwin-c-leonard-jr/ ebookfinal.com
  • 5. Concepts of Database Management System 1st Edition Shefali Naik Digital Instant Download Author(s): Shefali Naik ISBN(s): 9789332537231, 9332537232 Edition: 1 File Details: PDF, 8.53 MB Year: 2014 Language: english
  • 6. CONCEPTS OF DATABASE MANAGEMENT SYSTEM___ _ _ _ _ _ _ SHEFALI NAIK ALWAYS LEARN I NG PEARSON
  • 7. Concepts of Database Management System Shefali Naik FM_Final.indd 1 3/18/2014 5:02:47 PM
  • 8. Dedicated to My husband Trushit, daughter Jisha, and son Harsheev FM_Final.indd 2 3/18/2014 5:02:47 PM Copyright © 2014 Dorling Kindersley (India) Pvt. Ltd. No part of this eBook may be used or reproduced in any manner whatsoever without the publisher’s prior written consent. This eBook may or may not include all assets that were part of the print version. The publisher reserves the right to remove any material in this eBook at any time. 10 9 8 7 6 5 4 3 2 1 Head Office: 7th Floor, Knowledge Boulevard, A-8(A) Sector 62, Noida 201 309, India. Registered Office: 11 Community Centre, Panchsheel Park, New Delhi 110 017, India. ISBN: 9789332526280 e-ISBN: 9789332537231
  • 9. Contents Foreword vii Preface ix Acknowledgements xi About the Author xiii Chapter 1 Basics of Database 1 1.1 Introduction 1 1.2 Data and Information 1 1.2.1 Data 1 1.2.2 Information 2 1.3 Database 5 1.3.1 Components of Database System 6 1.4 Database Management 11 1.5 Database Management System 11 1.6 Need for a Database 12 1.7 File-based Data Management System 12 1.8 Characteristics, or Features, or Advantages of Database Systems 14 1.9 Limitations of Database 15 Summary 16 Chapter 2 Data Models and Architecture of DBMS 19 2.1 Evolution of Data Models 19 2.2 Hierarchical Data Model 21 2.3 Network Data Model 26 2.4 Relational Data Model 27 2.5 Object-oriented Data Model 30 2.6 Object-relational Data Model 32 2.7 Three Level Architecture of Database 33 2.8 Database Languages 35 2.9 Data and Structural Independence 36 Summary 36 Chapter 3 Relational Database Management System 41 3.1 Introduction 41 3.2 RDBMS Terminology 41 3.3 Various Types of Keys 44 3.4 Integrity Rules 48 FM_Final.indd 3 3/18/2014 5:02:47 PM
  • 10. iv | Contents 3.5 Relational Set Operators 50 3.6 Retrieval Operators 52 3.7 CODD’s Twelve Rules of Relational Database 53 3.8 Database Life Cycle 54 3.9 Data Dictionary 54 Summary 55 Chapter 4 Developing Entity-Relationship Diagram 59 4.1 Introduction 59 4.2 Identifying Entities 60 4.3 Identifying Relationships 63 4.4 Types of Relationships 63 4.5 Relationship Participation 66 4.6 Strong and Weak Relationship 68 4.7 Managing Many-to-many Relationship 68 4.8 Example of E-R Model 68 4.9 Extended E-R Model 72 4.10 Converting E-R Model into Relational Model 73 4.11 Object Modelling 75 4.11.1 Subclass and Superclass 75 4.11.2 Specialization and Generalization 76 4.11.3 Class Diagram 76 Summary 76 Chapter 5 Normalization82 5.1 Introduction 82 5.2 Need for Normalization 82 5.3 Types of Dependencies 83 5.4 First Normal Form 88 5.5 Second Normal Form 88 5.6 Third Normal Form 94 5.7 Boyce-Codd Normal Form 96 5.8 Multi-valued Dependency 98 5.9 Join Dependency 100 5.10 Lossless and Lossy Decompositions 101 5.11 Normalizing Tables 102 5.12 Examples 103 Summary 108 Chapter 6 Managing Data Using Structured Query Language (SQL) 111 6.1 Introduction 111 6.2 Data Definition Commands 112 6.3 Data Manipulation Commands 114 6.4 SELECT Statement and Its Clauses 115 FM_Final.indd 4 3/18/2014 5:02:47 PM
  • 11. Contents | v 6.5 Aggregate Functions 118 6.6 Date and Time Functions 119 6.7 String Functions 121 6.8 Conversion Functions 122 6.9 Mathematical Functions 122 6.10 Special Operators 123 6.11 Types of Constraints 125 6.12 Types of Join and Set Operators 127 6.13 Sub-query 128 6.14 Advances SQL Roll-up, Cube, Crosstab 129 Summary 132 Chapter 7 Introduction to PL/SQL 138 7.1 Introduction 138 7.2 Block of PL/SQL in Oracle 138 7.3 Cursors in Oracle 139 7.4 Procedures in Oracle 142 7.5 Functions in Oracle 143 7.6 Triggers in Oracle 144 7.7 Overview of Packages in Oracle 145 Summary 146 Chapter 8 Transaction Management in Database 148 8.1 Introduction 148 8.2 Definition of Transaction 148 8.3 Properties of Transaction 152 8.4 States of Transaction 155 8.5 Concurrency Control Using Locks 155 8.6 Deadlocks 158 8.7 Database Backup and Recovery 159 8.8 Security, Integrity and Authorization 161 Summary 161 Chapter 9 Centralized and Distributed Database Management System 165 9.1 Introduction 165 9.2 Types of Databases 165 9.3 Centralized Database Management System vs. Distributed Database Management System 166 9.4 DDBMS Components 169 9.5 Distributed Processing 169 9.6 DDBMS Advantages and Disadvantages 170 Summary 170 FM_Final.indd 5 3/18/2014 5:02:47 PM
  • 12. vi | Contents Chapter 10 Advancement in Databases 172 10.1 Multidimensional Database 172 10.2 Mobile Databases 172 10.3 Multimedia Databases 174 10.4 Data Warehousing and Data Mining 174 10.5 Open Source Database 175 10.6 Spatial Databases 175 10.7 Moving Object Databases 176 10.8 NoSQL Database 176 Summary 177 Chapter 11 Overview of MS-Access 2007 180 11.1 MS-Access as an RDBMS 180 11.2 Elements of MS-Access 180 11.3 Creating Database and Tables 181 11.4 Data Types of MS-Access 183 11.5 Sorting and Filtering Records in MS-Access 187 11.6 Creating Queries in MS-Access 188 11.7 Creating Forms in MS-Access 196 11.8 Creating Reports in MS-Access 201 11.9 Creating Macros and Switchboard 205 Summary 211 Chapter 12 Overview of Oracle 221 12.1 Oracle as an RDBMS 221 12.2 Logging into Oracle 221 12.3 Command Summary of Oracle Database 10g XE 222 12.4 Database Administration 228 12.4.1 Managing Users 228 12.4.2 Managing Roles 229 12.4.3 Managing Privileges 231 Summary 233 References and Bibliography 235 Index 243 FM_Final.indd 6 3/18/2014 5:02:47 PM
  • 13. Foreword Database Management System is one of the most important subjects of the computer and IT field. It is used in almost all the applications like management information systems, expert systems, business information systems, mobile applications, and many more. Over the years, the world has witnessed many inventions in database technologies. The most important invention is relational database management system. Application developers, in the IT industry, are using relational model-based databases for more than thirty years. Students of IT, computer science and applications, are required to learn databases in one or more courses. Databases are used to store and retrieve data. There are certain rules used to manage data within a database. Database provides many features related to data, such as sharing and integration of data, consistent transaction execution, security and recovery of data through authorization and algorithms. The relational models use a common language, named as Structured Query Language (SQL) to process data. With the rise of the Internet and mobile technologies, databases are also evolving. To store huge amount of data which are spreading worldwide on the Internet and mobile devices, relational database management systems are not enough. Special types of databases, such as NoSQL (Not only SQL) are required for managing such data.Apart from NoSQL databases, the databases which are able to store information related to moving objects, multimedia data, historical data from multiple dimensions, spatial data, etc., are also needed. Automation of processes also require maintenance of the existing applications and analysis of historical data. Analysis of histori- cal data helps in improving business functions by taking important decisions. In this book, the concepts of databases has been clearly explained giving examples in a lucid language. All chapters are well-organized and comprehensively covering the syllabus of the course on Database Management Systems. At the end of each chapter, summary is given to quickly recap the concepts. The exercises include theory questions, multiple-choice questions, andquestionsforstudent’spractice.Theoverviewofemergingtrendsindatabasesisthoroughly explained. This book addresses the need of B.Tech, M.C.A., and IT programme students, faculty members, and professional developers. I am sure that they will be benefited from this book. Shefali Naik, the author of this book, is working as senior faculty member, since past thirteen years, at the School of Computer Studies of the Ahmedabad University. She teaches courses on database management systems at graduate and post-graduate levels. To her credit, she has written a good number of articles and technical papers in the area of databases. I wish her good luck for authoring this book and her academic career. —Bipin V. Mehta Director School of Computer Studies, Ahmedabad University FM_Final.indd 7 3/18/2014 5:02:47 PM
  • 14. Preface This is the first edition of this book. I have tried to cover all the concepts of database manage- ment system. This book is useful for the students of computer science, IT, and the courses in which database is offered as an interdisciplinary subject. The readers who are new to this subject, can start this book reading from the first chapter. Those who are already familiar with databases, can read any chapter to know more about it. Readers, who are willing to learn about any Relational Database Management System, may read Chapters 11 and 12 which gives brief details on MS-Access and Oracle RDBMS, respectively. Readers, who are interested in advancement in database, may read Chapters 8, 9 and 10 which describe advanced topics in database, such as Transactions, Distributed Database, and emerging trends in Database. Those who wish to learn programming language used in database, may read Chapters 6 and 7 in which SQL and PL/SQL is discussed. The details covered in each chapter of this book are as follows: ● ● Chapter 1 gives an overview of database by explaining the basic concepts of database, such as data, information; database management system’s advantages on other record- keeping system and limitations, its components, etc. ● ● Chapter 2 describes the evolution of database management system from different sys- tems, such as hierarchical model and network model. It also describes the architecture of DBMS. ● ● Chapter 3 explains Relational Database Management System. ● ● Chapter 4 explains Entity-Relationship Model, and Chapter 5 describes Normalization Process. ● ● Chapters 6 and 7 explains the common languages SQL and PL/SQL, which is used in relational database systems to create and manage database objects; add, remove, change and retrieve data to/from tables and write small programs. ● ● In Chapter 8, Transaction is discussed; Chapter 9 explains Centralized and Distributed database, and Chapter 10 describes advancement in databases. ● ● Chapters 11 and 12 cover two well-known relational database management systems MS- Access and Oracle. Any suggestions to improve the content of the book are welcome. —Shefali Naik FM_Final.indd 9 3/18/2014 5:02:47 PM
  • 15. Acknowledgements I am indebted to many people who were directly or indirectly involved with the creation of this book. I would like to thank Bipin V. Mehta, Director at the School of Computer Studies of the Ahmedabad University, for his inspiration and contribution with the Foreword of this book. I am grateful to my colleague and friend, Pratik Thanawala, for his technical suggestions which helped me to improve the contents of this book. I am thankful to my friends from other universities, Sonal Jain, Shivani Trivedi and Tripti Dodiya, for their guidance. I would like to acknowledge the assistance provided by the editorial team of Pearson Education, Noida; especially, Neha Goomer and Nikhil Rakshit, for their continuous assistance in solving various queries related to the publishing of this book. I am also thankful to Uma Tamang and Naresh Sharma. A big thanks to Pearson Education for publishing this book. I thank my parents, Girish and Bharati Naik, and children, Jisha and Harsheev along with rest of the family, for their love and patience. Finally, I owe it to my husband Trushit, for his constant support and encouragement. —Shefali Naik FM_Final.indd 11 3/18/2014 5:02:47 PM
  • 16. About the Author Mrs Shefali Naik, the author of this book, is working as a senior faculty member for past 13 years at School of Computer Studies, Ahmedabad University, Ahmedabad. She teaches subjects related to Databases, Programming, Systems Analysis and Design, and Software Project Management at undergraduate and post-graduate levels. She has obtained her Master’s degree in Computer Applications (M.C.A.) and Bachelor’s degree in science with mathematics as a special subject (B.Sc., Mathematics) from Ahmedabad, Gujarat. The author has written few technical papers and articles in the area of databases. Presently, she is pursuing her Ph.D. from S.P. University,VallabhVidyanagar,Anand, Gujarat, in the subject of Distributed Databases. FM_Final.indd 13 3/18/2014 5:02:48 PM
  • 17. CHAPTER 1.1 | Introduction In the current era, people of all ages use database in one way or the other. Everyone uses database in different ways. For example, school children use database of e-mail programs and mobile phones, youngsters use online movie and railway ticket booking database to book tick- ets, housewives use database of books to order books online or access various community site’s database, businessmen use database of airlines to book their trips, academicians use online journals database to do research work and many more. Nowadays, computers are used every- where. We may reform the proverb ‘Where there is a will, there is a way!’ as ‘Where there is a computer, there is a database.’ Computerized Databases have made our life very easy and comfortable. We can search any place, product, area, thing, etc., with the help of stored data in a fraction of a second. Stored data processed with the help of database management systems extracts the desired information, every time. Let us understand the database in some more detail. 1.2 | Data and Information 1.2.1 | Data Data is a plural of word ‘datum’. In our daily life, we use the word data to describe facts about any person, event, place or thing. Data are raw facts which may be numbers, values, names, 1 Basics of Database • Understanding the meaning of data and information. • Knowing how database and database management systems are useful in organizations to keep records. • Examples of database management system. • Components of database system. • Characteristics of data and DBMS. • Differences between file-based management systems. • Limitations of DBMS. Chapter Objectives CH_1_Basics of Database_Final.indd 1 2/26/2014 3:36:03 PM
  • 18. 2 | Chapter 1 dates, etc. When we combine related data, they describe any real-world entity. Related data means data which belong to the same entity (person, place, event or thing). For example, If we consider the entity ‘Doctor’ (person type of entity), then doctor’s name, doctor’s address, doctor’s birth date, doctor’s qualification, doctor’s specialization, etc., are data related to doctor. We cannot say that supplier’s name and doctor’s qualification are related data; because both describe two different entities named supplier and doctor. Thus, when we want to describe any real-world entity, we use data values. Data values alone do not have any meaning because they are not processed yet. 1.2.2 | Information When we process related data it gives some information. Information is useful to take deci- sions, it can be stored for future use, it has some meaning. To obtain information, we need data. For example, when we process students’ attendance data, we can get a list of students with low attendance, students who are attending lectures regularly, students who come to college to at- tend particular lectures, pattern of class bunking for each student, etc. On the basis of this information, the college may decide the attendance policy, reschedule the time-table to improve attendance, decide whether to inform parents or not, determine which students should be allowed to sit for an examination, etc. This information could also be stored for future use. In case, when students need a transcript, this information can be used to fill up lecture-wise attendance details of each student or to generate attendance certificates which may be required along with migration certificates when students change universities. Data can be stored manually or electronically. Similarly, stored data may be processed manu- ally or electronically. Table 1.1 shows some examples of data and information. We can show the relationship between data and information as given in Figure 1.1. Figure 1.2 shows an example of data and information. Table 1.1 shows some examples of data, processes which should be applied on stored data and information which could be obtained after processing certain data. Table 1.2 shows a student’s examination result data which can be processed as per the follow- ing condition to obtain grade-wise Result analysis. Table 1.1 | Examples of Data and Information Data Process Description Information Census data Sort records based on area and count total no. of persons gender-wise and age group-wise Area-wise male and female ratio for different age groups Board Exam Data Count subject-wise, no. of students who passed or failed in an exam Subject-wise total no. of passed or failed students Climate Data Maximum temperature and minimum temperature during the year Hottest and coldest day of the year CH_1_Basics of Database_Final.indd 2 2/26/2014 3:36:03 PM
  • 19. Basics of Database | 3 If percentage 40 then, Grade = ‘F’ If percentage ≥ 40 and 50 then, Grade = ‘D’ If percentage ≥ 50 and 60 then, Grade = ‘C’ If percentage ≥ 60 and 70 then, Grade = ‘B’ If percentage ≥ 70 then, Grade = ‘A’ The following sample information may be obtained after processing the data given in Table 1.2: Class-wise Result Analysis Table 1.2 | Students’ Examination Result Data Std No. Class Code Std Name Percentage Gender 1 FY Mitali Gupta 89 Female 2 FY Nirav Valera 91 Male 3 FY Jainam Vora 79 Male 4 FY Rajani Vyas 57 Female 5 FY Nidhi Jain 64 Female 1 SY Kartik Bhatt 82 Male 2 SY Kanika Yadav 84 Female 3 SY Karishma Yadav 70 Female 4 SY Siddharth Soni 39 Male 5 SY Akash Patel 69 Male 1 TY Paras Sanghvi 84 Male 2 TY Pankti Bindal 94 Female 3 TY Richa Singh 75 Female 4 TY Neel Shah 59 Male 5 TY Payal Shah 60 Female Process Data Information Figure 1.1 | Relationship between data and information. Students’ Attendance Data Percentage of lectures attended by student Total no. of lectures attended × 100 Total no. of lectures conducted Data Process Information Figure 1.2 | Example of data and information. CH_1_Basics of Database_Final.indd 3 2/26/2014 3:36:04 PM
  • 20. 4 | Chapter 1 Class code: FY No. of students who got ‘A’ Grade: 3 No. of students who got ‘B’ Grade: 1 No. of students who got ‘C’ Grade: 1 No. of students who got ‘D’ Grade: 0 No. of students who got ‘F’ Grade: 0 Class code: SY No. of students who got ‘A’ Grade: 3 No. of students who got ‘B’ Grade: 1 No. of students who got ‘C’ Grade: 0 No. of students who got ‘D’ Grade: 0 No. of students who got ‘F’ Grade: 1 Class code: TY No. of students who got ‘A’ Grade: 3 No. of students who got ‘B’ Grade: 1 No. of students who got ‘C’ Grade: 1 No. of students who got ‘D’ Grade: 0 No. of students who got ‘F’ Grade: 0 Overall total no. of students who passed in the exam:14 Overall total no. of students who failed in the exam:1 The above information may be stored and processed further to represent the result analysis graphically or pictorially using bar charts as represented in Figure 1.3. X-axis will contains class code and grades, and Y-axis contains total number of students. 1 1 1 1 1 1 0 0 0 0 0 0 FY 3 2.5 1.5 0.5 0 1 2 SY TY 3 3 3 A B C D E Figure 1.3 | Bar chart represents class-wise grade-wise total number of students. CH_1_Basics of Database_Final.indd 4 2/26/2014 3:36:04 PM
  • 21. Basics of Database | 5 1.3 | database As the name suggests, database is a collection of data, i.e., database is a storage area where we can store all related data and process them. To understand the concept of database, let us take some real-time examples of database (storage). One logical database which we carry with us all the time is our brain. The brain stores all thoughts, ideas and things which we learn, view, etc. and it relates them. We can retrieve, change or remove these stored ideas and thoughts any time. The example of real-time physical database is a grain warehouse. When it is the season for some grain/pulses, we store them and use them later as per the process requirements. When we process the grains/pulses we obtain the information in the form of floor, sprouts, etc., which could be used in further processing to cook food. The pulses/grains which we find useless could be removed from the warehouse and could be replaced (updated) with fresh stock. In real-life, we use the concepts of data, information and database everywhere. Figure 1.4 shows an example of real-life database of children’s’ schoolbag. It is a stationery database which contains entities such as notebook, textbook, compass box, geometry case, etc. Entity Notebook has distinguished notebooks of various subjects; Entity Textbook has distin- guished textbooks of various subjects; Entity Compass box has pencils, erasers, sharpeners, ruler, etc., and Entity Geometry box has common mathematical tools. A database is like an electronic storage, which contains computerized data files (entities). It can contain one or many data files. Data files contain various related data within it. Database should contain accurate, con- sistent and non-redundant data which could be shared by differ- ent application programs. Data can be related by defining rela- tionships between proper data. Also, conditions (constraints) may be applied on data. Different users may access different data sets from the same database by writing application program. We may put security and authentica- tion procedures to provide autho- rised access of data. There may be more than one database within a database management system. All related entities are kept together in the same database. Data within database can be retrieved, updated or deleted directly by database administrator or by authorized users or application programs written by users. To describe data, other details are stored along with the data such as data type, size, constraints, description, format, etc. Using this information, the database management software generates data dictionary which contains ‘data about data’ or ‘metadata’. Schoolbag: A database of stationery items Notebook: An entity within a database Geometry box: An entity within a database Compass box: An entity within a database Textbook: An entity within a database Geometry box: An fIGure 1.4 | Real-life example of a database. CH_1_Basics of Database_Final.indd 5 2/26/2014 3:36:04 PM
  • 22. 6 | Chapter 1 Database contains data stored in computer. To process the stored data, we need application programs. The processed data could be again stored into database for future use. The data, on which we can do some processing, is known as operational data. Any organization contains operational data. Table 1.3 contains some examples of organizations and operational data of a particular organization. A database stores data of various entities. These entities can be related using relationships. Data also contains description, which is known as metadata. Along with the data, one can keep constraints on its data types. A cylindrical shape, as shown in Figure 1.5, is used to represent physical database. Physical database is useful for the computer (i.e., how a machine sees data), while logical database is useful for the user (i.e., how a human being sees data). It is a database of a university, which contains various related entities, such as course, college, student, class, attendance, exam, etc. There are many colleges in a university; each college contains many students in different courses and classes. Students attend lectures, appear in exams and get results. The ‘University’ database contains interrelated data which could be shared by different ap- plication programs to obtain meaningful information. 1.3.1 | Components of Database System Figure 1.6 shows components of any conventional database system. 1. User: User is any person who uses a database or any other object of the database. User may be of different types and at different levels in an organization. Say for example, the ‘University’ database may be useful for different persons who are directly or indirectly as- sociated with the university. Following are some categories of users who may use database. Figure 1.5 | Example of ‘University’ database. College Attendance Class Exam Student Course Table 1.3 | List of Some Organizations and Related Operational Data Organization Operational Data Public Library Member data, Books data, Publisher data, etc. Restaurant Customer data, Employee data, Food Items data, etc. Super Mall Product data, Customer data, Supplier data, etc. University Student data, Faculty data, Exam data, etc. Hospital Patient data, Doctor data, etc. CH_1_Basics of Database_Final.indd 6 2/26/2014 3:36:05 PM
  • 23. Basics of Database | 7 a. Naive User, or End-user, or Layman: The clerk of the university uses the ‘university’ database to enter the data of applicants who have applied for various courses and the same data are retrieved to generate a merit list. The clerk does not know anything about the technical features of the database or the language, using which data is entered or retrieved. He is completely unaware about the technology. Therefore, he/she is known as an end-user or Layman or Naive user. Table 1.4 shows some examples of databases and end-users of that database. b. Software Programmer, or Application Programmer, or Application Developer: A soft- ware programmer is a person who writes application programs or logic in some specific language to insert, delete, update or fetch data to/from database. An application program- mer has brief knowledge about database and Query Language which is used for writing programs. Query Language is a generalized language which is available with all data- bases. A programmer may or may not have deep understanding about database concepts, but he/she is able to operate on data stored in the database. Table 1.4 | Examples of End-users Database End-user Online University Database Applicants, Parents, University Staff, etc. Hotel database Customer, hotel Employees, etc. Online Railway Reservation Database Citizens of the country, Agents, Railway officials, etc. Figure 1.6 | Components of database system. Datafile 1 Datafile 2 Data 1 Data 1 Data 2 Data 2 Data 2 D a t a f i l e 1 D a t a f i l e 2 Data2 D a t a 2 D a t a f i l e 2 D a t a 1 D a t a 2 D a t a 1 User(Software programmer) writes programs to view data User(DBA) writes validation programs and manages security on Hardware on which database is stored Programs programs programs Programs programs programs Programs Programs Datafile 2 CH_1_Basics of Database_Final.indd 7 2/26/2014 3:36:05 PM
  • 24. 8 | Chapter 1 c. Database Designer: A database designer decides about entities (data files) which should be stored within database, constraints to be applied on data, data types, format and other specifications regarding data. The database designer is responsible for designing of data files. d. Database Administrator: A database administrator (DBA) is the person who is the over- all in-charge of a database. He/she assigns authorization to users, writes validation proce- dures, decides backup and recovery policies, and manages users and privileges. In short, DBA keeps control on database. 2. Hardware: Hardware is a permanent storage where the database is stored. It may be a hard-disc, or any other secondary memory. One single database may be stored on more than one storage devices depending on the volume of data stored within the database. For security purpose, a copy of database could be kept on some other storage device. Besides storage device, other hardware, such as computer, peripherals, etc., are also required to perform database-oriented operations. 3. Software (data dictionary management, database schema management, SQL): Software are programs or applications which are used to access data from database. These applications reside in DBMS or there may be some applications which could be interfaced with DBMS to manage data. For example, programming languages are used to display data on monitor. There are some software programs, which are part of DBMS, that manage data dictionary or metadata, define schema for the database objects, and are used to write query on database. The common language available with all the databases is known as Structured Query Language; if which is popularly known as SQL and sometimes pronounced as ‘Sequel’. 4. Data: Data is the most important component of a database system. Data is discussed in detail in Section 1.1. When data is stored in database, it should be stored along with its definition, data type and size, constraints, such as duplicate values are allowed or not, possible range of values, formula if it is derived from some other data, etc., display format, format in which it should be entered, validation rules, etc. Some examples of data files/entities (tables) and data stored within the entity are given in Tables 1.5, 1.6 and 1.7. These data files are inter-related data files which are part of the playschool’s database. Table 1.5 | Example of Data within Data File ‘Kindergarten’ Data Name Data Type (Size) Constraint Input Format Display Format Data File Name: Kindergarten KG id Integer Unique number which Should be generated automatically. — — KG name Character(30) Must be entered. Should be entered in upper case. Should be dis- played in title case. Address Character(100) — — — No. of branches Integer ≥0 — — Contact no. Integer — — — Contact person Character (20) — — — CH_1_Basics of Database_Final.indd 8 2/26/2014 3:36:05 PM
  • 25. Basics of Database | 9 Table 1.6 | Example of Data within Data File ‘Class’ Data Name Data Type (Size) Constraint Input Format Display Format Data File Name: Class Class code Character (3) Must be entered Should be entered in upper case. Should be displayed in upper case. Class desc. Character (30) — — — Class capacity Integer 0 and ≤30 — — No. of divisions Integer 0 and ≤4 — — Age criteria Float ≥2 — — Table 1.7 | Example of Data within Data File ‘Class’ Data Name Data Type (Size) Constraint Input Format Display Format Data File Name: Kindergarten Detail Class code Character(3) Must be entered Should be entered in upper case. Should be displayed in upper case. KG id Integer Must be entered — — Division Character(1) Upper case — — No. of students Integer 0 and ≤30 — — Table 1.8 | Example of Data Values within Data File ‘Kindergarten’ KG ID KG Name Address No. of Branches Contact No. Contact Person Data File Name: Kindergarten 1 Innocent Flower Naranpura, Ahmedabad 1 27417411 Mr S. T. Pandya 2 Smart Kids Navrangpura, Ahmedabad 3 27477471 Ms K. P. Verma 3 Kids Zone Satellite, Ahmedabad 4 26306301 Mr A. R. Nair 4 Teacher’s Pet Naranpura, Ahmedabad 2 27567561 Mr T. R. Khanna 5 Little Star Ambawadi, Ahmedabad 1 26466461 Ms N. J. Gupta When data are entered into tables, Kindergarten, Class and Kindergarten Details (Tables 1.5, 1.6 and 1.7 respectively); the correctness of data are checked. Invalid data cannot be entered into data files. Tables 1.8, 1.9 and 1.10 contain some valid data values for the tables Kindergarten, Class and Kindergarten Details, respectively. CH_1_Basics of Database_Final.indd 9 2/26/2014 3:36:05 PM
  • 26. 10 | Chapter 1 Table 1.9 | Example of Data Values within Data File ‘Class’ The data in a database must have the following characteristics: ● ● Same data should be shared between different applications. For example, if there are two departments , namely ‘accounts’ and ‘examination’, in a university, then data related to student should be shared by these two departments. There should be no need to create a copy of the same data. ● ● When data are shared, there is a question of integration. Integration means, changes in one data file should also be reflected in the related data file. For example, if a clerk in the accounts department deletes a record of any student, then it should also be deleted from ‘member data file’ used by the ‘library’ department of that university. ● ● When data are properly integrated, there are minimum chances of inconsistent data. Data will be consistent if they are integrated properly. ● ● Data should be non-redundant: If possible to avoid duplication of data in different files, data should be stored in one file, and whenever required, it should be referenced from the original file. It is not possible to remove redundancy at all, but we should try to avoid redun- dancy. Redundant data causes inconsistency within a database. For example, if a student’s address is stored in the ‘enrolment’ file as well as in the ‘alumni’ file, then ‘address’ entry for the same student would be redundant. Now, when the student’s address is changed, the clerk changes the ‘address value’ in the ‘student’ file. He forgets to change address in Class Code KG ID Division No. of Students Class Code KG ID Division No. of Students Data File Name: Kindergarten Detail Data File Name: Kindergarten Detail PG 1 1 15 JRKG 2 1 30 PG 1 2 13 JRKG 2 2 30 NUR 1 1 25 JRKG 2 3 30 NUR 1 2 25 JRKG 2 4 30 NUR 1 3 25 SRKG 2 1 30 NUR 1 4 25 SRKG 2 2 30 JRKG 1 1 30 PG 3 1 14 JRKG 1 2 30 PG 3 2 14 JRKG 1 3 30 NUR 3 1 20 JRKG 1 4 30 NUR 3 2 20 SRKG 1 1 30 NUR 3 3 20 SRKG 1 2 30 NUR 3 4 20 PG 2 1 15 JRKG 3 1 30 PG 2 2 10 JRKG 3 2 30 NUR 2 1 25 JRKG 3 3 30 NUR 2 2 25 JRKG 3 4 30 NUR 2 3 25 SRKG 3 1 20 NUR 2 4 25 SRKG 3 2 20 CH_1_Basics of Database_Final.indd 10 2/26/2014 3:36:05 PM
  • 27. Basics of Database | 11 Table 1.10 | Example of Data Values within Data File ‘Class’ Class Code Class Describe Class Capacity No. of Divisions Age Criteria Data File Name: Class PG Play Group 20 2 2 NUR Nursery 25 4 2.5 JRK Junior KG 30 4 3.5 SRK Senior KG 30 4 4.5 the ‘alumni’ file. So, now database will show different addresses for the same table which is conflicting. This is called ‘data inconsistency’, which occurs due to redundant data. ● ● Data should represent complete details. For example, only customer’s first name entered in the name field represents incomplete detail. It should contain at least first name of the customer along with the surname. 1.4 | Database Management The process of managing data within database is called database management. To manage database, a database management software/system is required. Database management includes the following activities: ● ● Writing schema for creating new data files, updating structure of existing data file, delet- ing a data file. ● ● Setting relationship among data files. ● ● Inserting, deleting and updating data values within data files. ● ● Maintaining data dictionary. ● ● Creating, updating and deleting database objects other than data files, such as views, synonyms, procedures, functions, triggers, indexes, etc. 1.5 | Database Management System Database management system is a collection of application programs which is used to man- age database objects. Database Management System is a generalised software which is used to manage database and database objects, such as tables, users, procedures, functions, etc., and to connect database with any front-end (language) with the help of some hardware. Many types of database management systems are available in the market nowadays. One can purchase license of any database from its vendor and start using it. Also, there are some open source database management systems for which there is no license required to use it. It is available on the Internet. One can download it and use it. The source code is also available for free which could be modified by any user and redistributed. MySQL is one of the most popular open source database management system. Table 1.11 contains some examples of database management system and the vendor company who provides it. CH_1_Basics of Database_Final.indd 11 2/26/2014 3:36:05 PM
  • 28. 12 | Chapter 1 1.6 | Need for A Database Following are some reasons for the need of a database: ● ● Database is required for efficient and easy storage, retrieval, updation and deletion of data records. ● ● Interrelated data should be grouped in one named storage area for easy access. This storage area may be physical or logical which resides in computer. ● ● For avoiding unnecessary repetition of data values, checking correctness of data by applying some validation rule, and searching the required information faster thus saving time and ef- fort, etc. ● ● Database is required for flexibility, i.e., as and when required we can connect the database with different front-ends. ● ● Once a database is created, it can be shared by many users. Hence, to share data with many applications a database is required. ● ● Database is needed for storing high volume and complex data, such as documents files, pho- tographs or images, multimedia data, mobile user’s data, audio and video files. ● ● For managing multi-dimensional data. ● ● Database is required for proper transaction management or transaction handling. 1.7 | File-based Data Management System File-based data management system is used by programmers to manage data. Languages, such as C or COBOL contain file management system within it. Figure 1.7 shows a file-based system for any ‘Playgroup’ in which different data files are used to manage admissions in (a) Nursery, (b) Junior KG and (c) Senior KG—for which different application programs should be written to handle different procedures. In file-based systems, data are managed using data files and these files are created and manipulated by writing application programs. Each application program contains its own data files. File-based management system has the following disadvantages: ● ● File-based management system is not appropriate when volume of data is very high. For example, it will be difficult to handle when daily transactions are in thousands or more numbers. ● ● When number of data files increase, it becomes very complicated to manage data files, i.e., if number of data files increase, number of application programs are also increased; because to insert, update, delete or view data to/from data files, an independent applica- tion program is to be written. Table 1.11 | Examples of DBMS and Its Vendors Database Management System Vendor (Supplier) Oracle Oracle SQL Server Microsoft Access Microsoft DB2 IBM CH_1_Basics of Database_Final.indd 12 2/26/2014 3:36:05 PM
  • 29. Basics of Database | 13 ● ● Complex data structures, such as pointers, cannot be handled easily by a file-based system. ● ● When the same data file is required by different programs at the same time, data sharing is not possible. To use same files at the same time, copy of that data file must be created and used. When these are two or more copies of same data file, it may result in inconsis- tent and redundant data, because changes made in one file may not be carried out in the other files. ● ● In a file-based system, the programs should only be written in a structured manner. ● ● It is not possible to set relationships between data files. Programs should be written to relate them. ● ● Security settings cannot be applied on data files. ● ● Set of data files created in a specific file-based system cannot be used with other file- based systems as storage formats of different file-based systems vary. Database system is required to overcome the limitations of file-based management system. The traditional database system contains data files which could be used to store data. The examples of simple database management system are dBASE and FoxPro. These DBMS contains CUI (Character-based User Interface) which provides faster access of data using commands. There is no need to create data files manually. In simple DBMS, data files with data field names and its data type can be created. However, a simple DBMS does not provide the facility to define keys. Student datafile Applicant datafile Enrolment process Class datafile    Attendance datafile Class datafile Student datafile Attendance process Result process Result datafile Exam datafile Student datafile Class datafile Figure 1.7 | File-based management system to manage data of ‘Playgroup’. CH_1_Basics of Database_Final.indd 13 2/26/2014 3:36:06 PM
  • 30. 14 | Chapter 1 As keys cannot be defined, it is not possible to define relationship between data files either. If user wants to relate data files, then he/she has to write programs to relate two or more file. An example of such a program is given below in Figure 1.8. But the advantage of simple DBMS, over file-based system, is that we can share data files be- tween applications. Simple commands can be used to search, insert, update, delete and view data. 1.8 | Characteristics, or Features, or Advantages of Database systems ● ● It provides facility to use same data file with different applications, i.e., data can be shared. As shown in Figure 1.8, ‘Employee’ data file can be used by ‘Accounts’ department to generate salary slip and by ‘Human-Resource’ department to evaluate the performance of the employee. ● ● Duplication of data can be minimized. There is no need to enter same data again and again as data can be shared between different applications. ● ● Proper transaction management is provided by DBMS. When data are shared between applications, there is a problem of updation when two users try to change same data at the same time. Data can be changed by only one user at a time. DBMS itself decides the priority to allow only one user to change the data at a time. The priority is decided by the DBMS software on the basis of some algorithms. In this way, DBMS handles transac- tions more efficiently than the file-based management system. ● ● There is no need to write long programs to manage data. It can be done by writing a simple single line command using structured query language, which is the generalized language provided with DBMS software. ● ● It is easy to maintain data file structures in DBMS using structured query language. ● ● Data can be integrated easily, i.e., change in one data is reflected automatically in the related data file’s data. For example, if we delete any record from ‘Customer’ table, the related child records from ‘Purchase Order’ data file will be deleted. ● ● Data inconsistency can be avoided. As data are integrated, user is not bothered about up- dation of same data in different data files. It is handled by the database software. In this way, data will be consistent. ● ● User management becomes easier. There may be many users of the same database who may access the database from local or remote machines. By providing user rights and authorization checks, the DBMS can control and restrict users. Accounts department Human-resource department Employee data file Figure 1.8 | Example of data file of DBMS which is shared by various departments in an Organization. CH_1_Basics of Database_Final.indd 14 2/26/2014 3:36:06 PM
  • 31. Basics of Database | 15 Table 1.12 | File-based Management System vs. Database Management System File-based Management System Database Management System Needs individual application program to per- form any operation on data file. Any operation on data file is done using single-line commands. Programming is done using 3GL (Third Genera- tion Languages, such as COBOL, C, PASCAL). Programming is done using 4GL (Fourth Generation Languages such, as SQL- Structured Query Language). Transaction management is very difficult. Transaction management is easy. Same data file cannot be used simultaneously. Same data file can be used simultaneously. Security features cannot be enforced. Security features can be enforced. Backup and recovery facility is not available. Backup and recovery facility is available. Duplication of data cannot be minimized. Duplication of data can be minimized. Examples: C, COBOL, PASCAL languages’ file management system. Example: dBASE, FoxPro, MS Access, Oracle. ● ● Validation rules can be applied on data before data is entered in the database. It will pre- vent wrong data inputs. ● ● Change in data file structure becomes very easy. ● ● Security can be enforced on data by assigning privileges for different users. ● ● Appropriate backup procedure is available to avoid loss of data in any adverse circum- stances, such as power failure, server failure, hardware crash. In case of failure, the data can be recovered using recovery procedures. ● ● DBMS provides Import and Export facility using which data files can be imported from one DBMS and exported to another. Table 1.12 shows the difference between file-based management system and database manage- ment system. 1.9 | Limitations of Database Nothing is 100% perfect. Advantages also bring along limitations with them. Database manage- ment system also has some limitations. They can be described as: ● ● Cost of database management system is very high. As the number of users increase, we need to pay more. ● ● To install database in a network, high-end hardware and skilled personnel to manage the network and database is required. ● ● As data can be shared through DBMS, it is difficult to control and keep track of data ac- cessed by users. Proper encryption and decryption techniques are required to secure data over a network. ● ● Efficient employees are required to handle users and decide policies about data access, which requires considerable and constant training. CH_1_Basics of Database_Final.indd 15 2/26/2014 3:36:06 PM
  • 32. 16 | Chapter 1 ● ● If data volume is very high, performance will be poor. Also, when too many users are using database at the same time, it may generate traffic on network and slow down the response time. ● ● It will be more complex when DBMS contains many databases within it. It may reduce the speed of data access. Summary ● ● Data means raw facts. It may be any values, such as integer numbers, float numbers, characters, dates, images, Boolean. ● ● Examples of integer type of data are roll numbers form number, order number; float type of data are salary, balance amount, fees, product price; character type of data are person’s name, address, qualification, product name; date type of data are birth date, admission date; retirement date, order date; image type of data are person’s photo, image of property location, image of property; Boolean type of data are customer status, payment status, gender. ● ● Interrelated data represent any entity, i.e., data are characteristics of entity. For example, student name, student birth date and student gender are data (characteristics) related to student entity. An entity is a distinguishable object of real-world. ● ● Data related to an entity are kept together in a data file, i.e., data file is a collection of related data. ● ● Data may be stored manually or electronically. When we apply any process on stored data, it gives some valuable information. The process on data stored electronically can be applied by writing application programs. ● ● The data on which we do some operation, is known as operational data. Operational data belongs to any organization. For example, student’s data is an operational data for the ‘University’ organization. By processing student’s data, we can generate information like a student’s mark sheet, list of college-wise total number of students, etc. ● ● Database is a collection of data files or tables which contain data within it. Relationship can be set to access data from different files. ● ● The process of managing data within database is called database management. ● ● Database system contains the components data, user, hardware and software. ● ● Using database we can share and integrate data between applications. ● ● Database management system is a collection of software programs through which database can be managed. ● ● File-based management system requires manual creation of data files which are very dif- ficult to handle. Within file-based management system, independent programs should be written to do operations such as insert, delete, update and view data. ● ● Database management system provides structured query language to store and access data from database. There is no need to write long programs to access data. Data redundancy and data inconsistency problems can be avoided using database management system. CH_1_Basics of Database_Final.indd 16 2/26/2014 3:36:06 PM
  • 33. Basics of Database | 17 ● ● Database management system provides automatic transaction management, backup and recovery facility, export and import facility, user management and other functionalities. ● ● The limitations of database management systems are: they are complex, expensive, requires knowledge to use them, data control is difficult, performance may suffer because of high data volume, etc. Exercises 1. Define Data and Information. Show relationship between these two. 2. Give any two examples of data. Write any two types of information which could be ob- tained by processing these data. 3. Define the terms: a. Database b. Database management c. Database management system d. Operational data e. Metadata 4. For any restaurant system, which data are operational data? Write two examples of infor- mation related to that. 5. Draw a diagram of components of database system and explain. 6. List down different types of users of database system with their roles. 7. Name any four DBMS along with their supplier company. 8. What is an open source database? Give an example. 9. Which are the characteristics or features of data in a database? 10. Write a short note on file-based management system. 11. Give an example of file-based management system. Mention the disadvantages of this system. 12. List down and explain advantages of database management system over file-based man- agement system. 13. What are the limitations of database management system? 14. Discuss data redundancy and data inconsistency with relevant example. 15. Write/Tick the correct answer. i. Data means: a. Unprocessed facts b. Processed facts c. Unprocessed information d. Processed information ii. The operational data related with ‘Hostel’ are: a. Mess data b. Customer data c. Patient data d. Doctor data iii. DBMS is an abbreviation of ______________. a. Database Management System b. Distributed Management System c. Data Management System d. Database Modification System CH_1_Basics of Database_Final.indd 17 2/26/2014 3:36:06 PM
  • 34. 18 | Chapter 1 iv. Database contains data files or tables. a. True b. False v. Data represents ______________ of an entity. a. Relationship b. Definition c. Type d. Characteristics vi. DBMS supports structured query language (SQL) which is _________. a. 1GL b. 2GL c. 3GL d. 4GL vii. The user who does not know working of a database is called _____________. a. End-user b. Database Designer c. DBA d. System Analyst viii. _____________ is responsible for overall control of database. a. Data Analyst b. Database Administrator c. Programmer d. End-user ix. Among the following, which one is not a component of database system? a. Hardware b. Data c. Software d. None x. Data redundancy causes ________________ data in database. a. Accurate b. Complete c. Meaningful d. Duplicate CH_1_Basics of Database_Final.indd 18 2/26/2014 3:36:06 PM
  • 35. CHAPTER 2 Data Models and Architecture of DBMS • Evolution of data models. • Knowing the traditional data models. • Advantages and disadvantages of various types of data models. • Three-level architecture of database management system. • Understanding languages used to define objects, manage and control data and transaction. Chapter Objectives 2.1 | Evolution of Data Models ● ● Data are the primary requirement of any application. It is important to store data appropri- ately for easy access. During the 1940s and 1950s, use of computer to write applications in programming language for automation increased. The file-based management system was not sufficient to manage data. Hence, evolution of data models took place. Figure 2.1 shows the block diagram of evolution of data models from manual record keeping system to file-based management system, and from file-based management system to database management system. ● ● COBOL (Common Business-oriented Language) and FORTRAN (Formula Translation) were two primary programming languages used to create enterprise applications during the 1950s. The file systems of these languages were not able to handle data which are required by the applications developed in these languages. ● ● Therefore, in the 1960s, IBM and Rockwell International developed a hierarchical data- base system named IMS (Information Management System). Later, C.W. Bachman pro- posed Network Data Model and, on the basis of this model, General Electric developed a network database model named IDS (Integrated Data Store). Both IMS and IDS were accessible from the programming languages using an interface. Using these database systems, application development and data management within application had become easy, but a complex task. CH_2_Data Models and Architecture of DBMS_Final.indd 19 2/26/2014 3:37:02 PM
  • 36. 20 | Chapter 2 Manual record keeping Manual record keeping Manual record keeping Manual record keeping Manual record keeping Data kept manually . . . Data stored in computerized file using file-based management system Data stored in database using database management system Figure 2.1 | Evolution from manual record keeping system to file-based management system and, from file-based management system to database management system. ● ● In 1970, Edgar F. Codd proposed a different data model, in which he had suggested that data in a database could be represented as a two-dimensional table structure, which is known as relation, and could be accessed without writing lengthy programs to access data. This model is known as relational data model. Nowadays, many vendors provide relational database management systems. Some well-known RDBMS are MS-Access and MS-SQL Server provided by Microsoft; Oracle provided by Oracle; DB2 provided by IBM, and many more. ● ● Along with RDBMS, the object-oriented concept evolved. The use of object-oriented programming languages increased in the 1980s, and along with it increased the need of a database system which would be able to handle classes and objects. Thus, evolved the object-oriented data model. Many vendors had developed OODBMSs namely Gem- Stone, ObjectDesign, Versant, O2, Objectivity, etc. ● ● Extensive use of object-oriented languages resulted in an object-relational DBMS which is a combination of object-oriented and relational DBMS. Many vendors, such as Oracle, IBM, provided functionalities of object-oriented concepts in their RDBMS (see Figure 2.2). CH_2_Data Models and Architecture of DBMS_Final.indd 20 2/26/2014 3:37:03 PM
  • 37. Data Models and Architecture of DBMS | 21 Data Models Hierarchical Example: IMS, Mark IV Network Example: IDS, DMS 1100 Relational Example: QBE, MAGNUM, Oracle Object-oriented Object-relational Example: OPAL Example: Oracle Figure 2.2 | Data models. 2.2 | Hierarchical Data Model ● ● The data model describes data and its definition. In case of an object-oriented data model, it describes the object and its behaviour. A data model is a logic which is based on con- cepts, while its implementation is called, ‘database management system’, i.e., database management system is a physical implementation of data model. Entity-relationship model is a conceptual model which shows entities and relationships between entities. ● ● The hierarchical data model was the very first data model developed in the 1960s. The hierarchical data model named IMS (Information Management System) was developed by IBM and Rockwell Company and widely used during the 1960s and1970s. The enti- ties and relationships between entities were managed with the help of a tree-like structure in the hierarchical model. In this tree, there exists a root and it is related with its child. A root is known as a parent. One parent may have many children in hierarchical structure, but one child cannot have more than one parent, i.e., if there is a child entity which is related with more than one parent entities, then two independent parent nodes should be created which contains redundant child records. The redundant child records should be linked with both the parents. On root, there will be entity occurrences from the parent entity. One entity occurrence means one segment. If this segment is on the root, it is called root segment. The entity occurrence, which falls under the root segment (parent), is known as dependent segment (child), i.e., collection of entity occurrences are called, ‘segments’. Root segment and dependent segments are connected through link. In a hierarchical structure, one root segment may have many dependent segments, but a de- pendent segment will have only one root segment. To explain this, many-to-many rela- tionship between root and dependent segments is not possible in a hierarchical structure. ● ● Entity occurrence from parent entity is shown as a root segment, and its related entity occurrences are shown as its dependent segments. The entity occurrences of same entities are shown at the same level in a tree. The related entity occurrences, which fall under it, are its branch. ● ● To give an example, consider the entities given in Figures 2.3 and 2.4. Figure 2.3 contains entities Zone, Region, Item and Area; while Figure 2.4 contains entities as Salesman and Sales. All the entities are related with the following relationships with each other. CH_2_Data Models and Architecture of DBMS_Final.indd 21 2/26/2014 3:37:03 PM
  • 38. 22 | Chapter 2 ● ● Figures 2.3 and 2.4 represents the following entities: ○ ○ Zone ○ ○ Region ○ ○ Area ○ ○ Item ○ ○ Salesman ○ ○ Sales Region Region ID Region Name Zone ID 1 Punjab 1 2 Himachal Pradesh 1 3 Gujarat 4 4 Maharashtra 4 5 West Bengal 2 6 Kerala 3 7 Karnataka 3 8 Andhra Pradesh 3 9 Rajasthan 4 10 Bihar 2 11 Assam 2 13 Jammu and Kashmir 1 Zone Zone ID Zone Name 1 North 2 East 3 South 4 West Item Item No Item Desc. Price (in `) 1 Bulldozer 200000 2 Soil Stabilizer 300000 3 Scraper 350000 4 Excavator 200000 5 Dump Truck 150000 Area Area Code Area Name Region ID 1 Ludhiana 1 2 Amritsar 1 3 Bilaspur 2 4 Shimla 2 5 Hamirpur 2 11 Calicut 6 12 Cochin 6 13 Munnar 6 14 Patiala 1 31 Anantnag 13 32 Srinagar 13 33 Ahmedabad 3 34 Udhampur 13 44 Surat 3 55 Baroda 3 61 Kolkata 5 62 Darjeeling 5 63 Baranagar 5 71 Patna 10 72 Nalanda 10 73 Vaishali 10 81 Guwahati 11 82 Digboi 11 83 Sibsagar 11 111 Bangalore 7 112 Mysore 7 113 Coorg 7 121 Hyderabad 8 122 Vishakhapatnam 8 123 Vijaywada 8 131 Pune 4 132 Mumbai 4 133 Nashik 4 141 Jaisalmer 9 142 Jodhpur 9 143 Bikaner 9 Figure 2.3 | Entities Zone, Region, Area, and Item. CH_2_Data Models and Architecture of DBMS_Final.indd 22 2/26/2014 3:37:03 PM
  • 39. Data Models and Architecture of DBMS | 23 Salesman Salesman ID Salesman Name Area Code 1 A. P. Singh 1 2 K. N. Kapoor 1 3 R. K. Chopra 2 4 P. G. Singh 2 5 S. N. Pathan 3 6 R. K. Khan 3 11 S. R. Trivedi 4 12 P. K. Jain 4 21 T. P. Khan 5 22 A. R. Khan 5 29 D. C. Khanna 31 30 P. T. Mehra 31 51 A. K. Garoo 34 52 D. N. Brave 34 61 T. N. Khan 32 62 A. P. Mishra 32 101 P. K. Damani 141 102 A. R. Agrawal 141 109 P. F. Karnik 131 110 A. M. Panzade 131 111 S. R. Sukhadiya 143 112 V. R. Jain 143 123 S. D. Sharma 142 124 K. K. Jain 142 145 S. E. Tendulkar 132 146 V. V. Manjrekar 132 147 P. N. Khedekar 132 165 A. R. Narayan 112 175 R. Benerjee 61 176 S. Tagore 61 178 L. M. Srinivasan 113 183 T. Ray 62 184 M. Ghosh 62 187 F. Srivastava 63 188 V. Jain 71 189 T. Chaterjee 71 190 S. B. Pillai 12 191 A. R. Nair 11 221 K. Yadav 81 222 G. F. Mishra 133 223 J. J. Raina 133 231 T. R. Naik 44 232 S. V. Joshi 44 261 A. F. Ghoshal 13 271 M. N. Shah 33 272 T. N. Sanghvi 33 273 A. A. Pathak 33 281 S. G. Gupta 55 282 K. D. Mistry 55 331 S. Chattopadhyay 82 81 D. Mathur 83 991 S. Mudaliar 111 Salesman No. Item No. Total_Qty_Sold 1 1 2 1 2 1 1 3 2 2 1 2 2 2 2 3 1 2 3 3 2 4 1 4 4 3 5 5 1 4 5 2 3 6 4 2 6 5 3 11 1 2 11 5 7 12 2 3 12 3 4 29 3 2 29 4 4 30 1 4 30 2 3 51 4 3 51 5 2 52 1 10 52 2 3 52 3 1 52 4 7 52 5 3 61 1 1 62 3 2 62 5 2 101 1 2 102 2 3 109 4 3 110 5 2 111 1 3 112 1 3 123 3 2 124 4 1 145 1 1 146 1 2 147 4 3 165 2 3 175 1 3 176 1 5 178 1 2 183 1 1 184 2 2 187 2 2 188 2 2 189 1 1 Figure 2.4 | Entities, Salesman, and Sales. CH_2_Data Models and Architecture of DBMS_Final.indd 23 2/26/2014 3:37:04 PM
  • 40. 24 | Chapter 2 ● ● The entities as shown in Tables 2.3 and 2.4 are related with the following relationships: ○ ○ Each Zone contains many Regions (1 Zone–Many Regions) ○ ○ Each Region contains many Areas (1 Region–Many Areas) ○ ○ Each Area contains many Salesman (1 Area–Many Salesman) ○ ○ Each Salesman sells many Items, and each Item is sold by many Salesman. (1 Salesman– Many Items and Many Salesman–1 Item, i.e., many-to-many relationship between Salesman and Item). ● ● Figure 2.5 shows the hierarchical model which represents the entities of Figures 2.3 and 2.4. ● ● Hierarchical data model can represent one-to-many relationships very effectively, but it is not possible to represent many-to-many relationship because a child can have only one parent in hierarchical model. ● ● To solve this problem, many-to-many relationship should be represented as two indepen- dent trees. For example, to represent the relationship, ‘Each Salesman sells many Items and each Item is sold by many Salesmen.’; the first tree will have Salesman as parent and Item as child, and the second tree will have Item as parent and Salesman as Child. These two different scenarios are shown in Figures 2.6(a) and 2.6(b). ● ● The hierarchical data model has the following advantages and disadvantages. Advantages: 1. It is easy to understand. 2. The one-to-many relationship can be handled quite effectively. Disadvantages: 1. It is not possible to insert a dependent record without inserting a parent record. For ex- ample, as shown in Figure 2.6(b), it is not possible to insert the details of any item until it is been sold by any Salesman. Similarly, as shown in Figure 2.6(a), it is not possible to insert the details of any Salesman until he supplies any item. Figure 2.5 | The hierarchical model. 1 2 Level 0 - Root Segment: ZONE Level 1: Child Segment: Region Himachal Pradesh Jammu Kashmir Ludhiana Amritsar Patiala Level 2: Child Segment: Area Level 3: Child Segment: Salesman Level 4: Child Segment: Items Sold A. P. Singh K. N. Kapoor R. K. Chopra P. G. Singh Bulldozer Soil Stabilizer Stomper Quantity sold North 1 1 1 1 2 2 1 2 3 4 2 14 3 Punjab 3 2 CH_2_Data Models and Architecture of DBMS_Final.indd 24 2/26/2014 3:37:04 PM
  • 41. Data Models and Architecture of DBMS | 25 A. P. Singh K. N. Kapoor R. K. Chopra P. G. Singh S. N. Pathan S. R. Trivedi D. N. Brave T. N. Khan P. T. Mehra S. E. Tendulkar V. V. Manjrekar P. K. Damani S. R. Sukhadiya V. R. Jain G. F. Mishra J. J. Raina A. A. Pathak T. N. Sanghvi T. R. Naik A. F. Ghoshal R. Benerjee S. Tagore T. Ray T. Chaterjee K. Yadav S. Chattopadhyay 1 2 2 2 4 4 2 10 1 4 1 2 2 3 3 1 2 1 1 2 3 2 3 5 1 1 3 4 Bulldozer L. M. Srinivasan A. P. Singh K. N. Kapoor R. K. Chopra P. G. Singh S. N. Pathan D. N. Brave A. P. Mishra D. C. Khanna S. D. Sharma S. G. Gupta A. R. Nair S. B. Pillai 3 2 2 5 5 3 4 1 2 2 2 2 4 1 A. P. Singh K. N. Kapoor S. N. Pathan S. R. Trivedi D. N. Brave P. T. Mehra P. K. Jain P. K. Jain 2 1 2 3 6 3 3 3 3 2 3 3 3 2 2 2 4 Soil Stabilizer Stomper Excavator Dump Truck A. P. Mishra A. M. Panzade S. Mudaliar Quantity A. R. Agrawal M. N. Shah S. V. Joshi K. D. Mistry A. R. Narayan M. Ghosh F. Srivastava V. Jain D. Mathur R. K. Khan A. K. Garoo A. K. Garoo D. N. Brave D. C. Khanna P. F. Karnik P. N. Khedekar K. K. Jain 4 2 3 7 4 1 3 3 R. K. Khan S. R. Trivedi D. N. Brave 4 3 7 2 3 2 2 1 (a) Bulldozer A. P. Singh Soil Stabilizer Stomper 1 2 1 2 Bulldozer K. N. Kapoor Soil Stabilizer Stomper 2 2 2 5 Quantity (b) Figure 2.6 | (a) A tree representing item supplied by various salesman; (b) A tree representing salesman supplies various items. CH_2_Data Models and Architecture of DBMS_Final.indd 25 2/26/2014 3:37:04 PM
  • 42. 26 | Chapter 2 2. If we delete any root segment, then the dependent segments which falls under it, are also deleted. For example, refer to Figure 2.6(a), if we delete root segment of the item Bulldozer, then all the Salesmen, who have supplied Bulldozer, will also be deleted. As a result, the Salesman who has sold only Bulldozer will be permanently deleted from the hierarchy model. His record will be inserted again, only when he will supply some other item. 3. It is difficult to update any Child segment. As the number of segment increases, the tree becomes extremely complex.At that time, it is very cumbersome to search for any segment and update it, i.e., to search the last dependent segment of the last root segment of a tree, one has to traverse all the dependent segments of all the root segments. 4. The hierarchical model can represent only the one-to-many (1: M) relationship. Here, the many-to-many relationship causes redundant data. 2.3 | Network Data Model ● ● The Network data model represents data using link between records. The parent record is called Owner Record, and the child record is called Member Record. If the Owner and Member records are related with the many-to-many relationship, then they are con- nected through connector record which is known as Set. The entities, given in Figures 2.4 and 2.5, are represented as a network model as shown in Figure 2.7. ● ● Figure 2.7 shows part of a network model, where: ○ ○ Zone records are Owner records of Region records and Region records are Member records. ○ ○ Region records are Owner records of Area records, and Area records are Member re- cords of Region. ○ ○ Area records are Owner records of Salesman records, and Salesman records are Member records of Area. ○ ○ Salesman records are Owner records of Item records, and Item records are Member records of Salesman which are connected through the ‘Set’ Sales. Sales record is a con- nector record between Salesman and Item. Bulldozer 200000 Soil Stabilizer Stomper 350000 North 1 Punjab HP J K 1 Ludhiana 1 2 3 Amritsar 2 Patiala 14 A. P. Singh 1 K. N. Kapoor 2 R. K. Chopra 3 1 1 2 1 2 1 1 3 2 1 2 3 P. G. Singh 4 300000 Figure 2.7 | The network model. CH_2_Data Models and Architecture of DBMS_Final.indd 26 2/26/2014 3:37:04 PM
  • 43. Data Models and Architecture of DBMS | 27 ● ● The Owner record is linked with the first Member record, the first member record is linked with the second Member record, and the second Member record is linked with the third Member record, and so on up to the last Member record. The last Member record is again linked with the Owner record. Management of the many-to-many relationship in a network model is quite simple. ● ● Following are the advantages and disadvantages of a network model. Advantages: 1. The many-to-many relationships can be represented more easily in a network data model than that of a hierarchical data model. 2. The network data model supports Data Definition Language and Data Manipulation Language. 3. To insert data of a new Item, say item no. 6, we would need to create a new Item record. There will be no connector record for the new Item until it is sold by any Salesman. Item no. ‘6’ will contain a single link from Item no. ‘6’ to Item no. ‘6’ itself, initially. Disadvantages: 1. Searching is more complicated than hierarchical model in network model because of its complex data structure. 2. The DML is also very complex as there are many constructs, such as records and links. 2.4 | Relational Data Model The concept of relational model was given by E. F. Codd, in 1970, in his landmark paper on relational data model. In the relational model, data are represented in a tabular form which is called, relation (table), and they are associated with relationships. Therefore, the name of this model is relational data model. Each entity is converted into relation and association is handled through primary and foreign keys. The detailed explanation of relational model is given in Chapter 3. Each entity occurrence is known as tuple (record) and characteristic of an entity is called an attribute (column). It is very easy to represent many-to-many relationship using relational data model. The relational model is widely used worldwide, nowadays, to store data. Figures 2.8 and 2.9 show the relational model of data as shown in Figures 2.3 and 2.4. All the relations are associated, with each other as listed here: ● ● Relation Zone is related with Region through ‘zone id’. ● ● Relation Region is related with Area through ‘region id’. ● ● Relation Area is related with Salesman through ‘area code’. ● ● Relation Salesman is related with Sales through ‘salesman id’. ● ● Relation Item is related with Sales through ‘item id’. For relations: ● ● Zone—‘zone id’ is a primary key which is referred in Region relation. ● ● Region—‘region id’ is a primary key which is referred in Area relation, and ‘zone id’ is referenced from Zone relation in Region relation. ● ● Area—‘area code’ is a primary key which is referred in Salesman relation and ‘region id’ is referenced from Region relation in Area relation. CH_2_Data Models and Architecture of DBMS_Final.indd 27 2/26/2014 3:37:04 PM
  • 44. 28 | Chapter 2 ● ● Salesman—‘salesman id’ is a primary key which is referred in Sales relation and ‘area code’ is referenced from Area relation in Salesman relation. ● ● Sales—Combination of ‘salesman id’ and ‘item id’ is a primary key. ‘Salesman id’ is referenced from Salesman and ‘item id’ is referenced from Item relation in Sales relation. Region Region ID Region Name Zone ID 1 Punjab 1 2 Himachal Pradesh 1 3 Gujarat 4 4 Maharashtra 4 5 West Bengal 2 6 Kerala 3 7 Karnataka 3 8 Andhra Pradesh 3 9 Rajasthan 4 10 Bihar 2 11 Assam 2 13 Jammu and Kashmir 1 Zone Zone ID Zone Name 1 North 2 East 3 South 4 West Item Item No. Item Desc. Price (in `) 1 Bulldozer 200000 2 Soil Stabilizer 300000 3 Scraper 350000 4 Excavator 200000 5 Dump Truck 150000 Area Area Code Area Name Region ID 1 Ludhiana 1 2 Amritsar 1 3 Bilaspur 2 4 Shimla 2 5 Hamirpur 2 11 Calicut 6 12 Cochin 6 13 Munnar 6 14 Patiala 1 31 Anantnag 13 32 Srinagar 13 33 Ahmedabad 3 34 Udhampur 13 44 Surat 3 55 Baroda 3 61 Kolkata 5 62 Darjiling 5 63 Baranagar 5 71 Patna 10 72 Nalanda 10 73 Vaishali 10 81 Guwahati 11 82 Digboi 11 83 Sibsagar 11 111 Bangalore 7 112 Mysore 7 113 Coorg 7 121 Hyderabad 8 122 Vishakhapatnam 8 123 Vijaywada 8 131 Pune 4 132 Mumbai 4 133 Nashik 4 141 Jaisalmer 9 142 Jodhpur 9 143 Bikaner 9 Figure 2.8 | Relations Zone, Region, Area and Item. CH_2_Data Models and Architecture of DBMS_Final.indd 28 2/26/2014 3:37:04 PM
  • 45. Data Models and Architecture of DBMS | 29 Sales Salesman ID Item ID Total_qty_Sold 1 1 2 1 2 1 1 3 2 2 1 2 2 2 2 3 1 2 3 3 2 4 1 4 4 3 5 5 1 4 5 2 3 6 4 2 6 5 3 11 1 2 11 5 7 12 2 3 12 3 4 29 3 2 29 4 4 30 1 4 30 2 3 51 4 3 51 5 2 52 1 10 52 2 3 52 3 1 52 4 7 52 5 3 61 1 1 62 3 2 62 5 2 101 1 2 102 2 3 109 4 3 110 5 2 111 1 3 112 1 3 123 3 2 124 4 1 145 1 1 146 1 2 147 4 3 165 2 3 175 1 3 176 1 5 178 1 2 183 1 1 184 2 2 187 2 2 188 2 2 189 1 1 Salesman Salesman ID Salesman Name Area Code 1 A. P. Singh 1 2 K. N. Kapoor 1 3 R. K. Chopra 2 4 P. G. Singh 2 5 S. N. Pathan 3 6 R. K. Khan 3 11 S. R. Trivedi 4 12 P. K. Jain 4 21 T. P. Khan 5 22 A. R. Khan 5 29 D. C. Khanna 31 30 P. T. Mehra 31 51 A. K. Garoo 34 52 D. N. Brave 34 61 T. N. Khan 32 62 A. P. Mishra 32 101 P. K. Damani 141 102 A. R. Agrawal 141 109 P. F. Karnik 131 110 A. M. Panzade 131 111 S. R. Sukhadiya 143 112 V. R. Jain 143 123 S. D. Sharma 142 124 K. K. Jain 142 145 S. E. Tendulkar 132 146 V. V. Manjrekar 132 147 P. N. Khedekar 132 165 A. R. Narayan 112 175 R. Benerjee 61 176 S. Tagore 61 178 L. M Srinivasan 113 183 T. Ray 62 184 M. Ghosh 62 187 F. Srivastava 63 188 V. Jain 71 189 T. Chaterjee 71 190 S. B. Pillai 12 191 A. R. Nair 11 221 K. Yadav 81 222 G. F. Mishra 133 223 J. J. Raina 133 231 T. R. Naik 44 232 S. V. Joshi 44 261 A. F. Ghoshal 13 271 M. N. Shah 33 272 T. N. Sanghvi 33 273 A. A. Pathak 33 281 S. G. Gupta 55 282 K. D. Mistry 55 331 S. Chattopadhyay 82 81 D. Mathur 83 991 S. Mudaliar 111 Figure 2.9 | Relations salesman and sales. CH_2_Data Models and Architecture of DBMS_Final.indd 29 2/26/2014 3:37:05 PM
  • 46. Exploring the Variety of Random Documents with Different Content
  • 49. The Project Gutenberg eBook of He who served
  • 50. This ebook is for the use of anyone anywhere in the United States and most other parts of the world at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this ebook or online at www.gutenberg.org. If you are not located in the United States, you will have to check the laws of the country where you are located before using this eBook. Title: He who served Author: Ray Cummings Illustrator: Alex Schomburg Release date: August 1, 2024 [eBook #74165] Language: English Original publication: New York, NY: King-Size Publications, Inc, 1954 Credits: Greg Weeks, Mary Meehan and the Online Distributed Proofreading Team at http://www.pgdp.net *** START OF THE PROJECT GUTENBERG EBOOK HE WHO SERVED ***
  • 52. He Who Served By Ray Cummings This surely was the blackest of crimes—to be newly built, and lead the blind, and be a friend beyond all human understanding. [Transcriber's Note: This etext was produced from Fantastic Universe September 1954. Extensive research did not uncover any evidence that the U.S. copyright on this publication was renewed.]
  • 53. Ray Cummings has delighted two generations of science fantasy readers with his unforgettable tales of the infinitely small and the infinitely large. We are all atom conscious today, but Ray was the first to discern the realms of gold spinning in miraculous splendor far below the threshold of the visible. He has explored newer realms here, in a story so human and heart- warming you won't be ashamed to shed a tear on completing it. 2 RY could remember the quick bright warmth of the afternoon sun on his burnished copper and silvery plating. He could remember every prideful moment of his early training in the big yard of the James Erg factory. Every afternoon, at first only in good weather, he and others of the newly-built had been taken into the yard from the quiet dimness of the storeroom indoors. Not only was he the largest, the finest robot of them all, but he was the most intricately constructed and the most adept at complicated tasks. And he had been the first of the newer models to be trained. There were only twenty-five others of Model 2 RY under construction —the supreme achievement of the genius of James Erg, the culmination of a lifetime of work. For a quarter of a century no other robot-builder had been able to compete with the world famous Erg product. The big Erg factory in the suburbs of New York dominated the world market, its products ranging from modest one-task models up to the most elaborate. Model 2 RY was now the most elaborate, costing two hundred and fifty thousand dollars. It was guaranteed slow- trained over a full two year period. The training included, of course,
  • 54. additional instruction for any specialized tasks desired by its purchaser; and association with the members of his family so that the timbre of their human voices would produce no untoward reactions. 2 RY was big, just under seven feet. His frozen countenance, with its square-cut contours, and faceted eyes, and his sturdy body-box gave him the aspect of a rough-hewn statue, but was in no way grotesque. His voice, hollow yet with several emotional gradations to it, was soft and pleasing. He could remember that the human voice of the Instructor was very much like his own—gentle and quiet, and beguiling in its infinite patience. 2 RY had been taught just simple things at first. Toory, come here. He had learned to balance upright the first day. Come, Toory. Stand here by me. With his great jointed legs swinging, and sometimes clanking because of his untrained awkwardness, Toory would obey. Very good, Toory. Now—sit down. Flat—all the way down. That's it, Toory. How patient the man had remained! Now—raise your right hand. No, not that one. The right hand, Toory. That's splendid! And when he failed to realize he had made a mistake, the question would come again. You're using your left hand. Do you understand, Toory? Yes, Toory would say. He could remember every glorious moment of those two years. Outdoors in rainy weather, with the rain dimming his eye-lenses so that he had to learn to polish them with a bit of fabric. And more often in cold weather when all his motions seemed to require more effort. His reactions then would be slower if he did not automatically quicken them. Quite as varied were the many tasks indoors in the training rooms. They were mostly domestic tasks, because Toory had been designed essentially, not for factory or business work, but for the home.
  • 55. At last he realized that his training was over, and one day soon after that, his prospective purchaser came. His name was Robert Doret. He was a wealthy man and an important one. The faint, red-glowing beams from Toory's eyes, deep-set under his ridged brows, gazed down in apprehension at the man who perhaps might buy him. So you're trained to be called 'Toory'? Robert Doret asked. Is that correct? Yes, Toory replied, striving to remain calm. You're right, Doret said to James Erg, who stood beside him. Quite a pleasant, well-modulated voice. Certainly far more human- sounding than the other models. Try him on emotion, Erg suggested. Doret thought a moment. I'm not sure I'm entirely pleased with you, Toory, he said. I do not understand why, Toory murmured, contritely. But I am sorry. You will find several emotion-gradations like that, Erg said. I see. Yes, it's a very impressive model, Erg—far in advance of your others. Doret smiled thoughtfully. He was a small man, bulging about the middle, with a rosy, pleasant face. I guess he's worth the price, Erg. The skin around the blue eyes crinkled with tiny traceries of white lines and Toory suddenly felt glad that Robert Doret might purchase him. It was like the glow he experienced when he understood a task, and accomplished it perfectly. The next day Toory learned that the sale had been made. He was to serve in Doret's country home, up in the hills north of the city. Toory needed no specialized training for that. But he learned that there was to be intensive, new-task instruction for a month to prepare him for his duties as a domestic helper for Babs Doret, the purchaser's daughter, for whom he had been bought.
  • 56. She came with her father the next day—a small, brown-haired girl in a trim blue suit. Toory learned afterward that she was eighteen years old. This is Miss Babs, Toory, Erg explained. You'll have to learn her voice well, and be quick to obey. Speak to her now. Yes, Miss Babs, Toory said. Talk to him, Babs, Doret urged. Hello, Toory, Babs said. Give me your hand. I want to grasp it. Toory's mailed hand was sheathed in a soft black glove. He was careful to keep his work-pincer retracted as he had been taught. He held out his hand, keeping it well lowered because the girl was quite small, two feet shorter than himself. Her own hand fumbled around for an instant. Fumbled because—Babs Doret was blind. It will be comforting, she said, when her fingers at last closed over the glove. Father, you've made me very happy. The new training should not take more than a month, Erg said. You must work with him an hour or two each day. You'd better practice walking with him in the city traffic, if you plan to go into the city. Not much, Babs said. Certainly for this summer, anyway, I'll be staying close to home. One of my Operatives will report tomorrow, Erg told her. I'll deliver Toory to you this afternoon.... You will learn the new tasks, Toory? Yes, Toory promised. Then in the big Erg truck he was taken up into the hills to the Doret summer home where he remained under wait-command in the foyer until the Instructor arrived the next day. How warmly he remembered him from the training periods in the factory. Immediately the new-task training began. It was simple, letting Babs
  • 57. Doret hold his dangling gloved hand, leading her where she directed him to go. For only a short while was the Erg man really needed. The three of them took long walks together so that Toory would become familiar with the neighborhood. With the Instructor intently watching, Toory soon learned to lead the girl safely through the traffic of the village streets. Quickly he developed a sixth-sense alertness to the dangers to Babs that must be seen, and avoided. That was the important thing—avoiding danger to this blind girl whose hand he held, avoiding it so that instantly with permanent order for automatic action instilled in him, his response would come with split-second timing. The voice of the Instructor remained everlastingly patient when for the hundredth time he repeated the permanent-order so that it would be impressed on Toory beyond the possibility of error. Danger to Miss Babs must be avoided, Toory. Danger to Miss Babs. Any danger. Do you understand, Toory? Yes, Toory replied. He learned all the traffic signals quickly. He was pleased with a warmth inside him that kept getting brighter. He's all right, the Erg man said at last. We've certainly given him plenty of tests, Miss Doret. His reactions are all that could be desired. Yes, Babs agreed. You've no idea how comforting it is, how safe I feel. It was nice that she was pleased. She asked, You're not mixed up about anything, Toory? No, Toory replied. Then the Erg man went away, and Toory's independent service began. It caused him no confusion. There were the daily walks with Miss Babs, sometimes shopping trips to the village, and visits to the homes of her friends. Everywhere Toory was admired, so large and
  • 58. shining a model he seemed, so comprehensive and smooth of response. Toory glowed inwardly. His brain-tapes received the warmth, and his memory etched it down. There was really little for Toory to do but assist and watch over Babs. The Doret home was a many-roomed, spacious house set in a grove of trees on a heavily wooded hillside a mile from the village. There were several human servants, and on the day of his arrival they had come in a little group to gaze at him curiously. Babs told him their names and their general duties. There was Annie, the maid, and Higgins and his wife who served as steward and cook. There were also Tom, the chauffeur, Nerina, who was Miss Babs' personal maid, and old Jacques, the gardener. Mrs. Higgins, that first day, had seemed alarmed. Her whisper to her husband had been very faint, but Toory's electronic hearing-grids had picked it up clearly. Sure gives you the creeps, that thing lookin' at you with them red eye-beams. All the other human servants had warmed to Toory, but Mrs. Higgins had remained hostile. It's because we ain't never worked in a house with one of those machines, Miss Babs, her husband had murmured, apologetically. Not even a little one. She'll get used to it, Miss Babs assured him. None of you will ever have to give him an order. He'll stand here in the foyer under wait- command when I don't need him. There was little confusion in Toory's new life. During the nights the foyer and the rooms adjoining it were dim and silent, so that Toory's eye-beams remained motionless while he waited. But by day his gaze roamed a bit, because there was more sound and movement. Annie the parlour maid would be cleaning and dusting, or the thin, sharp-faced Gil Higgins would be moving about, swiftly, deftly at his duties. And there also was Nerina—she who was Miss Babs' personal maid—who quite often darted to and fro. Of them all, only Nerina ever spoke to him. She would say Morning, Toory. And Miss Babs had taught him to respond with a cheery Hello!
  • 59. It was all very comfortable to Toory as his memory-tapes etched down the many little incidents of the passing days. There was never any bewilderment. He made no mistakes, and he rejoiced in the warmth of his memories. All the things going on around him here in a house that had been new at first, but that now seemed completely homelike. Mostly Toory liked going out with Babs, which they did nearly every afternoon when the weather was right. Generally they stayed out quite a long time. But there was one afternoon when they started, and came quickly back. Feeling unusually tired, Miss Babs went at once upstairs to her room and Toory resumed his silent, motionless wait-command in the foyer recess. For a while there was nothing for his eye-beams to follow. Then he heard the soft tread of Higgins moving about in the library. In the quiet, somber dimness, Toory's eye-beams shifted. Through the foyer archway he could see Higgins clearly. The steward was sliding back a wall panel, disclosing a big square metal box which was built solidly into the space behind it. As Toory watched, Higgins turned a knob on the box. It opened, and Higgins took something out and dropped it into his right coat pocket— something which for an instant as Higgins held it, sparkled in the faint light. Toory had seen the sparkling object before. He had seen it on Miss Babs' neck, and he recognized it instantly. It was a new incident. Never before had he seen anyone open the big metal box except Babs and her father. Higgins closed the box at once, wiping it off carefully with his handkerchief. It was like watching Annie dusting furniture. Then he slid the panel closed, wiped that off also, and came quickly out into the foyer. His tread was almost silent on the heavy rugs as he went back toward the pantry. In the foyer suddenly he noticed Toory. It seemed to frighten him. Gawd! It saw me! he muttered to himself. The blarsted machine
  • 60. — All the rest of that afternoon Toory could feel confusion faintly stirring in him, because what Higgins had done had been something new. He was vaguely relieved when Nerina passed him, going upstairs with Miss Babs' supper. Hello, Toory, she said as she went past. Hello, he responded. There were no visitors that evening. Mr. Doret had gone away for about a week, and in his absence the house was much quieter. Still under wait-command, Toory stood in the hall with almost nothing to see, and little to hear. At midnight he automatically shifted to be on guard-command. It had been part of his training, and after a little while he had never failed to respond properly to the surprise tests the Instructor had devised for him. Now Toory's sight-beams were intensified, compensating the dimmer light; and the audio-circuits were at the highest magnification. He could hear many faint and distant tiny sounds, sounds which no human ear could distinguish. Already he was familiar with the accustomed sounds of the night. There was always the faint whir of the many electronic appliances in the house, blending with the ponderous ticking of the big hall clock. And often the stir of the breeze under the eaves. Especially on windy nights. Distant murmurs of voices inside the house always came distinctly to Toory when he was on guard-command. A few floated to him now. Yeah, his name's Peter and he's a nice boy, too. Got plenty of money. Soon as I met him he started spending it on me. Toory knew that was Annie the parlour maid, who roomed high upstairs with Nerina. Presently there were other, very faint murmurs, faint because they came from the top of the most distant wing of the big house.
  • 61. Sure I hid it. You don't think I'd be such a fool, keeping it here in the house? It's hid down in the woods, in that place I showed you. Thirty thousand pounds sterling we'll get for the diamond-string. It's worth easy that. Gil, is it really? If it's worth a farthing. The murmurs came from Higgins and his wife. The barking of the dog down the hill swelled louder, so that Toory listened to the animal as it bayed at the moon. It often did that, mostly all night. Then there was Higgins' murmur again. I say, don't lose your nerve, old girl. It'll be a mess. We'll be suspected, of course, but so will all the staff, which makes it quite all right. See what I mean? Miss Babs being blind, anybody could have sneaked up on her to watch her open that strongbox. It's a simple lock, like I said. Anybody could have done it. Or even a visitor, Gil. Of course. Lots of people knew she had that necklace. There'll be a lot of stink when Miss Babs finds out it's been stolen. But they'll never pin it on us. I'm not a fool, wiped everything off. Not a chance I left any fingerprints. But Gil, the police! they'll— Sure. They'll question us all. So what? We'll just sit tight, and leave the necklace down there in the woods while we wait a good two years. Then all we do is say we'll have a go at service in England again. I'll sell the diamonds over there one by one. Who'll ever be the wiser? It was nice to hear the drone of the voices for a while, and then Toory's attention drifted away. The weathercock on the roof gable
  • 62. began squeaking again. It was always loud on windy nights. It blended with the human-voice murmurs. I didn't know the blarsted thing was in the house, I tell you. I thought it had taken Miss Babs out for a walk. Gil, it saw you take the necklace! It did. But I tell you I didn't know it had come back with Miss Babs. I never thought about it at all. You could have waited until some other day. You could have— Stop jawin' at me, Mary. It's done now. But it will tell what it saw. Don't be a fool! That blarsted machine's not smart enough to talk— not unless somebody questions it. But they will question it. Miss Babs will ask it if it saw anyone at the safe. Not until she finds out the necklace is gone, and she won't find out until she goes to that party Friday night. Gives me three days to shut up that damn machine. You'll see. Gil, I'm scared. It could even be listening to us now! It's down there in the foyer, and I heard Miss Babs say once that when it's on guard- command it can hear better than any dog. The voices softened a little. Toory's eye-beams swung idly around the foyer as he listened to the human voices, and the baying dog down the hill and the creaking weathercock. It was very simple being on guard-command. There was no danger here. Miss Babs was safe. He could remember how the Instructor had given him the permanent-order to guard Miss Babs. The human voices went on droning.
  • 63. So it's listenin' to us now? So what? A machine can't say, or do anything on its own. You have to give it an order. And I tell you I got everything figured out. Nobody's going to question a machine to find out what's on its memory-tapes. I'm not that much of a fool. Gil! What you going to do? Smash it, that's what. I'm going to take it out tomorrow night and smash it to smithereens. Gil! You're crazy. You wouldn't dare go near it. It's got the strength of fifty men— That's how much you know. I'll take it outdoors, in the night. You know that little catwalk swing-bridge over the gorge? It's only about a mile from here. Well, it's been condemned. A sign on it says you don't dare cross it now, it ain't safe, and might collapse. I know. I saw the sign. But Gil— So I take that blarsted machine out there and I order it to walk across the bridge. A machine that weighs a couple of tons will crash, won't it? Two hundred feet down to the rocks! Smash, Mary—the memory-tape of what it saw and heard gone forever. See what I mean? Simple, eh? But Gil, how can you take it out for a walk? It won't take orders from you. It won't, will it? No, maybe it wouldn't, right now. But I'll fix that tomorrow afternoon. And tomorrow night I'll take it out. What difference what anybody suspects if they can't prove anything? A piece of damn machinery goes wrong, wanders out in the middle of the night and gets itself smashed, ruined. Who can prove different? But Gil—suppose it turned on you? Suppose, while you're orderin' it out— Don't you see I have no choice? If that thing blabbed it saw me take the diamond-string I'd be done for. A machine can't lie, Mary.
  • 64. It's got a memory-record nobody could get away from. Go to sleep now. Let me do the worrying. The human voices went silent. The big foyer clock was sonorously chiming. Toory could remember that Erg's reception room at the factory had a chiming clock too. Now as the hours passed, and the new day began, Toory stood in his hall niche with his eye-beams fixed on their usual resting place across the foyer. Soon it would be time to shift automatically from guard-command to wait-command. It was nice to know that he never made any mistakes. Most of all, that was what he prided himself on. The next afternoon Miss Babs took him for a walk again. It was a day of dancing summer sunlight, and very happily he led her down the little path through the garden, and out the side gate where the road passed that led to the village. Take the path to the stream, Toory. Then we can come back the other way—around the hill. Yes, Miss Babs, Toory said. They had walked here many times, and it was easy not to do it wrong. Toory followed the road until they reached the rocky hill that lay beyond it. The stream roared as it tumbled through the ravine where the swaying catwalk swing-bridge dangled from a dizzy height across the cliff-tops. Here in the open it was placidly babbling over moss-covered stones. He remembered how Miss Babs had told him that the little brook was always happy here, because it laughed all the time. At the stream edge she sat down in the sunlight, and motionless under wait-command Toory stood pridefully at her side. A big flyer was faintly roaring as it passed high overhead. The red eye-beams of Toory's gaze streamed up to it, but he didn't have to be alert, because it wasn't dangerous to Miss Babs. Presently he heard footsteps approaching and recognized the tread of Higgins. He
  • 65. had been aware of the sound very faintly behind him almost all the way from the house. Then Higgins came in sight. He walked straight past Toory toward Miss Babs. Nice afternoon, Miss Babs, he said. Oh—is that you, Higgins, the blind girl asked. That it is, Ma'am. My day off, you know. A chap can do with a bit of walking outdoors now and then. Yes, it's a beautiful day, Higgins, Miss Babs agreed. The steward's slim, wiry body was clad in a white-striped blue suit, and he wore a high stiff collar, and a red necktie. He had no hat, so that the summer breeze was ruffling his thin, sandy hair. He lingered, standing beside Babs with a cigarette dangling from his lips. Toory waited motionless nearby, and presently he knew from the unheeded blur of their words that they were talking of Model 2 RY. And I never once spoke to it, Miss Babs. Not all this time. The girl smiled. Did you want to, Higgins? Well, I don't know. Gives you a sort of rummy feeling, a thing like that standin' around all the time. Shall I try speakin' to it now, Miss Babs? She laughed. Of course, if you wish. Go ahead, and say, 'Hello' to him. Hello, Toory, Higgins said. Hello, Toory responded. It was just like Nerina's greeting, and easy to answer properly. Science is sure wonderful, Higgins said. He remembers everything he ever knew, don't he? That's what Mr. Doret was saying—the thing's got a memory-tape that puts everything down, just like he was writin' it in a book. Does he learn new things easy, Miss Babs? Yes, he's quite quick to learn, Miss Babs assured him.
  • 66. What I mean, if you tell him something new—not just something he's been taught—what would he do? Could I try him out, Miss Babs? Why—why yes, I suppose so, Miss Babs frowned. Try, if you want to, Higgins. But you'd better make it something simple. Higgins swung around. Wade across the stream, Toory, he said. Toory's eye-beams lifted. It was an order taking him off wait- command. He started to move, then stopped. Something seemed to be wrong, and he was trying very hard not to make a mistake. It was like those puzzling moments in his training when he couldn't decide what he should do. It would be bad for you to get your legs wet, wouldn't it? Higgins asked. No, Toory responded. His eye-beams swung to Babs. Do it, Toory, Babs said. The wide rocky stream was shallow directly below the gorge, so that it hardly wet Toory's knees as he waded across. Now, come back! Higgins called. Toory came back. Again under automatic wait-command, he stood motionless. He knew that he had done the task properly. It was strange that the unpleasant feeling inside him should persist. It was just as though he had done something wrong. Certainly is real wonderful, Miss Babs, Higgins was exclaiming. Real wonderful! He gave Toory a few more orders while Babs listened, and Toory responded dutifully. But it all seemed wrong. Toory was glad when Higgins lighted another cigarette and wandered on; and then
  • 67. presently Toory was leading the girl home around the base of the rocky hill in the familiar way he knew so well. It was Toory's last task for the day, and nightfall found him quiescent again in the hall niche. A storm was in the making, so that there were more little noises than usual, especially after midnight when his hearing became sharpened. At monotonous intervals the big clock chimed, but soon after midnight the voice-murmurs in the house died away. Then they started again and it made Toory's eye-beams shift and his head cock a little sidewise as he listened. The voices were familiar and he knew it was Higgins and his wife whispering together in the east wing. Oh Gil, be careful. Sure I will. I can handle that blarsted thing now. I gave it lots of orders this afternoon. The murmurs blurred into the wind under the eaves. The night had been mostly cloudy, Toory knew, because no moonlight showed at the windows. But there was a little moonlight there now. Toory stood in his hall niche, watching it. Presently he could hear faint distant footsteps, a familiar tread, and he knew that Higgins was coming softly down through the house. It was so new a thing that a queer, sharp jangling sprang up in Toory. He was on guard-command, ready to give an alarm-call if the need came. He remembered his guard-command training, the surprise tests in the night, the whispers of two strange men outside a window he'd been guarding. It had been easy to give the alarm-call then. But surely this was different. It was so hard, trying to understand. Somehow it seemed that now there were things in his memory—things he had seen and heard—that ought to fit together like little widely scattered parts of a difficult order. You had to understand all the parts. He wanted very much to understand, because when he didn't, he made mistakes. It had seemed easy during his training. He wondered why Higgins was
  • 68. giving him parts so much harder to fit together than anything he had ever tried to understand before. The faint sound of Higgins' tread was growing louder. Toory's gaze clung alertly to the staircase as he waited. Presently Higgins was at the top, and coming quietly, swiftly down the padded steps. He was wrapped in a greatcoat with a dark hat on his head. Toory stirred. One of his feet jerked with an impulse to move, but he remained motionless. Surely there was no need to shift to alarm- order, and give a warning cry. Higgins was a member of the household. Answer me soft, Toory, Higgins said, his voice low and tense. You and I are goin' out together. You understand what I'm sayin'? Yes, Toory answered softly. It was easy to understand. Miss Babs often would tell him that they were going out, and he would wait until she was ready. Toory stood motionless. In the faint red glow of his eye-beams the sweat-beads on Higgins' thin, sallow face glistened with tiny sparkling points of light. You've learned to take orders from me, Higgins said. Remember? Even new orders. Yes, I remember, Toory said. He remembered that Babs had asked him to obey the orders. That seemed to make a difference. Now Higgins was standing a little back toward the foyer wall, away from Toory. He said, I'm takin' you out with me. We're leavin' by the front door. You go first. Toory's eye-beams swayed, his great burnished body standing irresolute. He could feel his legs and arms trembling because the jangle of confusion was suddenly worse in him. It seemed terribly hard not to make a mistake. Higgins' voice was insistent, even though it remained soft. Get going, Toory. You'll obey orders, won't you?
  • 69. Yes, Toory responded. Then open the front door. Toory's great measured steps took him to the door. The latch fastenings clanked as he opened them, because his arms and hands were trembling. The heavy door swung wide, and bumped back against the stopper with a thump. I told you not to make a noise, Higgins murmured sharply. Toory remembered. He always remembered the right response when he had done something wrong. I am sorry, he said. I did not mean to do anything wrong. He stood at the open doorway, trying to stop the quivering in his legs. You go first, Higgins whispered. Take the garden path to the side gate. Start now. With slow long strides Toory went out, and down the little steps. He could hear Higgins softly closing the door after them. Broken clouds floated overhead and the dim garden was faintly silvered with moonlight. The garden path was a little threading passage between the shrubs and flower-beds. Keep goin', Toory. You hear me? Yes, Toory said. He could hear Higgins' breathing, close behind him. And back at the house, suddenly now there were faint sounds. As he turned back to stare he heard the click of the front door opening, and a familiar voice calling to him. Toory! Toory! It was Babs! Very clear was the tapping of her cane as she felt her way out to the flagging outside the door. Toory would have responded, even without direct-command. But instantly Higgins muttered, Don't speak, Toory! Toory did not speak. He remembered that always, a direct command had to be responded to first. Higgins jerked at his arm. Come with me, over here. Stand quiet.
  • 70. They stood a few feet off the path, by the edge of a shrub. She's blind, she can't see us, Higgins whispered. And she mustn't hear us either. Don't make any noise! Silently Toory stood with his eye-beams wildly swaying. If only Miss Babs would give him a direct-order. He wanted so desperately to obey it. Now the summer moonlight aureoled the slender figure of Babs as she came slowly along the garden path, feeling her way with her cane. If only he could have led her as he always did. Toory, surely I heard you opening the front door, she called out suddenly. Where are you, Toory? Answer me! Before Higgins could interfere Toory spoke loudly. Here I am, Miss Babs! Toory, you shouldn't have come out. Did someone order you? Yes, Miss Babs. Who was it, Toory? Higgins whispered protests were vehement, but Toory hardly heard them. Higgins, Toory said. Higgins ordered you? Where is he now, Toory? He is here beside me, Miss Babs. Higgins cursed bitterly, and stepped out into the moonlight. I—I didn't tell him to come out, Miss Babs! he said. Oh—so you're here, Higgins? The blind girl's voice sounded startled. Toory could see them standing together on the garden path, the moonlight pallid on Higgins' frightened face.
  • 71. I came out to get the blarsted thing, Higgins said quickly. I saw him out here, and thought I'd have a go at getting him back. You couldn't have made a mistake, Toory? Babs said. Answer me carefully now. Why did you come out? He told me to obey him, Toory said. He told me to go, and open the front door quietly. So you ordered him out, Babs said. I can't understand this, Higgins. What possible reason— I didn't! Higgins protested. He's got it all mixed up! It has to be true, Babs told him. She was calmly angry. We'll go back to the house now, Higgins. We'll soon see why you— Oh no we won't! In a panic Higgins had suddenly gripped her shoulders. I don't know what he's talkin' about. It's all crazy talk! Crazy— Higgins, take your hands off me. How dare you? You think I'm lettin' a crazy machine say things about me? I'm tellin' you— Take your hands off me, Higgins. Now the struggling Babs was frightened. It sent a horrible jangle through Toory. There was something wrong, and Miss Babs was frightened about it. Suddenly he saw that she was trying to scream and Higgins in a panic had put his hand over her mouth. Within Toory the jangling confusion grew worse, as if some horrible corroding acid burned at him. He had a permanent-order always to avoid danger to Miss Babs. Wasn't she in danger now? It was so terribly hard, trying to puzzle things out, without training-memory or an order. He could feel the jangle mounting to a bursting tumult. If only he could think for himself, act for himself, without any orders. He heard himself saying, I want to hold your hand, and lead you, Miss Babs.
  • 72. The words so startled the two humans in front of him that they ceased to struggle. It was as though Model 2 RY suddenly had crossed a great abyss, and it was terrifying. Why—why Toory— Babs cried. I want to hold your hand and lead you, Miss Babs. I am going to do it now. Toory's great metal legs clanked as he took a slow step forward. The thing's gone wild, Higgins choked. It's comin' at us! Tell it to keep away from us! You tell it— W-wait, Toory, Babs whispered. You hear? Higgins almost screamed, You hear that, you crazy— No, Toory said. The disobedience was a shattering thing. It so frightened Toory, hearing his own voice say it, that his huge body stood twitching with a chaos impossible to control. I am going to lead you home, Miss Babs. It is better for us to go home now. It was more than just independent thinking. Toory didn't know what it was; but in all the tumult within him there seemed to be the knowledge that this was the only right thing for him to do. Now he was clanking forward with determined steps. Higgins jumped behind Babs and gasped wildly, You keep away! No, Toory said. In the confused darkness of her blindness the girl was stammering something. Toory did not hear it. His swinging, heavy hand reached down and she recoiled from it, as if terrified by his inhuman strength. In his awkwardness he reached out again, and she gave a little cry, and wilted down at his feet. He said, Miss Babs, I am sorry. I did not mean to frighten you. I will carry you home now.
  • 73. It was as though a floodgate had broken, releasing in Toory an enormous surge of shining confidence. Higgins had backed further down the path, and Toory's eye-beams swung to his pallid, panic- stricken face. You keep away from me! Higgins gasped. No, Toory said. You got to take orders from me! Do you hear? Toory moved from the fallen Babs, and started remorselessly toward Higgins. In wild panic Higgins stooped, picked up a stone and sent it clanking against the glistening plate of Toory's chest. Toory continued to advance, his hands extended with the work-pincers out. For just an instant, like a terror-stricken animal with its foot in a trap, Higgins stood shaking. Then he turned and fled down the path. To no avail. With monstrous clanking bounds Toory was on him as he reached the garden gate. It was all a strange and terrible confusion to Toory. Dominating him was the thought that he must carry Miss Babs back in safety, just as if she had been hit by an autocar and needed instant care. Now he had caught Higgins up, and was pressing the frail human body against his massive chest. There may have been an instant when Higgins screamed and struggled. But if there was, it was soon over. The mangled thing became quiet. Toory found himself on the highway that passed along at the foot of the hill. Beyond the steeply-rising, ragged cliff was dark against the sky, and a light was suddenly bathing Toory as he stood irresolute in the road with his burden—the headlights of an oncoming autocar. It ground to a stop, and men leaped out and stood gasping. It's Doret's new model. It has killed a man!
  • 74. Another car came along and the distress sirens of both cars started wailing. Then a police car arrived; and still Toory stood confused and trembling, grasping the thing that had been a man. It was terribly frightening, because so many new thoughts seemed to be needed to make sense of the confusion. Now he could hear the men. Don't try to give it orders, it might leap at us! And a voice from back at the garden. Here's Babs Doret. It must have killed her too! No—no. That was wrong. Surely he had not hurt Miss Babs. He saw them up in the garden, bending over her. Somebody shouted, She's fainted! He didn't want anyone to hurt Miss Babs. He would not permit anyone to hurt her, because he had a permanent-order to protect her. The humans were all babbling. If we could get the fuse out of it— It's up in the center of the back, up at the shoulders, isn't it? I wouldn't know, it's a new model. Take the fuse out? Out of him? The fuse— Maybe we could hit the eye-lenses with bullets. No—no. With smashed eye-lenses he would be blind, like Miss Babs. How could he guide her through the village traffic if his eye-lenses were broken? Don't get too close! It might jump at us! Now bullets were thudding against Toory. He thought for an instant one of them had hit an eye-lens. But it was only the metal plate of his forehead. The bullets sang after him as he flung Higgins' body down, and fled up into the darkness of the rocky cliff.... The dawn was approaching and still, somewhere up in the rocky darkness, Model 2 RY was crouching. Everyone knew that he could
  • 75. not have taken refuge elsewhere, for the cliff had been surrounded. James Erg had been summoned, and had arrived in an Erg truck. Doret, too, had been hastily sent for. And there was a swarm of police. Erg stood with Doret, a little apart from the men in uniform. The grey-haired scientist was pale, frightened and awed. This model of yours, Erg said, is fortunately the only one of its kind I've sold, Doret. I'll refund your money, of course, and never make another 2 RY robot. I dare not do anything else. Babs had talked with her father; and the hysterical, stricken Mary Higgins had confessed the theft of the diamond-string, and revealed where her husband had hidden it. Everyone knew all of the circumstances now. It encountered so many problems so far afield from its training, James Erg was saying. It's understandable, in a way, but I never anticipated anything like this. Something new had been added by a mysterious destiny to Model 2 RY, something that not all the genius of science could build into it. It beats me, one of the Erg Instructors said. You can't build fear into a machine. But it's hiding up there now because it's afraid! Babs Doret's hair gleamed brightly in the dawnlight on the rocky hillside. You try calling to him, Babs, Doret suggested. You were closer to him than any of us. She called quaveringly, Toory—Toory, where are you? Can you hear me? He could hear her where he crouched, trembling. Here I am, Miss Babs, he called back. Her father prompted her. She called again. We are going to take the fuse out, Toory. No—no—that would be wrong. He did not want that. In fear and trembling he heard her voice again. Stand up, Toory.
  • 76. He wanted very much to do what was right. But this— Stand up, Toory. He stood with the rose-glow of the coming sunlight glistening on him. Now he could see Miss Babs clearly, low down among the rocks, with men around her. One of the men was whispering to her. Turn your back to us, Toory, she called suddenly. He turned around. His knees clanked with their trembling, but he steadied himself. Now lie down, Toory. Flat—all the way down. He lay staring up the wavering eye-beams. He could see the clouds high up, flushed with the dawnlight. An aircar was drifting past, up there, but an aircar was not a danger to Miss Babs. We're sending a man up to take the fuse out, Toory. Turn over, face down. That's it. Do this for me, Toory. He lay with his face pressing into the rocky ground. The rock was dark and blurred, so close to his eye-lenses. He could remember how proud he'd felt down there in the warm sunlit valley standing under wait-command beside Miss Babs. She had said that the little brook as it babbled over the stones was laughing. It was always happy, because it laughed all the time. How he wished that he could hear the brook now. The Erg man is coming, the girl called. Don't move, Toory. It was very strange that Miss Babs would order this. He tried desperately to reason why, but he could not. Now he heard her voice again. Will you lie quiet, Toory, while he takes out the fuse? Answer me. Yes, Miss Babs. I will lie quiet. Now the Erg man was bending over him. He pressed his face down harder against the rock. And there was Babs' voice calling once more
  • 77. Welcome to our website – the ideal destination for book lovers and knowledge seekers. With a mission to inspire endlessly, we offer a vast collection of books, ranging from classic literary works to specialized publications, self-development books, and children's literature. Each book is a new journey of discovery, expanding knowledge and enriching the soul of the reade Our website is not just a platform for buying books, but a bridge connecting readers to the timeless values of culture and wisdom. With an elegant, user-friendly interface and an intelligent search system, we are committed to providing a quick and convenient shopping experience. Additionally, our special promotions and home delivery services ensure that you save time and fully enjoy the joy of reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookfinal.com