Студопедия

КАТЕГОРИИ:

АстрономияБиологияГеографияДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРиторикаСоциологияСпортСтроительствоТехнологияФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника


FILE AND DATABASE CONCEPTS




In the broadest definition, a database is a collection of information. Today, databases are typically stored as computer files. The tasks associated with creating, maintaining, and accessing the information in these files are referred to as data management, file management, or database management. The basic element of a structured file is a field. It contains the smallest unit of meaningful information. Each field has a unique field name that describes its contents. For example, in the Vintage Music Shop database, the field name Album Title describes a field containing the name of an album, such as Hard Day’s Night. A field can be variable length or fixed length. A variable-length field is like an accordion – it expands to fit the data you enter, up to some maximum number of characters. A fixed-length field contains a predetermined number of characters (bytes). The data you enter in a fixed-length field cannot exceed the allocated field length. Moreover, if the data you enter is shorter than the allocated length, blank spaces are automatically added to fill the field.

In the world of computing, a record refers to a collection of data fields. Computer databases typically display records as rows in a table or as forms. Each kind of record is referred to as a record type. It is usually shown without any data in the fields. A record that contains data is referred to as a record occurrence, or simply a record.

A structure file that contains only one record type is often referred to as a flat file. Flat files can be used to store simple data, such as names and addresses. In contrast, a database can contain a variety of different record types. A key characteristic of a database is its ability to maintain relationships do that data from several record types can be consolidated or aggregated into essentially one unit for data retrieval and reporting purposes. In database jargon, a relationship is an association between data that’s stored in different record types. For example, Vintage Music Shop’s Customers record type is related to the Orders record type because customers place orders.

An important aspect of the relationship between record types is cardinality. Cardinality refers to the number of associations that can exist between two record types. When one record is related to many records, the relationship is referred to as a one-to-many relationship. A many-to-many relationship means that one record in a particular record type can be related to many records in another record type, or vice versa. The relationship between record types can be depicted graphically with an entity-relationship diagram (sometimes called an “ER diagram” or “ERD”).

Several database models exist. Some models work with all the relationships described earlier in this section, whereas other models work with only a subset of the relationships. The four main types of database models in use today are hierarchical, network, relational, and object oriented. The simplest database model arranges record types as a hierarchy. In a hierarchical database, a record type is referred to as a node or “segment”. The top node of the hierarchy is referred to as the root node. Nodes are arranged in a hierarchical structure as a sort of upside-down tree. A parent node can have more than one child node. But a child node can have only one parent node.

The network database model allows many-to-many relationships in addition to one-to-many relationships. Related record types are referred to as a network set, or simply a “set”. A set contains an owner and members. An owner is similar to a parent record in a hierarchical database. A member is roughly equivalent to a child record. The most popular database model today is a relational database. It stores data in a collection of related tables. Each table (also called a “relation”) is a sequence, or list, of records. All the records in a table are of the same record type. Each row of a table is equivalent to a record as is sometimes called a tuple. Each column of the table is equivalent to a field, sometimes called an attribute. Relationships can be added, changed, or deleted on demand. An object-oriented database stores data as objects, which can be grouped into classes and defined by attributes and methods. A class defines a group of objects by specifying the attributes and methods this objects share. The attributes for an object are equivalent to fields in a relational database. A method is any behavior that an object is capable of performing. There is no equivalent to a method in a non-object-oriented database.

 

Comprehension check. Mark the following statements as True or False.

 

1. The field is a basic element of a structured file.

2. The field contains the biggest unit of meaningful information.

3. The length of a field is always fixed.

4. Simple data, such as names and addresses, can be stored in flat files.

5. Every relation is a sequence, or list, of records.

6. Relationships can be changed or deleted on demand.

 


Поделиться:

Дата добавления: 2015-09-13; просмотров: 116; Мы поможем в написании вашей работы!; Нарушение авторских прав





lektsii.com - Лекции.Ком - 2014-2024 год. (0.009 сек.) Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав
Главная страница Случайная страница Контакты