Sybase 2 Barcode Reader User Manual


 
Working with database components
52 DataWindow .NET
How you work with
databases in
DataWindow Designer
You can use DataWindow Designer to work with the following database
components:
Tables and columns
•Keys
Indexes
Database views
Extended attributes
Additional database components
Tables and columns
A database usually has many tables, each of which contains rows and columns
of data. Each row in a table has the same columns, but a column’s value for a
particular row could be empty or
NULL if the column’s definition allows it.
Tables often have relationships with other tables. For example, in the EAS
Demo DB included with DataWindow Designer, the
Department table has a
Dept_id column, and the Employee table also has a Dept_id column that
identifies the department in which the employee works. When you work with
the
Department table and the Employee table, the relationship between them is
specified by a join of the two tables.
Keys
Relational databases use keys to ensure database integrity.
Primary keys A primary key is a column or set of columns that uniquely
identifies each row in a table. For example, two employees may have the same
first and last names, but they have unique ID numbers. The
Emp_id column in
the Employee table is the primary key column.
Foreign keys A foreign key is a column or set of columns that contains
primary key values from another table. For example, the
Dept_id column is the
primary key column in the
Department table and a foreign key in the Employee
table.
Key icons In DataWindow Designer, columns defined as keys are displayed
with key icons that use different shapes and colors for primary and foreign.
DataWindow Designer automatically joins tables that have a primary/foreign
key relationship, with the join on the key columns.