0% found this document useful (0 votes)
5 views22 pages

Basic Database

The document provides an overview of basic database concepts, including definitions of databases, DBMS, SQL, tables, primary and foreign keys, normalization, and queries. It also includes important SQL keywords and a set of practice questions for CoCubes exam preparation, covering multiple-choice, true/false, and fill-in-the-blank formats. Tips for effective exam preparation are also provided, emphasizing the importance of understanding SQL syntax and database principles.

Uploaded by

jamalreehana24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views22 pages

Basic Database

The document provides an overview of basic database concepts, including definitions of databases, DBMS, SQL, tables, primary and foreign keys, normalization, and queries. It also includes important SQL keywords and a set of practice questions for CoCubes exam preparation, covering multiple-choice, true/false, and fill-in-the-blank formats. Tips for effective exam preparation are also provided, emphasizing the importance of understanding SQL syntax and database principles.

Uploaded by

jamalreehana24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

.

Basic Database Awareness – CoCubes


What is a Database?

A database is a collection of organized data that can be easily accessed, managed, and updated.

Example: A phone contact list is a database — it stores names, numbers, emails.

What is DBMS?
DBMS stands for Database Management System.
It is software that helps to store, retrieve, and manage data in a database.

Examples: MySQL, Oracle, MS Access, SQL Server.

What is SQL?

SQL stands for Structured Query Language.


It is used to communicate with databases – to insert, delete, update, or view data.

Example:

sql

CopyEdit

SELECT * FROM students;

This shows all data from the "students" table.


Important SQL Keywords

Keyword Meaning
SELECT Retrieve data from a table
FROM Specify the table name
WHERE Set conditions (filters)
INSERT Add new data to a table
UPDATE Modify existing data
DELETE Remove data from a table
CREATE Create new table or database
DROP Delete a table or database

What is a Table?
A table is where data is stored in rows and columns.

Example:
A student table may have columns: ID, Name, Marks.

What is a Primary Key?

A primary key is a column (or set of columns) that uniquely identifies each row.

It cannot be null or duplicate.

Example: In a student table, RollNo can be a primary key.

What is a Foreign Key?


A foreign key is a column in one table that refers to the primary key in another table.

It helps to link two tables together.

What is Normalization?

Normalization is the process of organizing data to reduce redundancy (no repeating data).

It makes the database more efficient.

What is a Query?

A query is a request to get data from the database.


Common Sample Questions for CoCubes:
1.
Which of the following is not a DBMS?
a) Oracle
b) MySQL
c) MS Word
d) PostgreSQL
Answer: c) MS Word

2.
Which command is used to retrieve data from a database?
a) UPDATE
b) SELECT
c) DELETE
d) CREATE
Answer: b) SELECT

3.
Which key uniquely identifies a row in a table?
Answer: Primary Key

4.
SQL stands for?
Answer: Structured Query Language

5.
Which SQL command is used to remove all data from a table but not the table itself?
Answer: DELETE

Tips for Exam

Understand keywords and their usage.

Focus on common SQL syntax.

Practice basic queries.

Know key differences (Primary vs Foreign Key, DBMS vs RDBMS).

Eliminate wrong options logically in MCQs.


Let me know if you want mock test questions or practice quizzes based on this topic!

You said:

give me more questions upto 50 previous questions in cocubes exam asked


ChatGPT said:

Here’s a set of 50 previous-style CoCubes questions on Basic Database Awareness, ideal for exam prep. They include multiple-choice, true/
false, and fill-in-the-blanks, crafted from patterns of past questions.

MCQs (30 Questions)


1.
Which is not a DBMS?
a) MySQL b)
PostgreSQL c)
MS-Access d)
MS-Excel
Answer: d

2.
SQL stands for?
a) Sequential Query List b)
Structured Query Language c)
Simple Query Language d)
None
Answer: b

3.
Command to add new rows?
a) UPDATE b)
INSERT c)
SELECT d)
CREATE
Answer: b

4.
Remove a table completely?
a) DELETE TABLE b)
REMOVE c)
DROP d)
ERASE
Answer: c

5.
Fetch all records from student only where grade = 'A'?
a) SELECT * FROM student WHERE grade='A'
b) SELECT ALL FROM student WHERE grade='A'
c) SELECT grade='A' FROM student
d) SELECT student FROM grade A
Answer: a
6.
Primary key characteristic?
a) Unique and nullable
b) Unique and non-nullable
c) Non-unique
d) Nullable only
Answer: b

7.
Foreign key?
a) Unique key
b) Primary key in same table
c) References primary key of another table
d) Can be null only
Answer: c

8.
Normalization reduces?
a) Speed
b) Redundancy
c) Accuracy
d) Capacity
Answer: b

9.
2NF requires?
a) No partial dependency
b) No transitive dependency
c) Both
d) None
Answer: a

10.
Select distinct cities:
a) SELECT city FROM table;
b) SELECT UNIQUE(city) FROM table;
c) SELECT DISTINCT city FROM table;
d) SELECT city DISTINCT FROM table;
Answer: c

11.
A view is?
a) Physical table
b) Virtual table
c) Backup
d) Index
Answer: b

12.
Default SQL clause order:
a) SELECT FROM WHERE GROUP BY HAVING ORDER BY
b) SELECT WHERE FROM ORDER BY
c) FROM SELECT WHERE ORDER BY
d) SELECT FROM ORDER BY
Answer: a

13.
HAVING is for?
a) Filtering columns
b) Aggregated results
c) Sorting
d) None
Answer: b

14.
Command to change table structure:
a) MODIFY TABLE
b) CHANGE TABLE
c) ALTER TABLE
d) UPDATE TABLE
Answer: c

15.
JOIN type showing all records?
a) INNER JOIN
b) LEFT JOIN
c) FULL OUTER JOIN
d) CROSS JOIN
Answer: c

16.
Entity–relationship diagram shows?
a) Data flow
b) Entities and relationships
c) CPU architecture
d) Network layout
Answer: b
17.
Transaction property 'A' stands for?
a) Accurate
b) Atomicity
c) Accessible
d) Acyclic
Answer: b

18.
Rollback returns to?
a) Initial DB
b) Before transaction start
c) Archive
d) Uncertain
Answer: b

19.
COMMIT does?
a) Saves changes
b) Discards changes
c) Deletes table
d) Creates backup
Answer: a

20.
SQL injection attacks target?
a) UI only
b) Code
c) Database queries
d) File system
Answer: c

21.
Clustered index sorts table physically?
a) True
b) False
Answer: a

22.
Runtime compilation of SQL is called?
a) Hard parse
b) Soft parse
c) Both
d) None
Answer: a

23.
Default join in SQL is?
a) INNER JOIN
b) FULL JOIN
c) LEFT JOIN
d) CROSS JOIN
Answer: a

24.
Stored procedures are server-side executed?
a) True
b) False
Answer: a
25.
Data Dictionary stores metadata?
a) True
b) False
Answer: a

26.
Rollback of a committed transaction allowed?
a) Yes
b) No
Answer: b

27.
Composite key uses multiple columns?
a) True
b) False
Answer: a

28.
Default port of MySQL?
a) 3306
b) 5432
c) 8080
d) 1521
Answer: a

29.
ACID stands for Atomicity, Consistency, _____, Durability.
a) Integrity
b) Isolation
c) Indivisibility
d) I/O
Answer: b

30.
UNION vs UNION ALL removes duplicates?
a) UNION only
b) UNION ALL only
c) Both
d) Neither
Answer: a

True/False (10 Questions)


31.
SQL is case-sensitive.
False

32.
DROP removes table permanently.
True
33.
Normalization increases redundancy.
False

34.
Primary key can have NULL.
False

35.
Foreign key ensures referential integrity.
True

36.
Index slows INSERT operations.
True

37.
A trigger auto-executes on events.
True

38.
Check constraint ensures valid data.
True

39.
Data warehouse same as OLTP DB.
False
40.
Denormalization can improve read performance.
True

Fill‑in‑the‑Blanks (10 Questions)


41.
The _______ clause groups rows based on column values.
Answer: GROUP BY

42.
_______ keys uniquely identify rows in a table.
Answer: Primary

43.
_______ is the process of removing duplicate rows.
Answer: UNION

44.
SQL command to modify rows is _______.
Answer: UPDATE
45.
_______ locks rows or tables during transactions.
Answer: Lock

46.
_______ processes analytical, read-heavy data models.
Answer: OLAP

47.
_______ ensures no partial dependency in a table.
Answer: Second Normal Form

48.
_______ is a snapshot view created from one or more tables.
Answer: View

49.
_______ represents database structure and constraints.
Answer: Schema

50.
The _______ clause filters groups after aggregation.
Answer: HAVING
Tips for CoCubes Exam Preparation

Practice solving MCQs quickly—time limit is tight.

Master SQL syntax via practice queries.

Understand normalization forms (1NF, 2NF, 3NF).

Know ACID properties, keys, relationships, and triggers.

Revise transaction control, constraints, and index behavior.

You might also like