Topic 4. Database Concepts
Topic 4. Database Concepts
What is a Database?
A Database is a collection of logically related data organized in a way
that data can be easily accessed, managed and updated.
OR
A database is an organized collection of structured information, or data,
typically stored electronically in a computer system.
A database is usually controlled by a database management system
(DBMS). Together, the data and the DBMS, along with the applications
that are associated with them, are referred to as a database system,
often shortened to just database.
Data within the most common types of databases in
operation today is typically modeled in rows and columns
in a series of tables to make processing and data
querying efficient. The data can then be easily accessed,
managed, modified, updated, controlled, and organized.
Most databases use structured query language (SQL) for
writing and querying data.
What is Data?
Data is a collection of a distinct unit of information. This “data” is used
in a variety of forms of text, numbers, media and many more. Talking in
terms of computing. Data is basically information that can be translated
into a particular form for efficient movement and processing.
Example: Name, age, weight, height, etc.
Traditional File System
File processing systems was an early attempt to computerize the manual filing
system that we are all familiar with. A file system is a method for storing and
organizing computer files and the data they contain to make it easy to find and
access them. File systems may use a storage device such as a hard disk or CD-
ROM and involve maintaining the physical location of the files.
The manual filing system works well when the number of items to be stored is
small. It even works quite adequately when there are large numbers of items
and we have only to store and retrieve them. However, the manual filing system
breaks down when we have to cross-reference or process the information in
the files. For example, a typical real estate agent’s office might have a separate
file for each property for sale or rent, each potential buyer and renter, and each
member of staff.
Characteristics of File Processing System
EmployeeID PayRate
EN1-10 $25.00
EN1-12 $27.50
EN1-15 $20.00
EN1-16 $19.00
EN1-19 $22.75
EN1-20 $23.00
EN1-22 $22.50
EN1-23 $19.50
EN1-25 $12.50
EN1-26 $14.00
How is organized data stored efficiently?
Cont.…
Above, tables with a one-to-one relationship from a database of
information about employees
Each record in the Personal table is about one employee. That record
relates to one, and only one, record in the Payroll table. Each record in
the Payroll table relates to one, and only one, record in the Personal
table. (This is what looking at it from both directions means.)
In a one-to-one relationship, either table can be considered to be the
primary or parent table.
How is organized data stored efficiently?
Cont.…
II. ONE TO MANY
A one-to-many relationship allows a single record in one table
to be related to multiple records in another table. One-to-
many relationships are the most common type of relationships between tables
in a database. In a one-to-many (sometimes called many-to-one) relationship, a
record in one table corresponds to zero, one, or many records in another table.
For example a record in Table A can relate to zero, one, or many records in
Table B. Many records in Table B can relate to one record in Table A.
The potential relationship is what's important; for a single record in Table A,
there might be no related records in Table B, or there might be only one related
record, but there could be many. Look at the following tables about a
company's Customers and Orders.
How is organized data stored efficiently? Cont.…
CUSTOMERS
EMPLOYEES