The Schema and MetadataWhen building a new database, users must first build a schema (from the Greek word for “plan”).The schema describes the structure of the database being designed: the names and types offields in each record type and the general relationships among different sets of records or files.It includes a description of the database’s structure, the names and sizes of fields, and details suchas which field is a primary key. The number of records is never specified because it might change,and the maximum number of records is determined by the capacity of the storage media.Fields can hold different types of data: numeric, alphanumeric, graphic, or time-related.Numeric fields hold numbers that can be manipulated by addition, multiplication, averaging,and the like. Alphanumeric fields hold textual values: words, numerals, and special symbols,which make up names, addresses, and identification numbers. Numerals entered in alphanumeric fields, such as Social Security numbers or zip codes, cannot be manipulatedmathematically. The builder of a new database must also indicate which fields are to be used asprimary keys. Many DBMSs also allow a builder to positively indicate when a field is not unique,meaning that the value in that field might be the same for more than one record.Figure 7.8 presents the schema of a database table created with the Microsoft Access DBMS.The user is prompted to enter the names and types of fields. Access lets the user name the fieldsand determine the data types. The Description section allows the designer to describe the nature
and function of the fields for people who maintain the database. In the lower part of the window
the user is offered many options for each field, such as field size, format, and so on. In Access the
primary key field is indicated by a little key icon to its left.
đang được dịch, vui lòng đợi..