+ All Categories
Home > Documents > Databases. Terms & Concepts Field Record File / Table Database Entity Attribute Key Field / Primary...

Databases. Terms & Concepts Field Record File / Table Database Entity Attribute Key Field / Primary...

Date post: 19-Dec-2015
Category:
View: 249 times
Download: 0 times
Share this document with a friend
Popular Tags:
20
Databases
Transcript

Databases

Terms & Concepts

• Field• Record• File / Table• Database• Entity

• Attribute• Key Field / Primary Key• Candidate Key• Composite Key• Foreign Key

Traditional File Processing

Flat File Example – (Hospital)

Patno Fname Lname Street City Service Servchrg

1111 Jane Smith Main Cape X-ray $125.00

Patno Fname Lname Street City Service Servchrg

1111 Jane Smith Main Cape Blood $15.00

Radiology Department

Pathology Department

Traditional File Environment Problems

• Data redundancy• Data inconsistency• Program-data dependence• Lack of flexibility• Poor security• Lack of data sharing and availability

Advantages of the Database Approach

4-6

1. Program-data independence2. Minimal data redundancy3. Improved data consistency4. Improved data sharing5. Increased productivity of application

development

Advantages of the Database Approach (cont’d)

4-7

6. Enforcement of standards7. Improved data quality8. Improved data accessibility9. Reduced program maintenance

Database Exercise

• Create the following five tables using the fields listed below. Underline the Key field(s) for each table.

Tables: Students Courses Zip_codes Student_addresses Instructors

Fields: StudentID (2), Instructor_ID, City, Student_firstname, Zipcode (2), State, CourseID, Course_num, Instructor_firstname, Course_section, Address_ type, Student_lastname, Street, DOB, Entry_date, Instructor_lastname, Instructor_phone, Course_description, course_hours

Database ExerciseStudents

StudentID, St_FirstName, St_LastName, DOB, Entry_DateCourses

CourseID, CourseNum, CourseSection, CourseDescription, CourseHours

Zip_codes ZipCode, City, State

Student_addressesStudentID, Street, ZipCode, AddressType

InstructorsInstructorID, Instructor_FirstName, Instructor_LastName, Instructor_Phone

Flat File Example – Student Db

StuID Fname Lname Street City State ZipCd Sem

1111 Jane Smith Main Cape MO 63701 Spring

1111 Jane Smith North Anna IL 62980 Spring

1111 Jane Smith Railrd Sike MO 63755 Spring

Year CID Course Sec Desc Hrs Prof Phone

2009 0413 MI375 01 MIS 3 Schw 7387

2009 0413 MI375 01 MIS 3 Schw 7387

2009 0413 MI375 01 MIS 3 Schw 7387

Continued

Relational File Example

SID Fname Lname

1111 Jane Smith

SID CID EID

1111 2345 DS1

1111 3687 JR3

Student Database

SID Street Zip Phone Addtype

1111 Main 63701 2100 home

CID CrsNum Sec Desc Hrs

0375 MI375 03 MIS 3

0301 MK304 01 MKTG 3

Schedule

Student_Address

Course

Students

DrID Fname Lname

DS1 Dana Schwie

JR3 James Ricks

Creating a Database

• Designing– Data need to be organized for retrieval and analysis

• Key elements of a database– Data

» Normalization• Repeating groups

– Structure» Data model

• A map or a diagram representing entities and their relationships» Entity-Relationship (ER) Diagram

• Distributing– Client / server networks

• Partitioned database• Duplicate database

Effective Management of Databases

4-13

• Database Administrator (DBA)– Responsible for development and management

of databases• Works with system analysts and programmers • Works with users and managers • Implements security features• Grants access rights

– One of the key actors in creating a successful database

Entering Data

4-14

• Forms– Enter data about a record– Field in a form corresponds to attribute in a record– Used to add, modify, or delete data

Querying Data

4-15

• Query: Used to retrieve information• Structured Query Language (SQL)

– Example: Display students who earned an “A”

– Writing SQL queries can become very complex

Query by Example

4-16

• Simpler than SQL

• Drag-and- drop features

• Construct a sample of the data we would like to see

Creating Database Reports

4-17

• Report– Compilation of data from the database

• Report generators– Retrieve, manipulate, and display data

• Exampleo Quarterly sales for a

restaurant• Adding• Grouping

Operational vs. Informational Systems

4-18

Data Warehouses and Data Marts

4-19

• Data Warehouse– Integration of multiple large databases and other

information sources into a single repository– Pull together, integrate, and share critical corporate data

throughout the firm

• Data Mart – Data warehouse that is limited in scope– Customized for the decision support applications of a

particular end-user group

AssociationsTB-20

• Used to relate information between tables• Needed to retrieve information• Example: Basketball league database


Recommended