Docsity

Databases Advantages - E-Commerce - Lecture Slides, Slides of Fundamentals of E-Commerce

Partial preview of the text

Download Databases Advantages - E-Commerce - Lecture Slides and more Slides Fundamentals of E-Commerce in PDF only on Docsity!

Databases

More topics on Databases

• Databases Advantages• Types of Databases• Databases Uses and Issues• Writing Queries in DBMS

Types of Databases

• Individual database

– Integrated files used by one person

• Shared database

– Common operational– Common user

• Distributed database• Proprietary database• Web database

Database Uses and Issues

• Strategic uses

– Data warehouse– Data mining

• Many databases used everyday

– Business directories– Business statistical information– Web search databases

• Security issues

… Competencies

4. Working with SELECT Queries

  1. Using Single Table2. Multiple table3. Parametric (Runtime Criteria) Query

What Are Queries?

-^

Queries

help the user to

select information

from tables

for a specific purpose

-^

Queries

can

  • Show the

selected fields

  • Show

selected records

from one or multiple table

  • Update

selected records

  • Delete

selected records

  • Make new tables– Append records

in an existing table

Creating Queries in Access

•^

QBE (

Query By Example

)^ Approach

  • Allows a

visual Query creation

  • Query Grid

allows to

  • select records

from the required

tables\other queries

  • select only the

desired field

of the

records

  • sort the result

on the basis of some field

values

  • specify record selection criteria

An Example Query in a QBE

Grid

Query showing Saudi Faculty Members

…Creating Queries in Access

• Example

SQL Statements

SELECT Queries

  • UPDATE Queries

SELECT

<field name(s)>

FROM

WHERE

<condition(s)>

UPDATE

SET

WHERE

<condition(s)>

An Example Query in SQL View

Query showing Saudi Faculty Members in

SQL View

Working with SELECT Queries

Compound Criteria Queries (AND \ OR)

1. SELECT Queries: Single Table

-^

Query only needs information from a singletable

-^

Example^ – Faculty information is needed for Saudi Faculty

Query Result

A SELECT Query with single table

….SELECT Queries: Multiple Table •

Effect of using tables without any relationships

Employee Table

Jobs Table

Query Result: CrossProduct of Records

Multiple Table Query having no relationship

3. SELECT Queries: Parametric • When?

  • Criteria value

is flexible to change during

Query runtime

•^

Example^ – Faculty information

who join the university in

a given value

of Year

(given during runtime)

Query Result

Variable Value