databases
DESCRIPTION
Databases. Field Record File / Table Database Entity. Attribute Key Field / Primary Key Candidate Key Composite Key Foreign Key. Terms & Concepts. Traditional File Processing. Flat File Example – (Hospital). Radiology Department. Pathology Department. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/1.jpg)
Databases
![Page 2: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/2.jpg)
Terms & Concepts
• Field• Record• File / Table• Database• Entity
• Attribute• Key Field / Primary Key• Candidate Key• Composite Key• Foreign Key
![Page 3: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/3.jpg)
Traditional File Processing
![Page 4: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/4.jpg)
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
![Page 5: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/5.jpg)
Traditional File Environment Problems
• Data redundancy• Data inconsistency• Program-data dependence• Lack of flexibility• Poor security• Lack of data sharing and availability
![Page 6: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/6.jpg)
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
![Page 7: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/7.jpg)
Advantages of the Database Approach (cont’d)
4-7
6. Enforcement of standards7. Improved data quality8. Improved data accessibility9. Reduced program maintenance
![Page 8: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/8.jpg)
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
![Page 9: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/9.jpg)
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
![Page 10: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/10.jpg)
Flat File Example – Student Db
StuID Fname Lname Street City State ZipCd Sem
1111 Jane Smith Main Cape MO 63701 Spring1111 Jane Smith North Anna IL 62980 Spring
1111 Jane Smith Railrd Sike MO 63755 Spring
Year CID Course Sec Desc Hrs Prof Phone2009 0413 MI375 01 MIS 3 Schw 73872009 0413 MI375 01 MIS 3 Schw 73872009 0413 MI375 01 MIS 3 Schw 7387
Continued
![Page 11: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/11.jpg)
Relational File Example
SID Fname Lname
1111 Jane Smith
SID CID EID1111 2345 DS11111 3687 JR3
Student Database
SID Street Zip Phone Addtype
1111 Main 63701 2100 home
CID CrsNum Sec Desc Hrs
0375 MI375 03 MIS 30301 MK304 01 MKTG 3
Schedule
Student_Address
Course
Students
DrID Fname LnameDS1 Dana SchwieJR3 James Ricks
![Page 12: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/12.jpg)
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
![Page 13: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/13.jpg)
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
![Page 14: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/14.jpg)
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
![Page 15: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/15.jpg)
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
![Page 16: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/16.jpg)
Query by Example
4-16
• Simpler than SQL
• Drag-and- drop features
• Construct a sample of the data we would like to see
![Page 17: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/17.jpg)
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
![Page 18: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/18.jpg)
Operational vs. Informational Systems
4-18
![Page 19: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/19.jpg)
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
![Page 20: Databases](https://reader035.vdocument.in/reader035/viewer/2022062501/568163a3550346895dd4aa52/html5/thumbnails/20.jpg)
AssociationsTB-20
• Used to relate information between tables• Needed to retrieve information• Example: Basketball league database