→ In the above table, Room having duplicate values. So, we can’t say room is candidate key
→ The last name also having duplicates. So, we can’t say the last name is candidate key.
→ Shift also having duplicate keys, so we can’t say shift also a candidate key.
→ Combining Room and Shift we can say that candidate key.
CASCADE & MVD
GRANT & REVOKE
QUE & QUIST
None of these
Examples of DCL commands:
GRANT-gives user’s access privileges to database.
REVOKE-withdraw user’s access privileges given by using the GRANT command.
All of these
→ Oracle defines it as a collection of tables with metadata. The term can have one of several closely related meanings pertaining to databases and database management systems (DBMS)
1. A document describing a database or collection of databases
2. An integral component of a DBMS that is required to determine its structure
3. A piece of middleware that extends or supplants the native data dictionary of a DBMS
A secondary access path
A physical record key
An inverted index
A primary key
1. To understand how pointers and their associated data elements are allocated in Microsoft RPC, you have to differentiate between top-level pointers and embedded pointers
2. Top-level pointers are those that are specified as the names of parameters in function prototypes. Top-level pointers and their referents are always allocated on the server.
3. Embedded pointers are pointers that are embedded in data structures such as arrays, structures, and unions. When embedded pointers only write output to a buffer and are null on input, the server application can change their values to non-null. In this case, the client stubs allocate new memory for this data.
4. If the embedded pointer is not null on the client before the call, the stubs do not allocate memory on the client on return. Instead, the stubs attempt to write the memory associated with the embedded pointer into the existing memory on the client associated with that pointer, overwriting the data already there.
Database systems that store each relation in a separate operating system file may use the operating system’s authorization scheme, instead of defining a special scheme themselves. In this case, which of the following is false ?
The administrator enjoys more control on the grant option.
It is difficult to differentiate among the update, delete and insert authorizations.
Cannot store more than one relation in a file.
Operations on the database are speeded up as the authorization procedure is carried out at the operating system level.
So, option 1 is clearly false and option 2 is true.
Option 3: In question it is mentioned that each relation is stored in a separate operating system file.
So, option 3 is true.
Option 4 : Since for each relation there is a seperate operating system file which may use the operating system’s authorization scheme.
So, Operations on the database are speeded up as the authorization procedure is carried out at the operating system level.
Let R1(a,b,c) and R2(x,y,z) be two relations in which a is the foreign key of R1 that refers to the primary key of R2 . Consider following four options.
- (a) Insert into R1
(b) Insert into R2
(c) Delete from R1
(d) Delete from R2
Which of the following is correct about the referential integrity constraint with respect to above ?
Operations (a) and (b) will cause violation.
Operations (b) and (c) will cause violation.
Operations (c) and (d) will cause violation.
Operations (d) and (a) will cause violation.
● For example, in a table called customer contact information, a row would likely contain fields such as: ID number, name, street address, city, telephone number and so on.
The DELETE/FROM/WHERE command is used for removing one or more ___.
Attributes from a table(relation)
Tables from a database
Tuples from a table(relation)
DROP command is used for dropping entire table.
● In simpler words, the foreign key is defined in a second table, but it refers to the primary key or a unique key in the first table
To ensure data integrity when reads occur to the database in a multi user environment
To ensure data integrity when updates occur to the database in a single user environment
To ensure data integrity when updates occur to the database in a multi user environment
To ensure data integrity when reads occur to the database in a single user environment
A disadvantage of highly normalized tables is that queries may require too many time consuming joins
Foreign key constraints are referential integrity constraints
A primary key uniquely identifies a row in a table
Nulls reduce space requirements in tables
Option B & C: True: Foreign key constraints are referential integrity constraints. A primary key uniquely identifies a row in a table.
Option D: False: Null won’t reduce space requirements in tables.
The number of constraints
The number of tuples
The number of attributes
The number of tables
→ The degree of relationship (also known as cardinality) is the number of occurrences in one entity which are associated (or linked) to the number of occurrences in another.
There are three degrees of relationship, known as:
1. one-to-one (1:1)
2. one-to-many (1:M)
3. many-to-many (M:N)
Storage dependent details
Entities,attributes and relationships
1. Physical Level
2. Conceptual Level
3. External Level
→ Mapping is the process of transforming request response between various database levels of architecture.
→ Mapping is not good for small database, because it takes more time.
→ In External / Conceptual mapping, DBMS transforms a request on an external schema against the conceptual schema.
→ In Conceptual / Internal mapping, it is necessary to transform the request from the conceptual to internal levels.
1. Physical Level
Physical level describes the physical storage structure of data in database.It is also known as Internal Level. This level is very close to physical storage of data. At lowest level, it is stored in the form of bits with the physical addresses on the secondary storage device. At highest level, it can be viewed in the form of files.The internal schema defines the various stored data types. It uses a physical data model.
2. Conceptual Level
Conceptual level describes the structure of the whole database for a group of users. It is also called as the data model. Conceptual schema is a representation of the entire content of the database. These schema contains all the information to build relevant external records. It hides the internal details of physical storage.
3. External Level
External level is related to the data which is viewed by individual end users. This level includes a no. of user views or external schemas. This level is closest to the user. External view describes the segment of the database that is required for a particular user group and hides the rest of the database from that user group.
(a)-(iii), (b)-(iv), (c)-(i), (d)-(ii)
(a)-(iv), (b)-(iii), (c)-(ii), (d)-(i)
(a)-(iv), (b)-(ii), (c)-(iii), (d)-(i)
(a)-(ii), (b)-(iii), (c)-(iv), (d)-(i)
→ Domain Integrity enforces valid entries for a column
→ Referential integrity rows can’t be deleted which are used by other records
→ User defined integrity enforces some specific business rule that do not fall into entity or domain
1. Insertion anomaly
2. Deletion and Updation anomaly
→ Data mining is the process of discovering patterns in large data sets involving methods at the intersection of machine learning, statistics, and database systems.
→ Data mining is the analysis step of the "knowledge discovery in databases" process, or KDD
reducing the number of joins required to satisfy a query.
eliminating uncontrolled redundancy of data stored in the database.
eliminating number of anomalies that could otherwise occur with inserts and deletes.
ensuring that functional dependencies are enforced.
→ So to avoid this one solution is to have only one big relation so that number of relation access can be reduced.
→ This solution leads to redundancy of data stored in database and various inert, delete, update anomalies. So the solution of these problems is Normalisation using functional dependency. So option B,C,D are clearly correct according to above explanation.
→ Option A is not correct because normalisation does not reduce the number of joins required to satisfy a query it only tries to eliminate redundancy and anomalous using functional dependency.
(a) NULL values can be used to opt a tuple out of enforcement of a foreign key.
(b) Suppose that table T has only one candidate key. If Q is in 3NF, then it is also in BCNF.
(c) The difference between the project operator (Π) in relational algebra and the SELECT keyword in SQL is that if the resulting table/set has more than one occurrences of the same tuple, then Π will return only one of them, while SQL SELECT will return all.
One can determine that:
(a) and (b) are true.
(a) and (b) are true
(b) and (c) are true
(a), (b) and (c) are true
Option(B) is correct. Suppose that table T has only one candidate key. If Q is in 3NF, then it is also in BCNF.
Option (C) is correct because the main difference between Project operator and SELECT keyword is that SELECT keyword will return Duplicate values if the exist in the result of a query but Project Operator Do not return Duplicate values if the exist in the result of the query.
→ Referential integrity to hold in a relational database, any column in a base table that is declared a foreign key can only contain either null values or values from a parent table's primary key or a candidate key.
→ A multivalued dependency exists when there are at least three attributes (like X,Y and Z) in a relation and for a value of X there is a well defined set of values of Y and a well defined set of values of Z. However, the set of values of Y is independent of set Z and vice versa.
→ A functional dependency is a constraint between two sets of attributes in a relation from a database. In other words, functional dependency is a constraint that describes the relationship between attributes in a relation.
I. Views in a database system are important because they help with access control by allowing users to see only a particular subset of the data in the database.
II. E-R diagrams are useful to logically model concepts.
III. An update anomaly is when it is not possible to store information unless some other, unrelated information is stored as well.
IV. SQL is a procedural language.
I and IV only
III and IV only
I, II and III only
II, III and IV only
Statement-II is FALSE because E-R diagram useful to Conceptually model concepts.
Statement-III is FALSE because update anomaly is a data inconsistency results from partial update or data redundancy.
Statement-IV is FALSE because SQL is not a procedural language. A language is procedural when we call procedures( like functions, subroutine) but in SQL we don't do any such calls.
To allow duplicate tuples in the table by filling the primary key column(s) with NULL.
To avoid confusion with actual legitimate data values like 0 (zero) for integer columns and ’’ (the empty string) for string columns.
To leave columns in a tuple marked as ’’unknown’’ when the actual value is unknown.
To fill a column in a tuple when that column does not really ”exist” for that particular tuple.
→ Sometimes the a column of a row does not contain any value or may have zero value in that case also NULL values are used to avoid any kind of confusion regarding the values of the column. So, Option (B),(C) and (D) are the cases when NULL values are used in a relation.
Option(A) is incorrect because Primary key of a relation is a key which uniquely identify each tuple of a relation so it can't have NULL values.
Hierarchical data model suffers from data independence
Network model suffers from data independence
Relational model suffers only from logical data independence
Relational model suffers only from physical data independence
TRUE: Network model suffers from data independence
FLASE: Relational model suffers only from logical data independence
TRUE: Relational model suffers only from physical data independence
D1+D2+ … +Dn
D1×D2× … ×Dn
D1∪D2∪ … ∪Dn
D1–D2– … –Dn
primary key ⊆ super key ⊆ candidate key
primary key ⊆ candidate key ⊆ super key
super key ⊆ candidate key ⊆ primary key
super key ⊆ primary key ⊆ candidate key