Computer Programming 6 - 1st Periodical Examination

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/87

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

88 Terms

1
New cards

File Systems

• the method of organizing and retrieving files from a storage medium (hard drives, flash drives, CDs, etc.)

• used by personnel in any organization to track and monitor necessary data

2
New cards

A. Disadvantages in Using File Systems

• Lengthy development times

• Report generation and query processing may be slow

• System administration is complex

• Security and data sharing may present issues


• Programming the systems may be too extensive

3
New cards

Database Systems

• refer to an organization of components that define and regulate the collection, storage, management, and use of data within a database environment

• computerized systems whose overall purpose is to maintain information and make that information available on demand

4
New cards

What is a Database?

• a collection of both end-user data and metadata

• presents a more complete depiction of data

• basically works in a similar way as a typical file cabinet does

5
New cards

Metadata

Is self-describing data that contains characteristics and relationships that link the data found within the database itself.

6
New cards

End-user Data

Are raw facts of interest relevant to the end-user using the database.

7
New cards

5 Major Parts of a Database System

Hardware, Software, OS, DBMS Software, Application Programs

8
New cards

Hardware

Identifies all the system’s physical devices.

9
New cards

Software

refers to the collection of programs used by the computers within the database, of which are three 3 types:

• OS (Operating System) Software
• DBMS Software
• Application Programs

10
New cards

OS Software

Refers to the program that manages the hardware components which makes all other software run on a computer.

11
New cards

DBMS Software

Is the software that manages the database within the database system.

12
New cards

Application Program

Are mostly used to access and manipulate data in the DBMS, as well as manage the application environment (interfaces, menus, etc.) where data is accessed and manipulated.

13
New cards

Peopleware

Refers to the people who use the database under certain privileges:

• System Administrators
• Database Administrators (DBAs)
• Database Designers and Architects
• System Analysts and Programmers
• End Users

14
New cards

System Administrators

Oversee the general operations of the database system.

15
New cards

Database Administrators (DBAs)

Manage the use and functionality of the system.

16
New cards

Database Designers and Architects

17
New cards

System Analysts and Programmers

18
New cards

End Users

Use the application programs and, in turn, the database system, for the daily operations of an organization.

19
New cards

Procedures

Are the rules that govern the design and use of the database system by enforcing standards on how the business will be conducted within the organization.

20
New cards

Data

In its entirety, represents the collection of information, their relations and characteristics, within the database system.

21
New cards

Database Models

• Define the logical design of data that can be stored, organized, and manipulated in a database system.

• Provide a representation of the infrastructure offered by a particular database system.

22
New cards

2 Categories of Database Models

• Conceptual Model
• Implementation Model

23
New cards

Conceptual Model

Focuses on the logical nature of the data representation. It is concerned with what is represented in the database.

24
New cards

Implementation Model

Which places emphasis on how the data are represented in the database or how the data structures are implemented to represent what is modeled.

25
New cards

The Building Blocks of a Database Model

• Entities
• Attributes
• Relationships

• Constraints

26
New cards

Entities

Are anything about which data are to be collected and stored, such as a person, a place, a thing, or an event. It represents a particular kind of object in the real world that may either be a physical or conceptual object.

27
New cards

Attributes

Are the defining and/or important characteristics of an entity.

28
New cards

Relationships

Describe the association among entities (for example, a student - teacher relationship, where a student attends classes conducted by several teachers, and a teacher teaching several students). There are three (3) types of relationships:

• One-to-One Relationships (1:1)
• One-to-Many Relationships (1:*)

• Many-to-Many Relationships (*:*)

29
New cards

One-to-One Relationships (1:1)

Depict one entity having a relationship to another entity. For example, a student may be taught by only one teacher throughout a class.

30
New cards

One-to-Many Relationships (1:*)

Depict one entity having a relationship to multiple entities. For example, a teacher having multiple students in a class.

31
New cards

Many-to-Many Relationships (*:*)

Depict multiple entities having multiple relationships to multiple other entities. For example, students can learn many subjects, and many subjects may be applicable to many students.

32
New cards

Constraints

Are restrictions placed on the data in order to ensure data integrity. They are usually written in the form of rules.

33
New cards

Types of Database Models

• Hierarchical Database Model

• Network Model

• Relational Model

• Entity-Relationship Model (E-R Model)

• Object-Oriented Model

34
New cards

Hierarchical Database Model

Is used to manage large amounts of data for complex manufacturing projects, and has a basic logical structure of an up-side-down tree where parent entities can have several children and can be children of other parent entities.

35
New cards

Network Model

Was created to represent complex data relationships, improve database performance, and impose a database standard. It is very similar to the hierarchical model such that it also facilitates 1:* relationships. However, the network database also allows the child to have several parents.

36
New cards

Relational Model

Is a collection of relations visually represented by two-dimensional (2) tables having distinct names. It functions similar to a spreadsheet table with rows called records and columns called fields.

37
New cards

Entity-Relationship Model (E-R Model)

Yields a more graphical representation of entities and their attributes and relationships in a database structure via an entity-relationship diagram. This database model also introduced the three (3) types of relationships.

38
New cards

Object-Oriented Model

Stores data, relationships, and attributes within objects, which represent real-world entities. Objects are categorized into classes, share attributes and methods, and can inherit properties from parent classes.

39
New cards

Database Management Systems (DBMS)

• Part of the database system that manages the database structure and controls access to the data stored in the database.

• Can be a compiled collection of programs or a single program that contains all of the necessary functions.

40
New cards

Functions of a Database Management Systems (DBMS)

• allows data dictionary management
• allows data storage management
• allows data transformation and presentation
• implements security management
• provides access control for multiple users
• provides backup and recovery
• manages data integrity
• provides data access via query language
• provides special communication interfaces and routines

41
New cards

Data Dictionaries

• Also called the Metadata Repository.

• Centralized repositories of information about data such as meaning, relationships to other data, origin, usage, and format.

42
New cards

2 Main Types of Data Dictionaries

• Integrated Data Dictionaries
• Standalone Data Dictionaries

43
New cards

Integrated Data Dictionaries

Are those included as part of the DBMS.

44
New cards

Standalone Data Dictionaries

Are third-party dictionaries separate from the DBMS.

45
New cards

2 Classifications of Data Dictionaries

• Active Data Dictionaries
• Passive Data Dictionaries

46
New cards

Active Data Dictionaries

Are automatically updated by the DBMS by every database access, thus, keeping its access information updated.

47
New cards

Passive Data Dictionaries

Are not automatically updated and requires processing.

48
New cards

What is SQL?

• Stands for Structured Query Language

• A database sublanguage used in querying, updating, and managing relational databases

• Derived from an IBM research group that created Structured English Query Language (SEQUEL) in the 1970s.

• Can either be used in formulating interactive queries or be embedded in an application as instructions for handling data.

• Designed for both technical and non-technical users.

49
New cards

Major Components of SQL

• Data Manipulation Language (DML)
• Data Definition Language (DDL
• Data Control Language (DCL)

50
New cards

Data Manipulation Language (DML)

Is a module of the SQL language which allows you to retrieve, update, add, or delete data in a database.

51
New cards

Data Definition Language (DDL)

Enables you to create and modify the database itself.

52
New cards

Data Control Language (DCL)

Maintains the proper security for the database

53
New cards

CREATE DATABASE statement

Is used to create a database.

54
New cards

DROP DATABASE statement

Is used to delete a database.

55
New cards

ALTER TABLE statement

Allows for the modification of specific attributes of a table, such as addition and deletion of columns.

56
New cards

DROP TABLE statement

Is used to delete a specified table in a database.

57
New cards

SELECT clause

Is used to list the attributes desired in the result of a query, allowing retrieval of data in SQL.

58
New cards

FROM clause

Lists the relations to be scanned in evaluation of an expression.

59
New cards

WHERE clause

Consists of a predicate involving attributes of relations that appear in the FROM clause.

60
New cards

Aggregation

• A common programming term associated with the various methods in summarizing data

• Means to “combine into groups”

• Allows data to be manipulated into something that is not merely displayed

• Transforms data into “real” information: the pattern or context that is used as requirement in order to transform data into something relevant

61
New cards

Aggregate Function Keywords

• SUM keyword
• AVG keyword
• MIN keyword
• MAX keyword
• COUNT keyword

62
New cards

SUM keyword

Will add values of a specified column.

63
New cards

AVG keyword

Will find the average of all given values in a specified column.

64
New cards

MIN keyword

Finds and returns the lowest value in a column.

65
New cards

MAX keyword

Finds and returns the highest value in a column.

66
New cards

COUNT keyword

Will count and return the number of records in a column.

67
New cards

INSERT INTO Statement

• It inserts new data entries in a database table.
• It can be written in two (2) forms:

○ The first statement does not specify any column names and simply contains the values that will be put in their respective fields

○ The second statement specifies column names and the values that will be inserted in them.

68
New cards

UPDATE Statement

• It updates existing data in a database table.

• The SET clause defines which field is to be updated as a condition.

69
New cards

DELETE Statement

• It deletes rows/data entries in a table.

• It also uses the WHERE clause to find a given condition, and then delete the row containing that condition.

• Removing the WHERE clause will delete ALL the records/rows/entries in a table.

• Careful consideration must be given when deleting all records as this action cannot be undone once the statement is executed.

70
New cards

SQL Join Clauses

• These are used to combine records from two (2) or more tables in a database based on a common field/column.

• It has different types depending on the tables used, the data output required, and the way the tables are joined.

71
New cards

Inner Join

• It is a join statement that returns rows where there is at least one match in both tables.

• The primary key of one table must have a matching foreign key to the other table to combine with.

72
New cards

Outer Join

• It is considered as an extension of the inner join, but does not require each record in the two (2) joined tables to have a matching record.

• The joined table retains each record even if no other matching record exists.

• It can further be subdivided into other types of joins depending on which table(s) one retains the rows from (left, right, or both).

73
New cards

LEFT JOIN Statement

It returns all rows from the left table (the first table) even if there are no matches on the right table (the second table).

74
New cards

RIGHT JOIN Statement

It returns all rows from the right table (the second table) even if there are no matches on the left table (the first table).

75
New cards

FULL JOIN Statement

• Both tables are secondary (or optional).

• If rows are being matched in table A and table B, then all rows from table A are displayed even if there is no matching row in table B, and vice versa.

76
New cards

What are SQL Views?

• These are SELECT statements saved in the database.

• Once saved, these can be referred to the same as any table in the database.

• These do not contain data, but allow manipulation similar to tables as if the view was a real table with data.

77
New cards

Benefits of using Views

• Views can reduce complexity
• Views can increase reusability
• Views can properly format data
• Views can create calculated columns
• Views can be used to rename column names
• Views can create subsets of data
• Views can be used to enforce security restrictions

78
New cards

CREATE VIEW

• It creates a new view from existing database tables

• View is stored within the database.

• After a view has been created, it can be brought back by executing a SELECT statement together with its view name.

79
New cards

ALTER VIEW

It allows the editing or alteration of a created or existing view.

80
New cards

DROP VIEW

• It deletes a created or existing view

• The deleted view is basically deleted from the database; exercise caution when deleting unnecessary views.

81
New cards

Functional Dependency

• It describes the relationship between fields (columns) in a table

• It is a constraint between two (2) sets of fields from the database.

• Any field or attribute that provides functional dependency to another field is called the determinant.

82
New cards

Classifications of Functional Dependency

• Full Functional Dependency
• Partial Functional Dependency
• Transitive Functional Dependency

83
New cards

Full Functional Dependency

Indicates that if A and B are fields of a table, B is functionally dependent on A if B “is functionally dependent on A, but not on any proper subset of A”.

84
New cards

Partial Functional Dependency

Indicates that if A and B are attributes of a table, B is partially dependent on A if there is some attribute that can be removed from A and yet the dependency still holds.

85
New cards

Transitive Functional Dependency

Is a condition where A, B and C are attributes of a table such that, if A is functionally dependent on B and B is functionally dependent on C, then C is transitively dependent on A via B.

86
New cards

Database Normalization

• This is the process of organizing data to minimize redundancy in the design of a relational database management system (RDBMS).

• It is a series of recommended steps taken to remove redundancy and update anomalies from a database design.

• This is a specific process that allows designers to turn unstructured data into a properly designed set of tables and data elements.

87
New cards

Goals of Normalization

• Eliminate data redundancy
• Eliminate insert, delete, and update anomalies.

88
New cards

3 Main Rules for Normalizing Data

To eliminate repeating data
To eliminate partial dependencies
To eliminate transitive dependencies