Сдам Сам

ПОЛЕЗНОЕ


КАТЕГОРИИ







Creating a table « Disciplines »





Table 8 Structure of the table «Disciplines»

Field name Data Type
ID discipline Number
Name of the discipline Text
Term Number
ID lecturer Number
Exam Text

 

- ID discipline

This field will be the Primary key for this table.

Field Size: Integer or Autonumerical

- Name of the discipline

Field Size: 30

- Term

Field Size: Integer

- ID lecturer

Field Size: Integer

You should link the table «Disciplines» and the table «Lecturers». It is always easier to pick from a list than to remember what the choices are. In the Table Design View, in the bottom section, each field has a Lookup wizard (We used a Lookup wizard for a creating combo box). Now select «I want the lookup column to look up the valuesin a table or query».

Picture 10 Lookup Wizard.

 

 

In the View box, if we select Tables, only tables defined in the database will appear. If we select Queries, only queries will appear, and if we select Both, both tables and queries will appear.

So you should select the table «Lecturers» and click-on the «Next >» button.

 

In this window we have in the list on the left the columns of the table or selected query, and in the list on the right we will place the columns that we wish to appear in the lookup list.

To select a column click on it so that it stands out and then press the button to send the column selected to the right hand side.

The button allows us to send all the columns from the left to the right side in one go.

The button allows us to remove a column from the list on the right.

The button allows us to remove all the columns from the list on the right in one go.

 

Select ID lecturer, Last name, First Name, Middle name.

Also hide key column.

Picture 11 Lookup Wizard. Hide key column.

 

- Exam

Field Size: 10

Create a combo box

· Exam

· Test

 

Creating a table «Credits»

Table 9 Structure of the table «Credits»

 

Field name Data Type
ID student Number
ID discipline Number
Credit Number

 

In this table two field will be to have the Primary key: ID student and ID discipline

- ID student

This field will be the Primary key for this table.

Field Size: Integer or Autonumerical

Create a relation between this field and the table «Students» by a Lookup wizard (Last name)

 

- ID discipline

This field will be the Primary key for this table.

Field Size: Integer or Autonumerical

Create a r elation between this field and the table «Disciplines» by a Lookup wizard (Name of discipline)

 

- Credit

Field Size: Byte

 

Complete four tables: every table in tens recording.

Creating relationships

To create relationships in Access2003 firstly we need to click on the button on the toolbar.

The Show table dialogue box will appear. Click on one of the tables required in the relationship and click on the Add button; or double-click the name of the table. Repeat the previous step to add the second table, and so on. Finally click on the Close button to finish adding tables.

 

Double click on relation line: the Edit relationships dialogue box appears next:

Picture 12 Edit relationships

 

Observe at the bottom the Relationship type assigned depends on the characteristics of the related fields (in our case One-to-Many)

Activate the Enforce Referential integrity by clicking on it. Also the boxes Cascade Update Related Fields and Cascade Delete Related Records can be activated. To terminate, click on the Create button.

 

Referential integrity is a system of rules that relational database systems use in order to ensure that data stored in related tables are valid. If Referential Integrity is checked, Access will not allow us to insert a record in the related table if there is no matching record in the primary table.

 

Referential integrity has two associated actions:

Cascade update the related fields: If checked, when a value is changed in the related field in the primary table, the values in its related records in the related table will be automatically changed.

Cascade delete related records: If checked, when a record is deleted from the primary table, all of the related records in the related table will also be deleted

 

Save relationships.

 

References:

http://www.teacherclick.com/access2003/index.htm

http://www.jegsworks.com/lessons/databases/intro/index.html

http://www.hostitwise.com/microsoft_access_2003.html

 







ЧТО ТАКОЕ УВЕРЕННОЕ ПОВЕДЕНИЕ В МЕЖЛИЧНОСТНЫХ ОТНОШЕНИЯХ? Исторически существует три основных модели различий, существующих между...

Что делать, если нет взаимности? А теперь спустимся с небес на землю. Приземлились? Продолжаем разговор...

Конфликты в семейной жизни. Как это изменить? Редкий брак и взаимоотношения существуют без конфликтов и напряженности. Через это проходят все...

Что делает отдел по эксплуатации и сопровождению ИС? Отвечает за сохранность данных (расписания копирования, копирование и пр.)...





Не нашли то, что искали? Воспользуйтесь поиском гугл на сайте:


©2015- 2024 zdamsam.ru Размещенные материалы защищены законодательством РФ.