Computer-based methods of organising data

advertisement
Topic 2
12 IPT
Computer-based methods of organising data
Computer-based methods of organising include …………………... systems,…………………………
database management systems and ……………………………... .
Flat file databases
A flat file database organises data into a single …………………… and is suitable for many small
applications. Flat file databases organise data using data structures called files, records, fields, and
characters.
 A file is ……………………………………... When you have done some work on the computer,
it is stored in a file. The Address database is a file. A file in a database is divided into a set of
…………………………. records.
 A record is a collection of ………………. about one specific entry in a database. In the
Address database, a record is information about a person’s name, address and home phone.
A record is divided into one or more related ……………………… .
 A field is a …………………………… of data in a database. In the Address database, the
family name, given name, street, suburb, postcode and home phone are fields. Data
……………… in a field are made up of characters.
 A character is the ……………………………………….. of data that people can use.
Characters include letters, numbers, and special symbols.
Keys are …………………… that are used to ……………… and retrieve information. Usually, each
key holds a ………………………… item that applies to only one…………………. . When the records
are sorted, the key is used so that ………………………. the data has to be read or retrieved. There
are different types of keys, such as a single key, composite key, primary key and secondary key:
 A single key is a field in which each item of data is………………… . Care must be taken
when choosing a single key, as some fields, such as Family Name, are not always unique.
 A composite key, or compound key, is made by ………………… two or more fields together.
It is used when no data item in any field can be guaranteed to be unique. For example, a
compound key can be made from such fields as Gender and Date of Birth.
 A primary key is a single key or compound key that must have a………………. . Primary
keys cannot be empty or ……………. .
 A secondary key is a field that contains ………………………………….. of data often used in
searches. Unlike other keys, secondary keys are ……………. always unique.
Relational databases
A relational database organises data using a series of …………………………….. . Relationships are
built between the tables to provide a ……………………. way of manipulating and combining data.
…………………… are used to view, enter and change data in the tables. Relational databases are
the most commonly used database structure. The organisation of data in a relational database
involves a ……………………….. .
Schema
A schema (pronounced ‘skee-ma’) is the ……………………………………… for a database. It is an
organised …………………. of the entire database showing ………… and where the data is found,
descriptions of the data, and the data’s ……………………….. relationships. In a relational database,
the schema defines the entities, attributes and relationships:
Information Systems & Databases
Topic 2
12 IPT
 An entity is a specific thing about which information is collected and stored. The School
database has an entity for students, for teachers, for classes and for students and classes. A
flat file database would have a separate ……………….. for each of these entities.
 An attribute is a defined ……………………… of an entity. The Students entity in the School
database has such attributes as LastName, FirstName and PhoneNumber. Each attribute of
the entity contains a ……………… item. Attributes are the same as ………………….. in a flat
file database.
 A relationship is ……………….. the entities are related to each other. In the School
database, the entities are related using keys, such as StudentID. Entities are related in three
ways.
- A one-to-one relationship occurs when each record in the first entity is related to
………………….. record in the second entity. For example, in primary school each
class has one teacher and each teacher relates to only one class.
- A one-to-many relationship occurs when one record in the first entity is related to
……………… records in the second entity, but any record in the second entity only
relates to ……….. record in the first entity. For example, one student can take out
many books from the library, but any one book can only be taken out by one student
at a time.
- A many-to-many relationship occurs when …………. record in the first entity is
related to ……………. records in the second entity, and each record in the second
entity is related to …………… records in the first entity. For example, each student
studies many subjects, and each subject is studied by many students.
A foreign key is an ………………………. (field) of a table that is a primary key of another table. In
the School database, the StudentID attribute is a foreign key of the Students and Classes table and
a primary key of the Students table. The data in a foreign key of one table must ………………… the
data in the primary key of another table.
Tables
Information about an entity is ………………………… in a table. A table is the organisation of data
into columns and rows. It is sometimes referred to as a ……………………….. . A column of a table
is also an ………………………… of an entity or a field of a record. The data in a column must have
the same data type and have a ………………. name. A row in a table is also called a ……………..
of an entity, or one record. Each row must be ………………………………………… by a key. The
intersection of a row and column stores a particular data item.
Forms
Data is viewed for …………………………………………. using forms. A form is used to view, enter,
and change data in a ………………… . The ……………………… of the form can be changed. The
user can position fields, headings, instructions and graphics. A well-designed form provides
information …………………………… the required data and any ……………………………. rules that
apply to particular fields.
Information Systems & Databases
Download