Ãëàâíàÿ ñòðàíèöà
Ñîäåðæàíèå
 
 
Ñêà÷àòü àðõèâ

Specificity SQL statements in MS Access

One of the benefits of Access for a programmer is its relative compatibility with SQL – queries can be viewed graphically or edited as SQL statements can be used directly in Macros and VBA modules to manipulate Access tables. Users can mix and use both VBA and "Macros" for programming forms and logic and offers object-oriented possibilities. VBA can also be included in queries. You can use Query Designer for design SQL request (fig.2).



Figure 2 – Example request in Query Designer

SQL doesn’t follow ANSI standard. Use operator “like” with symbol ‘*’ instead of symbol ‘%’.
Use brackets for creating request with outer joins for many fields:
SELECT * FROM t RIGHT JOIN r3 ON (t.a2 = r3.a1) AND (t.a1 = r3.a1).
This request doesn’t work in MS Access without recourse brackets.

Exercises

                1. Given two sets of FDs for a relvar R{A,B,C.D.E}. Are they
                equivalent?
               1) A B AB C D AC D E
               2) A BC D AE
               2. Prove die reflexivity, augmentation, and transitivity rules, assuming only die basic definition o(functional dependence)
               3. Prove that decomposition, union, and composition rules imply die self-determination.