CY-802-A Database Security

Database Security (CY-802-A) Important Questions

RGPV · B.Tech · Cyber Security · Semester 8 · Current scheme · 0 papers

  1. Read the answers

    Start with the topics that come every year.

  2. Revise unit notes

    Go through each unit once to score more.

Paperwala Imp Topics - Database Security important questions

Download Paperwala Imp Question & Answer (PDF)

Chosen from the syllabus. No past paper of this subject is on this site yet, so repeats could not be counted.

Database Security important questions with answers

Each answer starts with the short answer. Then come the points to write, a diagram and an exam tip. The topics are chosen from the syllabus.

Q1. Database system architecture and overview of information security

From the syllabus · Unit 1

From the papers

  • “Unit 1: Databases and information systems, database system concepts and architecture, overview of information security.” (Syllabus)

The short answer

A database system stores shared data and a DBMS manages it for many users. Information security protects data with three goals: confidentiality, integrity and availability.

Write these points

Database system architecture

  • Three levels: the external level (user views), the conceptual level (whole design) and the internal level (storage).
  • DBMS parts: query processor, storage manager, transaction manager and catalog.
  • Users: end users, application programs and the database administrator (DBA).

The CIA goals

  • Confidentiality: only allowed people read the data.
  • Integrity: data stays correct and is changed only in allowed ways.
  • Availability: data is there when needed.

A bank account record.

Confidentiality: a clerk sees the balance, but a customer sees only her own balance.

Integrity: a transfer of 5,000 rupees must subtract 5,000 from one account and add 5,000 to the other, or do nothing.

Availability: the app must work at 9 in the morning on the first of the month, when many salaries arrive.

Remember. The syllabus lists topic names only and the textbook was not seen. The answers give the general account found in common database and security books. Your class notes may use different wording.

Real-life example

A college keeps student marks in a database. Faculty can enter marks for their own subject only. Students can view but not change their results. The office needs the database running during result week. All three goals appear in one system.

Diagram: Database system architecture and overview of information security

Same or opposite: confidentiality and integrity

PointConfidentialityIntegritySame or opposite
Protects againstReading by the wrong personWrong changeOpposite
Typical controlAccess control, encryptionConstraints, auditOpposite
Is a security goalYesYesSame
Example failureMarks leakedMarks alteredOpposite

Exam tip. Write the three levels of architecture and the three CIA goals. A small bank example for each goal earns the marks.

Back to the topic list

Q2. Functional dependencies, keys and closure

From the syllabus · Unit 1

From the papers

  • “Unit 1: Functional dependencies: keys in a relational model, concept of functional dependencies.” (Syllabus)

The short answer

A functional dependency (FD) X to Y means that if two rows agree on X they agree on Y. A key is a set of attributes whose closure is all attributes and which has no smaller such set.

Write these points

Main terms

  • Superkey: any set that determines all attributes.
  • Candidate key: a minimal superkey. The chosen one is the primary key.
  • Closure X+: all attributes that X determines.
  • Armstrong rules: reflexivity, augmentation and transitivity.

Find a closure

  1. Start with X.
  2. Find an FD whose left side is inside the set.
  3. Add its right side.
  4. Repeat until nothing is added.

Closure and key of R(A, B, C, D, E).

FDs: A to B, B to C, CD to E.

A+ = {A, B, C}. (AD)+ = {A, B, C, D, E}, which is all attributes. CD+ = {C, D, E}.

No smaller set works, so AD is the only candidate key.

Real-life example

In a college table, the roll number decides the student name and the branch. Two rows with the same roll number cannot show different names. That rule is a functional dependency. A clerk who types two names for one roll number has broken it.

Diagram: Functional dependencies, keys and closure

Same or opposite: superkey and candidate key

PointSuperkeyCandidate keySame or opposite
Determines all attributesYesYesSame
Must be minimalNoYesOpposite
Number in a tableManyFewOpposite
ExampleRoll no, NameRoll noOpposite

Exam tip. Show the closure steps for a small example and name the key. Write the three Armstrong rules.

Back to the topic list

Q3. Normal forms up to BCNF

From the syllabus · Unit 1

From the papers

  • “Unit 1: Normal forms based on primary keys, BCNF.” (Syllabus)

The short answer

Normal forms remove redundancy and update problems by splitting tables by their functional dependencies. The forms 1NF, 2NF, 3NF and BCNF each add a stricter rule.

Write these points

The forms

  • 1NF: every value is atomic. No repeating groups.
  • 2NF: 1NF and no partial dependency of a non-key attribute on part of a key.
  • 3NF: 2NF and no transitive dependency of a non-key attribute on the key.
  • BCNF: for every FD X to Y, X is a superkey.

Why it matters for security

Redundant copies of data must all be protected and kept consistent. A data item stored once has one place to guard.

A table not in BCNF.

Table Class(Student, Course, Teacher) with FDs: Student, Course to Teacher and Teacher to Course.

Teacher is not a superkey, but Teacher decides Course. So the table is not in BCNF.

Split into (Teacher, Course) and (Student, Teacher). Now each FD has a key on its left side.

Real-life example

A shop keeps the customer address in every bill row. When the customer moves, some rows show the old address and some the new one. Splitting the address into a customer table fixes this. One update changes one row.

Diagram: Normal forms up to BCNF

Same or opposite: 3NF and BCNF

Point3NFBCNFSame or opposite
Rule on every FD X to YX is a superkey or Y is part of a keyX is a superkeyOpposite
StrictnessWeakerStrongerOpposite
Removes partial and transitive dependenciesYesYesSame
Always keeps all FDs after splittingYesNot alwaysOpposite

Exam tip. State each form in one line. Give the BCNF example and the split. Say that each higher form removes one more kind of redundancy.

Back to the topic list

Q4. Multivalued, join and inclusion dependencies: 4NF and 5NF

From the syllabus · Unit 1

From the papers

  • “Unit 1: Multi-valued dependencies and fourth normal form, join dependencies and fifth normal form, inclusion dependencies.” (Syllabus)

The short answer

A multivalued dependency (MVD) means that for each X value the set of Y values is independent of the other attributes. 4NF removes it, 5NF removes join dependencies and an inclusion dependency says values in one column must appear in another.

Write these points

Further dependencies

  • MVD and 4NF: in a table of employee, skill and language, skills and languages are independent. Storing both in one table repeats rows.
  • Join dependency and 5NF: a table that can be rebuilt by joining several smaller tables has a join dependency.
  • Inclusion dependency: a foreign key is the common case. Every Dept ID in Employee must exist in Department.
  • These are less common than FDs, but they guide good design.

Rows saved by 4NF.

Ram knows 2 skills (Java, SQL) and 3 languages (Hindi, English, Marathi). One table needs 2 x 3 = 6 rows.

Two tables, (Employee, Skill) and (Employee, Language), need 2 + 3 = 5 rows. Adding a new skill adds 1 row, not 3 rows.

Remember. The notation for an MVD uses a double arrow. It is written as to-to in this text.

Real-life example

A bank keeps for each customer a list of mobile numbers and a list of email addresses. The two lists have no link with each other. Storing them in one table forces every number to pair with every email. Two small tables remove the waste.

Diagram: Multivalued, join and inclusion dependencies: 4NF and 5NF

Same or opposite: FD and MVD

PointFunctional dependencyMultivalued dependencySame or opposite
X decidesOne value of YA set of Y valuesOpposite
Normal form it leads toBCNF4NFOpposite
Used to remove redundancyYesYesSame
ExampleRoll no to NameEmployee to-to SkillOpposite

Exam tip. Define each of the four dependencies with one example. State the row count example for 4NF.

Back to the topic list

Q5. Database security lifecycle

From the syllabus · Unit 2

From the papers

  • “Unit 2: Database security lifecycle.” (Syllabus)

The short answer

The database security lifecycle is a repeating process: identify the data, assess the risk, design and apply controls, monitor and review with feedback.

Write these points

Phases

  1. Identify and classify the data: public, internal, confidential, secret.
  2. Assess risk: threats, weak points and impact.
  3. Design the security architecture and policies.
  4. Apply controls such as access rules, encryption and audit.
  5. Monitor and audit use.
  6. Review and adjust policies from the feedback.
  • It is a cycle: the end of one round starts the next.
  • Each phase has an owner, usually the DBA and the security team.
  • Records of each round are kept for audit.

Classify four tables.

Course list: public. Staff directory: internal. Student marks: confidential. Exam paper before the test: secret.

The classes decide the controls: marks need role based access and audit, the paper needs encryption and two person approval.

Real-life example

A university reviews its student database every year. They list the tables, mark the most sensitive ones and check who has access. After a leak of phone numbers last year they added masking. The yearly round keeps the controls fresh.

Diagram: Database security lifecycle

Same or opposite: lifecycle and one-time setup

PointLifecycleOne-time setupSame or opposite
RepeatsYesNoOpposite
Uses feedbackYesNoOpposite
Applies security controlsYesYesSame
Handles new threatsYesPoorlyOpposite

Exam tip. Draw a circle of phases with an arrow back to the start. State that feedback keeps the controls current.

Back to the topic list

Q6. Data risk assessment: threats, risks and vulnerabilities

From the syllabus · Unit 2

From the papers

  • “Unit 2: Data risk assessment, analyse data threats, risks and vulnerabilities.” (Syllabus)

The short answer

Data risk assessment finds what could go wrong with the data, how likely it is and how bad it would be. Threats are possible harms, vulnerabilities are weak points and risk is their combination.

Write these points

Terms

  • Asset: the data and systems of value.
  • Threat: an actor or event that can cause harm, such as an attacker or a power cut.
  • Vulnerability: a weakness such as a default password.
  • Risk = likelihood x impact.

Steps

  1. List the assets and give each a value.
  2. List threats and weak points.
  3. Estimate likelihood and impact.
  4. Rank the risks.
  5. Choose to reduce, transfer, accept or avoid each one.

Annual loss expectancy.

The single loss expectancy (SLE) of a data breach is 200,000 rupees. It is expected 1 time in 4 years, so the annual rate (ARO) is 0.25.

ALE = SLE x ARO = 200,000 x 0.25 = 50,000 rupees a year.

A control that cuts the rate to 0.05 gives an ALE of 10,000. The saving is 40,000 rupees a year, so the control is worth up to that cost each year.

Remember. The loss and rate values are illustrative. Real values come from past incidents and business records.

Real-life example

A cooperative bank lists its customer database, the card system and the backup tapes. It sees that the backup tapes sit in an open cupboard. The weak point is cheap to fix and the loss would be large. The bank fixes it first.

Diagram: Data risk assessment: threats, risks and vulnerabilities

Same or opposite: threat and vulnerability

PointThreatVulnerabilitySame or opposite
IsA source of harmA weak pointOpposite
ExampleHacker, fireDefault passwordOpposite
Both feed into riskYesYesSame
Can be removed by the ownerOften notYes, by fixing itOpposite

Exam tip. State the risk formula and the steps. Give the ALE calculation. Say that high risk items are fixed first.

Back to the topic list

Q7. Database security architecture and the need for it

From the syllabus · Unit 2

From the papers

  • “Unit 2: Need for a database security architecture, database security architecture.” (Syllabus)

The short answer

A database security architecture is the layered design of controls that protect the data. It is needed because one control alone can fail and because threats arrive at many points.

Write these points

Layers

  • Network layer: firewalls and secure connections.
  • Host layer: operating system hardening and patches.
  • Database layer: accounts, roles, privileges, encryption and auditing.
  • Application layer: input checks and safe queries.
  • Physical layer: locked rooms and controlled devices.

Need for the architecture

  • Defence in depth: an attacker must pass every layer.
  • Clear duties: each team knows which layer it owns.
  • Compliance: laws such as data protection rules need documented controls.

Two layers fail.

Suppose each layer stops 90 percent of attacks and the layers act independently. One layer lets 10 percent through.

Three layers let through 0.1 x 0.1 x 0.1 = 0.001, which is 0.1 percent. More layers cut the risk fast, but real layers are not fully independent.

Real-life example

A hospital protects patient records with a firewall at the gate, a login for each doctor, encrypted storage and a log of every record opened. If a nurse's password is stolen, the log still shows odd access. No single layer carries the whole load.

Diagram: Database security architecture and the need for it

Same or opposite: single control and layered design

PointSingle controlLayered designSame or opposite
If one control failsData is exposedOther layers still guardOpposite
CostLowerHigherOpposite
Aims to protect dataYesYesSame
Fit for sensitive dataWeakStrongOpposite

Exam tip. Draw the layers as a stack from network to data. Write the term defence in depth. Add the probability example.

Back to the topic list

Q8. Feedback mechanisms and adjusting policies

From the syllabus · Unit 2

From the papers

  • “Unit 2: Implement feedback mechanisms, adjust policies and practices based on feedback using different security models.” (Syllabus)

The short answer

A feedback mechanism collects information about how the controls work, such as logs, alerts and audit results. Policies and practices are adjusted from this feedback using a security model that states what is allowed.

Write these points

Feedback sources

  • Audit logs of logins, queries and changes.
  • Alerts from intrusion detection.
  • Incident reports and user complaints.
  • Penetration tests and reviews.

Adjusting policy

  1. Collect the feedback.
  2. Compare it with the security model, such as role based or multilevel rules.
  3. Find rules that are too weak or too strict.
  4. Change the policy and test it.
  5. Record the change and watch the result.

A log review.

Logs show 40 failed logins on one account in 10 minutes.

The policy says to lock an account after 5 failures. The lock had been off, so the team turns it on. The next week shows 5 failed logins at most per account.

Real-life example

A bank audit finds that clerks of one branch open the same customer files many times a day. The rule allowed any clerk to read any file. The bank changes the rule so that a clerk reads only the files of her own branch.

Diagram: Feedback mechanisms and adjusting policies

Same or opposite: feedback and policy

PointFeedbackPolicySame or opposite
IsInformation about resultsA rule of what is allowedOpposite
Comes fromLogs and auditsManagement and the modelOpposite
Needed for a secure databaseYesYesSame
ChangesEvery dayOnly after reviewOpposite

Exam tip. Show the loop: policy, control, log, review, new policy. Name two security models you know, such as role based and multilevel.

Back to the topic list

Q9. Database vulnerabilities, external and internal threats

From the syllabus · Unit 3

From the papers

  • “Unit 3: Database vulnerabilities, external and internal database threats, data and database security against network and perimeter security.” (Syllabus)

The short answer

Database vulnerabilities are weak points in the database, its software or its use. Threats are external (attackers) or internal (staff), unlike perimeter security.

Write these points

Common vulnerabilities

  • SQL injection: user input is joined into a query and changes its meaning.
  • Weak or default passwords and too many privileges.
  • Unpatched software with known flaws.
  • Misconfiguration: open ports and test accounts left on.
  • Unencrypted data and backups.

Data security against perimeter security

A firewall guards the edge. It cannot stop a valid user who misuses data or an attacker who gets past the edge. The database needs its own controls.

import sqlite3
con = sqlite3.connect(":memory:"); c = con.cursor()
c.execute("create table users(name text, pw text)")
c.executemany("insert into users values(?,?)", [("asha","x1"),("ravi","y2"),("meena","z3")])
pw = "' OR '1'='1"
q = "select name from users where name='asha' and pw='%s'" % pw
print(c.execute(q).fetchall())
print(c.execute("select name from users where name=? and pw=?", ("asha", pw)).fetchall())
# output: [('asha',), ('ravi',), ('meena',)]
# output: []

What the run shows.

The first query becomes pw = '' OR '1'='1', which is always true, so all 3 rows are returned.

The second query uses placeholders. The text is treated as data, so the result is 0 rows.

Real-life example

A student login page on a college site checks the roll number and password with a joined query. A visitor types a trick string in the password box and sees the whole student list. Using placeholders in the query would have stopped it.

Diagram: Database vulnerabilities, external and internal threats

Same or opposite: external and internal threats

PointExternalInternalSame or opposite
SourceOutside attackerStaff or contractorOpposite
Knows the systemLittle at firstWellOpposite
Can cause data lossYesYesSame
Main controlPerimeter and patchingLeast privilege and auditOpposite

Exam tip. List five vulnerabilities and give the injection example. State clearly that perimeter security is not enough. Run a code example if you can.

Back to the topic list

Q10. Risks of not securing data and the security hierarchy

From the syllabus · Unit 3

From the papers

  • “Unit 3: Risks of not securing an organization's data, typical database security hierarchy.” (Syllabus)

The short answer

The risks of not securing data are loss of money, trust and legal standing. A typical database security hierarchy protects data in layers from the site down to the single field.

Write these points

Risks

  • Data theft or leak: customers lose private information.
  • Tampering: wrong marks, balances or records.
  • Downtime: the service stops.
  • Legal and financial loss: fines and repair cost.
  • Loss of trust: users leave.

Security hierarchy

  1. Physical: building and server room.
  2. Network: firewall and secure links.
  3. Operating system: hardening and patches.
  4. DBMS: accounts, roles and privileges.
  5. Data: encryption, masking and field level rules.

Cost of one breach.

A bank has 50,000 customers. A breach costs 400 rupees per customer in notice, repair and support.

The total is 50,000 x 400 = 2,00,00,000 rupees, which is 2 crore. A control that costs 10 lakh a year is much cheaper than the loss.

Remember. The per customer cost is an invented figure for the calculation. Real costs vary widely.

Real-life example

A small online shop stores card details in plain text. A visitor finds the file and uses the cards. The shop pays refunds, loses its payment partner and closes within a year. Security work would have cost far less.

Diagram: Risks of not securing data and the security hierarchy

Same or opposite: physical and data level security

PointPhysicalData levelSame or opposite
GuardsRooms and devicesFields and recordsOpposite
Typical controlLock, guardEncryption, maskingOpposite
Part of the hierarchyYesYesSame
Stops a remote attackerNoYesOpposite

Exam tip. List the risks and then the five levels of the hierarchy. Add a cost example. A layered picture helps.

Back to the topic list

Start with the latest papers

Previous year papers will be added soon!

Database Security (CY-802-A) FAQs

What are the most important topics in Database Security?

No past paper of this subject is on this site yet, so the topics were chosen from the syllabus. The first five: Database system architecture and overview of information security; Functional dependencies, keys and closure; Normal forms up to BCNF; Multivalued, join and inclusion dependencies: 4NF and 5NF; Database security lifecycle.

How were these Database Security important questions chosen?

Each topic was taken from the syllabus units. No past paper was available to count repeats, and the answers are not teacher-reviewed, so use them together with your syllabus.

Is there a PDF of Database Security important questions with answers?

Yes. The Paperwala Imp Question & Answer PDF for Database Security is free to download from this page.

The 10 topics of Database Security (CY-802-A) for RGPV B.Tech Cyber Security semester 8, chosen from the syllabus. No past paper of this subject is on this site yet, so repeats could not be counted.