Q11. Integrity constraints consist of a group of rules for maintaining the quality of data or information. Integrity constraints control the insertion of data, updates and ensure that other processes are done in a way to safeguard data integrity. The constraints are used to prevent the database from accidental damage.
a.)Domain Constraints-these are definitions that describe the validity of an attribute. Examples of domain constraints include character, time, date, string and currency among others.
b.)Entity integrity constraints-entity integrity constraints ensure that primary fundamental values have a value since the keys are used in the identification of rows in a relation. If the primary keys were to be null, it would be hard to identify any row. In a table, all the other fields can contain a null value, but not a primary key field.
c.) Referential Integrity Constraints- referential integrity constraints are located between two tables.
Q15. a). Set Difference (-)- the set difference operation is used to establish data that is present in one relation missing in another. The set difference and Union operation can both be used in two relations but not present in the other relation.
b.) Union Operation (∪)- the union operation is used to obtain data from two tables. The operation can only work when the tables have an equal number of columns and attribute domains. Duplicate data is automatically removed from the tables.
c.) Select Operation (σ)- the select operations are used to find rows that fulfill a specific condition in a table.
d.) Rename Operation (ρ)- rename operation is used to rename the output relation in query operations, which provide results, for instance, Select or Project.
e.) Cartesian Product- the cartesian product multiplies two sets to make a set of all pairs in order. The first element in an ordered pair is from the first set, while the second comes from the second set.
Q16 Project Operation (∏)
The Project Operation shows only the desired characteristics in a relation. For instance, if you wish only to see the names of students in a table, you can use the project operation. Duplicate data will be deleted and columns containing other information such as admission number, position in exams, among others will not be displayed.
Q18. Union Operation (∪)
Union Operation is used to obtain data from two tables. Union Operation can only work when the tables being used have equal columns and attribute domains. Every item that has a variance between the tables is automatically omitted in the results.
Syntax: P ∪ Q
P and Q are relations.
Q20. Set Difference (-)
The Set Difference Operation helps in finding data that is available in one relation but missing in another. Just like the Union operation, Set Difference operation can be used on two sets of data relations).
Syntax: P - Q
P and Q are relations.
Q24. A cylinder is a hard disk drive’s (HDD) set of tracks that are of equal diameter. It is a circle that extends through each platter from both sides.
Q25. File allocation table(FAT) refers to a way in which the contents of a hard drive is recorded. The method was introduced in 1997 and was used by earlier versions of Microsft operating systems. The table consists of numerals that match with a hard drive's cluster addresses.
Q26. A hard disc stores data on its platter’s surface in tracks and sectors. The sectors are pie-shaped, while tracks are circular. Tracks are shown in yellow, while industries are shown in blue. Each sector has a definite number of bytes and is grouped into clusters at the operating system or the drive.
Q31. SQL’s ORDER BY clause sorts data in an ascending or descending order under the guidance of columns. Items that meet the selection criteria are returned while those that do not are discarded.
Q32. GROUP BY HAVING clause is one of SQL’s tools for summarizing or aggregating data series. You can, for instance, add up the daily sales and have them combined in a single quarter for presentation to the management. Again, if you want the sum of the total number of employees in each department in a company, the clause will be handy. The provision classifies data in a database into columns and adds up the results.
Q33. We have seven arithmetic operators: Addition, Unary minus, Multiplication, Modulo, DIV, Subtraction,and Division. Unary minus is used to change an argument’s sign. Just like in basic arithmetic calculations, there exists Operator Precedence in SQL’s arithmetic operators.
Q34. A comparison of a relational operator refers to a mathematical symbol that helps to compare two values. Comparison operators include <(less than), >(greater than), <=(less than or equal to), => (greater than or equal to) among others.
Q35. Set operators help combine set results returned by two different queries. SQL’s set operators include INTERSECT, MINUS, UNION ALL and UNION.
Q44. A computer's memory can be classified into five hierarchies depending on use and speed. Based on a processor's requirements, it can move from one level of memory to the other. Stored data in the first three hierarchies are lost when power runs out since their memory is volatile. Data is permanently stored in the other two non-volatile hierarchies.
Registers
Registers are usually a static SRAM or RAM in a computer's processor, used to hold data. Register's are usually 64 or 128 bits. All computer processors have registers and most of them often use an accumulator or word register. A status word register takes care of the decision-making function while the accumulator stores data, for instance, mathematical operations.
Cache Memory
The processor also contains cache memory. Cache memory holds much of the data frequently used in the main memory. A computer that has a single core also has one cache level. However, present multi-core processors can have three cache memories where one is shared, while the other two are independently used.
Main Memory
A computer’s main memory is the CPU’s memory unit tasked with direct communication. It is the computer’s main storage unit. It is fast and has enough memory to store data throughout a computer's operation. The main memory contains both ROM and RAM.
Magnetic Disks
A computer’s magnetic disk is circular and fabricated using a magnetized material. Often, a disk's two faces are used and a number of discs can be stacked top of each other on a spindle by write heads. A computer runs all the disks simultaneously at high speeds. A computer’s tracks are bits stored in its magnetized plates neighboring te concentric circles. The magnetized planes are further divided into two sectors.
Magnetic Tape
The magnetic tape is a recording designed with a slender magnetizable plastic cover on top of the thin strip. It is used to back up bulk data. A computer has first to mount to gain access to data in a magnetic strip. Upon authorization of access, data is unmounted. However, data access time when using magnetic tapes will be lengthy; it usually takes some minutes.
Q48. The heap file structure is the basic form of organizing files. Records are not sorted or ordered, but rather, get inserted at a file’s end. Upon a data block becomes full, a new block, which need not be adjacent, becomes available for storing the next record. Data blocks are not sequentially selected and it is incumbent upon the DBMS to store and manage the records. When retrieving a record from the database using the heap file structure, you have to start from the beginning and peruse all files until the requested record can be found. Fetching records in vast relations is thus time-consuming since all data has to be checked.
Q49. The hash file, random or direct structure uses the hash function to establish the location of the block where a record will be stored. The hash function is a mathematical function that is applied to specific attributes to locate the block address. Each record in a hash structure is randomly stored, notwithstanding the order in which they came. A hash key is a crucial column where a hash function has been generated, while a hash column is one where the hash function has been generated on a non-key column. Little effort is required to insert or retrieve a record since the hash key generates its address. The same case applies when updating or deleting files.