Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Answer the following questions. Upload/submit your written answers in MS-Word as

ID: 674172 • Letter: A

Question

Answer the following questions. Upload/submit your written answers in MS-Word as an attachment.

1. Define each of the following terms

a) file organization
b) sequential file organization
c) hashed file organization
d) denormalization
e) composite key
f) secondary key
g) data type

2. Using to Figure 6-11 below, write SQL data definition commands for each of the following queries:



a) How would you add an attribute, Class, to the Student table?
b) How would you remove the Registration table?
c) How would you change the FacultyName field from25 characters to 40 characters?

3. Using to Figure 6-11 below, write SQL commands for the following:

Figure 6-11

a) Create two different forms of the INSERT command to add a student with a student ID of 65798 and last name Lopez to the Student table.
b) Now write a command that will remove Lopez from the Student table.
c) Create an SQL command that will modify the name of course ISM 4212 from Database to Introduction to Relational Databases.

4. Define each of the following terms:

a) dynamic SQL
b) correlated subquery
c) embedded SQL
d) procedure
e) join

Explanation / Answer

Answer 1

a) file organization: is a method of arranging the records in a file when the file is stored on disk. A relation is typically stored as a file of records.


b) sequential file organization:A sequential file is designed for efficient processing of records in sorted order on some search key. Records are chained together by pointers to permit fast retrieval in search key order. Pointer points to next record in order. Records are stored physically in search key order

c) hashed file organization:

In a hash file, records are not stored sequentially in a file instead a hash function is used to calculate the address of the page in which the record is to be stored.

The field on which hash function is calculated is called as Hash field and if that field acts as the key of the relation then it is called as Hash key. Records are randomly distributed in the file so it is also called as Random or Direct files. Commonly some arithmetic function is applied to the hash field so that records will be evenly distributed throughout the file.


d) denormalization:denormalization is the process of attempting to optimize the read performance of a database by adding redundant data or by grouping data


e) composite key:A composite key, in the context of relational databases, is a combination of two or more columns in a table that can be used to uniquely identify each row in the table. Uniqueness is only guaranteed when the columns are combined; when taken individually the columns do not guarantee uniqueness.


f) secondary key :An entity may have one or more choices for the primary key. Collectively these are known as candidate keys. One is selected as the primary key. Those not selected are known as secondary keys.


g) data type:When you create a table or add a field to a table in the geodatabase, fields are created as a specific data type. Data types are classifications that identify possible values for and operations that can be done on the data, as well as the way the data in that field is stored in the database.

Answer 2: could not find mentioned details:more specific details are required.

Answer 3:could not find mentioned details:more specific details are required.

Answer 4:

a) dynamic SQL:Dynamic SQL is an enhanced form of Structured Query Language (SQL) that, unlike standard (or static) SQL, facilitates the automatic generation and execution of program statements. This can be helpful when it is necessary to write code that can adjust to varying databases, conditions, or servers. It also makes it easier to automate tasks that are repeated many times.


b) correlated subquery:Many queries can be evaluated by executing the subquery once and substituting the resulting value or values into the WHERE clause of the outer query. In queries that include a correlated subquery (also known as a repeating subquery), the subquery depends on the outer query for its values. This means that the subquery is executed repeatedly, once for each row that might be selected by the outer query.


c) embedded SQL:Embedded SQL is a method of combining the computing power of a programming language and the database manipulation capabilities of SQL. Embedded SQL statements are SQL statements written inline with the program source code of the host language


d) procedure:Like a PL/SQL function, a PL/SQL procedure is a named block that does a specific task. PL/SQL procedure allows you to encapsulate complex business logic and reuse it in both database layer and application layer.


e) join:A SQL join clause combines records from two or more tables in a relational database. It creates a set that can be saved as a table or used as it is. A JOIN is a means for combining fields from two tables (or more) by using values common to each.

Hope, It will help you.

Thanks

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote