0% found this document useful (0 votes)
31 views24 pages

Int I QB

Uploaded by

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

Int I QB

Uploaded by

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

DataBase Management Systems

Study Materials Internal I

PART A (2 Marks)

1. List any four differences between file processing system and DBMS

S.no DBMS File Processing system


1 Flexible access to data by using queries It uses predetermined access to data by using
compiled programs.
2 Redundancy is control in DBMS Redundancy is NOT controlled in file system
3 Unauthorized access is restricted in DBMS Less security
4 DBMS provide back up and recovery data lost in file system can't be recovered.
5 DBMS provide multiple user interfaces Data is isolated in file system
2. What is the purpose of Database system?
 The main purpose of database systems is to manage the data –Storage and Retrieval.
 Using DBMS we can add new data, delete unused data, update outdated data, retrieve
data.
 To perform these operations on data we need a Database management system to store
the data in such a way so that all these operations can be performed on the data
efficiently.
3. What are the characteristics of Database?
 Real-world entity
 Less redundancy
 Consistency
 Multiuser and Concurrent Access
 Security
 Query Language
 ACID Properties
4. Define the two levels (views) of data independence.

 Logical data independence: The ability to change the Conceptual (Logical) schema without
changing the External schema (User View) is called logical data independence. For example, the
addition or removal of new entities, attributes, or relationships to the conceptual schema or
having to rewrite existing application programs.
 Physical data independence: The ability to change the physical schema without changing
the logical schema is called physical data independence. For example, a change to the internal
schema, such as using different file organization or storage structures, storage devices, or
indexing strategy, should be possible without having to change the conceptual or external
schemas.
5. What is data model? What is the purpose of Data Model?
 Data Model is a logical structure of Database.
 Purpose of Data Model is the design of database to describe entities, attributes,
relationship among data, constrains etc.

1
6. What are the different types of data models?

1. Object based logical Models


 E-R Model
 Object oriented Model
2. Record based logical Models
 Relational Model
 Hierarchical Model
 Network Model
7. What are the three levels of data abstraction?
Physical level: This is the lowest level of data abstraction. It describes how data is actually
stored in database. You can get the complex data structure details at this level.
Logical level: This is the middle level data abstraction. It describes what data is stored in
database.
View level: Highest level of data abstraction. This level describes the user interaction with
database system

8. What are the functions of a DBA?


DBA(DataBase Administrator) performs following functions:
 Schema definition
 Schema and physical-organization modification
 Granting of authorization for data access
 Integrity-constraint specification
 Backup and Recovery functions

9. Give the usage of the rename operation with an example.

Rename (ρ) operation can be used to rename a relation or an attribute of a relation.


Rename (ρ) Syntax:
ρ(new_relation_name, old_relation_name)
Example: fetching customer names and renaming the resulted relation to CUST_NAMES.
ρ(CUST_NAMES,∏(Customer_Name)(CUSTOMER))

10. List out the various relational algebra operators.


1. Select (σ)
2. Project (∏)
3. Union (∪)
4. Set Difference (-)
5. Cartesian product (X)
6. Rename (ρ)

2
11. State about the two levels of data independence
 Logical data independence: The ability to change the Conceptual (Logical) schema without
changing the External schema (User View) is called logical data independence. For example,
the addition or removal of new entities, attributes, or relationships to the conceptual schema or
having to rewrite existing application programs.
 Physical data independence: The ability to change the physical schema without changing
the logical schema is called physical data independence. For example, a change to the internal
schema, such as using different file organization or storage structures, storage devices, or
indexing strategy, should be possible without having to change the conceptual or external
schemas.

12. What is an entity?


 An entity is an object or component of data. An entity is represented as rectangle in an ER
diagram.
 In terms of DBMS, an entity is a table or attribute of a table in database

13. What are Relation and Tuple?


 Relational database model, which organizes logically related data into tables. These tables,
which are known as relations
 Relation are subdivided into rows and columns.
 Each column, or attribute, of a relation keeps up with a particular kind of data.
 Each row, is called tuple.
14. Differentiate single_ valued and multi_valued attributes
An attribute that can hold multiple values is known as multivalued attribute. It is represented
with double ovals in an ER Diagram.
For example – A person can have more than one phone numbers so the phone number attribute is
multivalued. Attribute.

15. What is normalization?


Normalization is a process of analyzing the given relation schemas based on their functional
Dependencies(FDs) and primary key to achieve the following properties.
o Minimizing redundancy
o Minimizing insertion, deletion and update anomalies.

16. What is composite attribute?


3
An attribute that is a combination of other attributes is known as composite attribute. For
example, In student entity, the student address is a composite attribute as an address is
composed of other attributes such as pin code, state, country.

17. What is derived attribute?


 A derived attribute is one whose value is dynamic and derived from another attribute.
 It is represented by dashed oval in an ER Diagram. For example – Person age is a derived
attribute as it changes over time and can be derived from another attribute (Date of birth).

18. What is the difference between primary key & super key?
Primary key: The key that is selected to identify tuples uniquely within the relation
Example : ID
Super Key: An attribute or set of attributes that uniquely identifies a tuple within a relation
Example : ID, Address
19. What is candidate key?
The minimal set of attribute which can uniquely identify a tuple is known as candidate key.
For Example, STUD_NO in STUDENT relation.
20. What is E-R diagram? What are the elements of E-R diagram?
E-R diagram shows the complete logical structure of a database. An ER diagram shows the
relationship among entity sets.
E-R diagram has three main components:
1. Entity
2. Attribute
3. Relationship

21. Give example for one to one relationship and one to many relationship

4
One to One Relationship : For example, a person has only one passport and a passport is given to
one person.

One to Many Relationship : For example – a customer can place many orders but a order cannot be
placed by many customers.

22. What do you mean by weak entity set?


An entity that cannot be uniquely identified by its own attributes and relies on the relationship
with other entity is called weak entity. The weak entity is represented by a double rectangle.
For example – a bank account cannot be uniquely identified without knowing the bank to
which the account belongs, so bank account is a weak entity.

23. Write a note on functional dependencies.


Functional dependency is a relationship that exists when one attribute uniquely determines
another attribute. If R is a relation with attributes X and Y, a functional dependency between
the attributes is represented as X->Y, which specifies Y is functionally dependent on X.

24. What are the problems caused by redundancy?


Redundancy means having multiple copies of same data in the database. It refers to the
duplication of data.
Problems by redundancy:
 It will take more storage than needed.
 leads to higher storage costs and poor access time.

5
Q1. With neat diagram, explain the structure/Component of a DBMS

1. Query Processor Components :


• DML Pre-compiler : It translates DML statements in a query language into low level
instructions that query evaluation engine understands. It also attempts to transform user's
request into an equivalent but more efficient form.
• Embedded DML Pre-compiler : It converts DML statements embedded in an
application program to normal procedure calls in the host language. The Pre-compiler
must interact with the DML compiler to generate the appropriate code.
• DDL Interpreter : It interprets the DDL statements and records them in a set of tables
containing meta data or data dictionary.
• Query Evaluation Engine : It executes low-level instructions generated by the DML
compiler.

6
2. Storage Manager Components :
They provide the interface between the low-level data stored in the database and
application programs and queries submitted to the system.
• Authorization and Integrity Manager : It tests for the satisfaction of integrity constraints
checks the authority of users to access data.
• Transaction Manager : It ensures that the database remains in a consistent state
despite the system failures and that concurrent transaction execution proceeds without
conflicting.
• File Manager : It manages the allocation of space on disk storage and the data
structures used to represent information stored on disk.
• Buffer Manager : It is responsible for fetching data from disk storage into main memory
and deciding what data to cache in memory.
3. Data Structures :
Following data structures are required as a part of the physical system implementation.
• Data Files : It stores the database.
• Data Dictionary : It stores meta data (data about data) about the structure of the
database.
• Indices : Provide fast access to data items that hold particular values.
• Statistical Data : It stores statistical information about the data in the database. This
information is used by query processor to select efficient ways to execute query.

__________________________________________________________________

Q2. What is data model? Explain the different types of data models with
relevant examples.
Data Model is a logical structure of Database. It describes the design of database to
reflect entities, attributes, relationship among data, constrains etc.
Types os Data Models
 E-R Model
 Relational Model
 Hierarchical Model
 Network Model
 Object oriented Model

E-R MODEL [ ENTITY –RELATIONSHIP MODEL]


 An Entity–relationship model (ER model) describes the structure of a database with
the help of a diagram, which is known as Entity Relationship Diagram (ER
Diagram).
 An ER model is a design or blueprint of a database that can later be implemented as a
database.

7
Entity Relationship Diagram (ER Diagram)
An ER diagram shows the relationship among entity sets. An entity set is a group of similar
entities and these entities can have attributes. In terms of DBMS, an entity is a table or
attribute of a table in database, so by showing relationship among tables and their
attributes, ER diagram shows the complete logical structure of a database.

As shown in the above diagram, an ER diagram has three main components:


1. Entity
2. Attribute
3. Relationship
1. Entity
An entity is an object or component of data. An entity is represented as rectangle in an ER
diagram. It represent table.
2. Attribute
An attribute describes the property of an entity. An attribute is represented as Oval in an
ER diagram. There are four types of attributes:
i). Key attribute
ii). Composite attribute
iii). Multivalued attribute
iv). Derived attribute

8
3. Relationship
A relationship is represented by diamond shape in ER diagram, it shows the relationship
among entities. There are four types of relationships:
1. One to One
2. One to Many
3.Many to One
4. Many to Many

RELATIONAL MODEL

 In relational model, the data and relationships are represented by collection of inter-related
tables.
 Each table is a group of column and rows, where column represents attribute of an entity and
rows represents records.
 tables are also known as relations in relational model.
 Rows are also known as tuples in relational model

Relational Model Concepts


1. Attribute: Each column in a Table. Attributes are the properties which define a relation. e.g.,
Student_Rollno, NAME,etc.
2. Tables – In the Relational model the, relations are saved in the table format. It is stored along with
its entities. A table has two properties rows and columns. Rows represent records and columns
represent attributes.
3. Tuple – It is nothing but a single row of a table, which contains a single record.
4. Relation Schema: A relation schema represents the name of the relation with its attributes.
5. Degree: The total number of attributes which in the relation is called the degree of the relation.
6. Cardinality: Total number of rows present in the Table.

7. Keys : To Identify Unique rows in a table Example Primary Key, candidate key, Super key,
foreign key and alternate key

9
Hierarchical model
 In hierarchical model, data is organized into a tree like structure with each record
is having one parent record and many children.
 The main drawback of this model is that, it can have only one to many relationships
between nodes.
 Note: Hierarchical models are rarely used now.
Sample Hierarchical Model Diagram:
Lets say we have few students and few courses and a course can be assigned to a single
student only, however a student take any number of courses so this relationship becomes
one to many.

Example of hierarchical data represented as relational tables: The above hierarchical


model can be represented as relational tables like this:

Student Table Course Table

Stu_Id Stu_Name Stu_Age


Course_Id Course_Name Stu_Id
23 Steve 29
C01 Cobol 123
367 Chaitanya 27 C21 Java 367
234 Ajeet 28 C22 Perl 367
C33 JQuery 234

Network Model
 This is an extension of the Hierarchical model. In this model data is organised more like a
graph, and are allowed to have more than one parent node.
10
 In this database model data is more related as more relationships are established in this
database model. Also, as the data is more related, hence accessing the data is also easier and
fast. This database model was used to map many-to-many data relationships.
 This was the most widely used database model, before Relational Model was introduced.
 It can represent redundancy in data more efficiently than that in the hierarchical model.
 There can be more than one path from a previous node to successor node/s.
 The operations of the network model are maintained by indexing structure of linked list
(circular) where a program maintains a current position and navigates from one record to
another by following the relationships in which the record participates.
 Records can also be located by supplying key values.

11
Q3. Explain various operations of relation algebra with examples
Basic/Fundamental Operations:
1. Select (σ)
2. Project (∏)
3. Union (∪)
4. Set Difference (-)
5. Cartesian product (X)
6. Rename (ρ)
7. Intersection (∩)

Select Operator (σ)


Select Operator is denoted by sigma (σ) and it is used to find the tuples (or rows) in a
relation (or table) which satisfy the given condition.
Syntax of Select Operator (σ)
σCondition/Predicate(Relation/Table name)
Select Operator (σ) Example
σCustomer_City="Agra"(CUSTOMER)
Output:
Customer_Id Customer_Name Customer_City
-------------------------------------
C10100 Steve Agra
C10111 Raghu Agra
Project Operator (∏)
Project operator is denoted by ∏ symbol and it is used to select desired columns (or
attributes) from a table (or relation).
Syntax of Project Operator (∏)
∏ column_name1, column_name2,....,column_nameN(table_name)
Project Operator (∏) Example
In this example, we have a table CUSTOMER with three columns, we want to fetch only
two columns of the table, which we can do with the help of Project Operator ∏.
Query:
∏Customer_Name,Customer_City(CUSTOMER)
Output:
Customer_Name Customer_City
--------------------------
Steve Agra
12
Raghu Agra
Chaitanya Noida
Ajeet Delhi
Carl Delhi

Union Operator (∪)


Union operator is denoted by ∪ symbol and it is used to select all the rows (tuples) from
two tables (relations).
Syntax of Union Operator (∪)
table_name1 ∪ table_name2
Query:
∏Student_Name(COURSE)∪∏Student_Name(STUDENT)
Output:
Student_Name
------------
Aditya
Carl
Paul
Lucy
Rick
Steve
Intersection Operator (∩)
Intersection operator is denoted by ∩ symbol and it is used to select common rows
(tuples) from two tables (relations).
Syntax of Intersection Operator (∩)
table_name1 ∩ table_name2
Lets take the same example that we have taken above.

Query:
∏Student_Name(COURSE)∩∏Student_Name(STUDENT)
Output:
Student_Name
------------
Aditya
13
Steve
Paul
Lucy

Set Difference (-)


Set Difference is denoted by – symbol. Lets say we have two relations R1 and R2 and we
want to select all those tuples(rows) that are present in Relation R1 but not present in
Relation R2, this can be done using Set difference R1 – R2.
Syntax of Set Difference (-)
table_name1 - table_name2
Set Difference (-) Example
Lets take the same tables COURSE and STUDENT that we have seen above.
Query:
Lets write a query to select those student names that are present in STUDENT table but
not present in COURSE table.
∏Student_Name(STUDENT)-∏Student_Name(COURSE)
Output:
Student_Name
------------
Carl
Rick

Cartesian product (X)


Cartesian Product is denoted by X symbol. Lets say we have two relations R1 and R2 then
the cartesian product of these two relations (R1 X R2) would combine each tuple of first
relation R1 with the each tuple of second relation R2.
Syntax of Cartesian product (X)
R1 X R2
Query:
Lets find the cartesian product of table R and S.
R X S
Rename (ρ)
Rename (ρ) operation can be used to rename a relation or an attribute of a relation.
Rename (ρ) Syntax:
ρ(new_relation_name, old_relation_name)

14
Rename (ρ) Example
Lets say we have a table customer, we are fetching customer names and we are renaming
the resulted relation to CUST_NAMES.
Query:
ρ(CUST_NAMES,∏(Customer_Name)(CUSTOMER))

Q4. Explain the elements of E-R diagram with suitable example

Draw any E-R Diagram and Show the attributes and relationships .

Ans : Refer Unit 1 Notes

Q5. Explain Relational Database with suitable database example

RDBMS stands for Relational DataBase Management System. A relational model can be
represented as a table of rows and columns. A relational database has following major
components:
1. Table
2. Record or Tuple
3.Field or Column name or Attribute
4.Domain
5.Instance
6.Schema
7. Keys

1. Table
A table is a collection of data represented in rows and columns. Each table has a name in
database. For example, the following table “STUDENT” stores the information of students
in database.
Table: STUDENT
Student_Id Student_Name Student_Addr Student_Age
101 Chaitanya DayalBagh, Agra 27
102 Ajeet Delhi 26
103 Rahul Gurgaon 24
104 Shubham Chennai 25

2. Record or Tuple
Each row of a table is known as record. It is also known as tuple. For example, the
following row is a record that we have taken from the above table.

15
102 Ajeet Delhi 26

3. Field or Column name or Attribute


The above table “STUDENT” has four fields (or attributes):
Student_Id, Student_Name, Student_Addr&Student_Age.

4. Domain
A domain is a set of permitted values for an attribute in table. For example, a domain of
month-of-year can accept January, February,…December as values, a domain of dates
can accept all possible valid dates etc. We specify domain of attribute while creating a
table.
An attribute cannot accept values that are outside of their domains. For example, In the
above table “STUDENT”, the Student_Id field has integer domain so that field cannot
accept values that are not integers for example, Student_Id cannot has values like, “First”,
10.11 etc.

5. Instance and Schema


schema: Design of a database is called the schema. Schema is of three types: Physical
schema, logical schema and view schema.

Definition of instance: The data stored in database at a particular moment of time is


called instance of database. Database schema defines the variable declarations in tables
that belong to a particular database; the value of these variables at a moment of time is
called the instance of that database

6. Keys :
Key is used for identifying unique rows from table. It also establishes relationship
among tables.
Primary Key – A primary is a column or set of columns in a table that uniquely identifies
tuples (rows) in that table.
Super Key – A super key is a set of one of more columns (attributes) to uniquely identify rows
in a table.

16
Candidate Key – A super key with no redundant attribute is known as candidate key
Alternate Key – Out of all candidate keys, only one gets selected as primary key, remaining
keys are known as alternate or secondary keys.
Composite Key – A key that consists of more than one attribute to uniquely identify rows
(also known as records & tuples) in a table is called composite key.
Foreign Key – Foreign keys are the columns of a table that points to the primary key of
another table. They act as a cross-reference between tables.

Table: Employee

Emp_SSN Emp_Number Emp_Name


--------- ---------- --------
123456789 226 Steve
999999321 227 Ajeet
888997212 228 Chaitanya
777778888 229 Robert
Super keys: The above table has following super keys. All of the following sets of super
key are able to uniquely identify a row of the employee table.

 {Emp_SSN}
 {Emp_Number}
 {Emp_SSN, Emp_Number}
 {Emp_SSN, Emp_Name}
 {Emp_SSN, Emp_Number, Emp_Name}
 {Emp_Number, Emp_Name}

Candidate Keys: As I mentioned in the beginning, a candidate key is a minimal super key
with no redundant attributes. The following two set of super keys are chosen from the
above sets as there are no redundant attributes in these sets.

 {Emp_SSN}
 {Emp_Number}

Only these two sets are candidate keys as all other sets are having redundant attributes
that are not necessary for unique identification.

17
Primary key: A Primary key is selected from a set of candidate keys. This is done by database
admin or database designer. We can say that either {Emp_SSN} or {Emp_Number} can be
chosen as a primary key for the table Employee.

Q6. Define a functional dependency. List and discuss the six inference rules for
functional dependencies. Give relevant examples.
A functional dependency (FD) is a relationship between two attributes, typically between the PK
and other non-key attributes within a table.

For any relation R, attribute Y is functionally dependent on attribute X (usually the PK), if for every
valid instance of X, that value of X uniquely determines the value of Y.

This relationship is indicated by the representation below :


X —–> Y
Inference Rule (IR):
o The Armstrong's axioms are the basic inference rule.
o Armstrong's axioms are used to conclude functional dependencies on a
relational database.
o The inference rule is a type of assertion. It can apply to a set of
FD(functional dependency) to derive other FD.
o Using the inference rule, we can derive additional functional dependency
from the initial set.

6 types of inference rule:

1. Reflexive Rule (IR1)


In the reflexive rule, if Y is a subset of X, then X determines Y.

18
If X ⊇ Y then X → Y
Example:

2. Augmentation Rule (IR2)


The augmentation is also called as a partial dependency. In augmentation, if X
determines Y, then XZ determines YZ for any Z.

If X → Y then XZ → YZ

Example:

3. Transitive Rule (IR3)


In the transitive rule, if X determines Y and Y determine Z, then X must also
determine Z.

If X → Y and Y → Z then X → Z
Example:

4. Union Rule (IR4)


Union rule says, if X determines Y and X determines Z, then X must also
determine Y and Z.

If X → Y and X → Z then X → YZ

Example:

5. Decomposition Rule (IR5)


Decomposition rule is also known as project rule. It is the reverse of union
rule.

This Rule says, if X determines Y and Z, then X determines Y and X determines


Z separately.
19
If X → YZ then X → Y and X → Z
Example:

6. Pseudo transitive Rule (IR6)


In Pseudo transitive Rule, if X determines Y and YZ determines W, then XZ
determines W.

If X → Y and YZ → W then XZ → W
Example:

_-----------------------------------------------------------------------------------------------------------------

PART C

Q1. Briefly explain about views of data


VIEWS OF DATA hides the irrelevant details such as data relationship, database schema, constraints,
security etc from the user
DBMS Three Level Architecture Diagram

This architecture has three levels:


1. External level
2. Conceptual level
3. Internal level

20
1. External level
It is also called view level. The reason this level is called “view” is because several users can view
their desired data from this level which is internally fetched from database with the help of
conceptual and internal level mapping.
The user doesn’t need to know the database schema details such as data structure, table definition
etc. user is only concerned about data which is what returned back to the view level after it has been
fetched from database (present at the internal level).
External level is the “top level” of the Three Level DBMS Architecture.
2. Conceptual level
It is also called logical level. The whole design of the database such as relationship among data,
schema of data etc. are described in this level.
Database constraints and security are also implemented in this level of architecture. This level is
maintained by DBA (database administrator).
3. Internal level
This level is also known as physical level. This level describes how the data is actually
stored in the storage devices. This level is also responsible for allocating space to the
data. This is the lowest level of the architecture.
View of Data in DBMS
To fully understand the view of data, you must have a basic knowledge of data abstraction
and instance & schema. Refer these two tutorials to learn them in detail.

1. Data abstraction
2. Instance and schema
1. Data Abstraction in DBMS
Database systems are made-up of complex data structures. To ease the user interaction
with database, the developers hide internal irrelevant details from users. This process of
hiding irrelevant details from user is called data abstraction.

21
Three levels of abstraction:
Physical level abstraction: This is the lowest level of data abstraction. It describes
how data is actually stored in database. You can get the complex data structure
details at this level.
Logical level abstraction: This is the middle level of 3-level data abstraction
architecture. It describes what data is stored in database.
View level abstraction: Highest level of data abstraction. This level describes the
user interaction with database system.
2. Instance and schema in DBMS
In this guide, we will learn what is an instance and schema in DBMS.
DBMS Schema
Definition of schema: Design of a database is called the schema. Schema is of three
types: Physical schema, logical schema and view schema.
For example: In the following diagram, we have a schema that shows the relationship
between three tables: Course, Student and Section. The diagram only shows the design of
the database, it doesn’t show the data present in those tables. Schema is only a structural
view(design) of a database as shown in the diagram below.

physical schema : The design of a database at physical level is called physical schema,
how the data stored in blocks of storage is described at this level.
logical schema :Design of database at logical level is called logical schema,
programmers and database administrators work at this level, at this level data can be
described as certain types of data records gets stored in data structures, however the
internal details such as implementation of data structure is hidden at this level (available at
physical level).

22
view schema Design of database at view level is called view schema. This generally
describes end user interaction with database systems.
DBMS Instance
Definition of instance: The data stored in database at a particular moment of time is
called instance of database. Database schema defines the variable declarations in tables
that belong to a particular database; the value of these variables at a moment of time is
called the instance of that database.
For example, lets say we have a single table student in the database, today the table has
100 records, so today the instance of the database has 100 records. Lets say we are
going to add another 100 records in this table by tomorrow so the instance of database
tomorrow will have 200 records in table. In short, at a particular moment the data stored in
database is called the instance, that changes over time when we add or delete data from
the database.

Q2. Consider the following relational database


employee (empname, street, city)
works (empname, companyname, salary)
company (companyname, city)
manages (empname, managername).
Write expressions in the relational algebra for each request.
i) Find the names of all employees who work for first bank Corporation.
ii) Find the names, street addresses and cities of residence of all employees who work for first Bank
Corporation and earn more than 200000 per annum.
iii) Find the names of all employees in this database who live in the same city as the company for which
they work.

Answer:
i)

ii)

iii)

23
Q3. Consider the Sailors-Boats-Reserves DataBase.
S (sid, sname, rating, age)
B (bid, bname, color)
R (sid, bid, date)

Give a Relational Algebra expression for each of the following queries:


1. Find the colors of boats reserved by Albert.
2. Find all IDs of sailors who have a rating of at least 8 or have reserved boat 103.
3. Find the names of sailors who have not reserved a red boat.
4. Find the IDs of sailors with age over 20 who have not reserved a red boat.
5. Find the names of sailors who have reserved at least two boats.

Answer:

24

You might also like