* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Tables
Survey
Document related concepts
Operational transformation wikipedia , lookup
Data analysis wikipedia , lookup
Concurrency control wikipedia , lookup
Expense and cost recovery system (ECRS) wikipedia , lookup
Microsoft Access wikipedia , lookup
Information privacy law wikipedia , lookup
Versant Object Database wikipedia , lookup
Business intelligence wikipedia , lookup
Open data in the United Kingdom wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Clusterpoint wikipedia , lookup
Data vault modeling wikipedia , lookup
Relational model wikipedia , lookup
Transcript
Microsoft Access (Tables) [email protected] 1 Introduction What’s Access? Access is a relational database application designed to handle thousand or a few records depending upon the user needs Access can simply list a collection of names and addresses in a single table, or manage complex relationships between data that pan several tables 2 Introduction Database tables are collections or lists of records, each record holding individual pieces of information in fields As a database Management System (DBMS), Access enables a user to create and maintain these tables, employing sophisticated, yet easy-to-use, tools to facilitate defining, constructing, and manipulating data 3 Introduction To plan a database you need to do the following: Decide what the function of the database will be Determine what information you need, where this information will come from and how it will be entered into the database Determine the structure of the database and the relationships between the various tables Decide on the structure of the tables including field names, field types and input validation. Decide which forms, reports and queries you will 4 use Getting Started … In Access, a database application is composed of database objects, which are: Tables Forms Queries Reports Pages Macros Modules 5 Getting Started … Access centralizes all database application into a single database file. All the tables, forms, reports, and other Access objects, designed for the database, are stored in this file Having a single database file not only eliminates keeping tracks of a large number of individual files, but also permits an Access database to be transported much easier than other database types Before you can begin constructing the individual database object types, you must first create an Access database file to contain the objects 6 Tables Design a table: You can add individual fields to a blank table structure using the panes in Table Design View The top pane is the grid and is used to specify a field’s name, descriptive text, and data type. The bottom pane is the field properties section and is used to specify field size and other attributes Each row in the grid corresponds to one field; a collection of all fields is grouped into a record Access denotes that one field in every table contains unique entries that distinguish that record from others, this is the primary key field. The primary key field is denoted by a key symbol in the field’s row selector box to the left of the 7field row Tables Design a table: Within each field, there are three corresponding columns in the grid: The first is the field name column, which defines the name of the field The second is the data type column, which regulates what type of data a field can hold, such as numbers, text, and dates The third column is the description; information in the description column appears in the status bar when the field is selected in either a form or datasheet view Field names appear as column headers in Table Datasheet View 8 Tables Design a table: A fundamental part of designing an Access database table is knowing the proper data type to assign to a field. A correctly defined field not only lends itself to greater efficiency, but can also reduce compatibility problems when your database application places more demands on the data, such that in calculations or concatenation 9 Tables Design a table: Access data types are: AutoNumber holds records numbering (either incremental or random) Date/Time holds dates & times (in a variety of common formats) Currency holds currency values Text holds characters, numbers, punctuation marks, and special symbols Memo stores a large quantity of text information Number holds only numbers, + or – signs, and decimal places 10 Tables Design a table: Access data types (cont.): Yes/No stores either a Yes or No value; appears in datasheet view as a checkbox (also called a logical or Boolean type) OLE holds graphics, sounds, and other object Linking & Embedding objects Hyperlink stores URLs for Internet locations Lookup Wizard creates a field that allows you to retrieve value from another table 11 Tables Enter & delete data: Creating a database table is a two-part process; the first part defines the structure of the table. The second part of the process involves input from the user; this usually demands physically typing the data into the table Data can be entered directly into a database table using the table’s datasheet view; this view displays a table in a grid format. Each row in the grid is a record, with each cell being an individual field. You enter data by typing values directly into these cells When you advance to a previous or new blank row, Access writes the data to the table A single new blank record row will appear at the bottom of the grid and is denoted by an asterisk (*) in the row selector 12 Tables Format the datasheet: You can format the datasheet view to make data entry and viewing easier and more productive You can adjust each field (or column width) in the grid to better view its data. The data may not fully display because the default column width is too narrow. You can click and drag a grid line to manually resize a column or modify the column’s properties Access also enables you to change the text attributes (font size & style, and color of text) of data appearing in the grid. The modification of these characteristics is applied to all text in the grid Changing the column order of fields in the datasheet view will not modify field order in the actual table structure Renaming a column header will rename the actual field name 13 Tables Filter & sort tables: Records display in the order in which they were created by default Access provides sorting and filtering features to assist you in organizing and delineating table data as the number of records increases Records can be sorted in either ascending (low to high) or descending (high to low) order based on a selected field Filtering data involves specifying conditions that a record must meet to be selected. Filters can contain single or multiple conditions (tests) that must be met for a record to be listed. A set of records produced as a result of a filter is known as a dynaset You can apply two or more filters to the same table; in such case logical conditions such as AND or OR are used When a table is closed, sorted or filtered records return to their 14 original state Tables Edit field attributes: You can make permanent modifications to the structure of a new or an existing table using design view. A new table may need modification after initial data entry has exposed problems. Existing tables may have to adapt to new data or be modified to function under different circumstances Access enables you to change the data type of fields that already contain values. However, certain changes don’t provide for successful data conversions, such as attempting to convert a field full of characters (text) to a number value 15 Tables Change format properties: Access by default displays data in the same format as it was entered. You can have data displayed in a different format. Access allows you to alter the display format but not the value of data Located in the field properties pane of table design view, the format property can access and implement predefined formats (dependent on data type), or allow you to construct a custom layout of your own 16