Intro to database systems

5.0(1)
studied byStudied by 4 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/56

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

57 Terms

1
New cards

What is a database?

Database is a collection of related data and data is a collection of facts and figures that can be processed to produce information

2
New cards

How is database structured ?

Database is structured and organized collection of data that is stored, managed , and accessed using a specific software which is Database Management Systems (DBMS)

3
New cards

What is a DBMS?

It's to efficiently store and retrieve large amount of data while maintaining data integrity, security, and reliability. They are used to store various types of information , ranging from simple lists to complex structured data

4
New cards

What is Database Management system ?

It's a technology of storing and retrieving users data with utmost efficiency along with appropriate security measures

5
New cards

What does a DBMS provide?

A DBMS provides a interface for users and applications to interact with databases without needing to understand the underlying details of data storage and manipulation.

6
New cards

What are the following characteristics of DBMS?

A) real world entity

B) relation based tables

C) isolation of data and application

D) less redundancy

E) consistency

F) query language

G) All the above

G) All the above

7
New cards

Define real-world entity ?

Modern DBMS is more realistic and uses real world entities to design its architecture

8
New cards

Define relation-based tables?

DBMS allows entities and relations among them to form tables

9
New cards

Define isolation of data and application?

A database system is entirely different than its data

10
New cards

Define less redundancy?

Follows the rules of normalization, which splits a relation when any of its attributes is having redundancy in values

11
New cards

Define consistency?

Consistency is a state where every relation in a database remains consistent

12
New cards

Define query language?

DBMS is equipped with query language , which makes it more efficient to retrieve and manipulate data

13
New cards

What does ACID properties contain of?

follows the concept of atomicity, consistency , isolation , durability

14
New cards

What is Multiuser and Concurrent Access in DBMS?

With DBMS it supports multiuser environment and allows them to access and manipulate data in parallel.

15
New cards

What is multiple views and security in DBMS?

Multiple view is when DBMS offers multiple views for different users.

Security: is features like multiple views of offer security to some extent where users are unable to access data of other users and departments.

16
New cards

What is data?

Data are known facts that can be recorded and have an implicit meaning

17
New cards

Name the 3 DBMS users?

Administrators: they maintain the DBMS and are responsible for administrating database

Designers : are the group of people who actually work on designing part of the database

End Users: End users are those who actually reap the benefits of having DBMS

18
New cards

What is an Entity?

An entity can be a real world object either living or non-living like a person , object , place , concept , or event

19
New cards

What does ERD stand for?

It stands for Entity Relationship diagram

20
New cards

What's a data entity instance?

It's a specific occurrence (data value) of an entity and an entity must have multiple entity instances or it's not really an entity

Here is an example:

• if we have an employee table, then each employee in that table is an entity instance that is identified by the Emp_ID

21
New cards

What are Attributes?

An Attribute is a component which shows the properties or characteristics of an entity in the entity-relationship model.

In the entity-relationship diagram, attributes are represented by an oval or ellipse shape.

In each diagram, every oval shape represents an attribute which is directly connected to an entity.

22
New cards

What is ER Model Notation?

• Represent entities as rectangles

• List attributes within the rectangle

( similar as we did in lab 2)

23
New cards

Types of Attributes

• The different types of attribute in the ER model:

• Simple Attribute

• Derived Attribute

• Composite Attribute

• Multi-valves Attribute

• Key Attribute

24
New cards

Explain Simple attribute ?

Simple attributes are those attributes of an entity, which cannot be divided further into smaller components.

Following are the example of a simple attribute:

Roll no of the Student can be a simple attribute,

Id of the Employee can be a simple attribute,

Salary of the Employee can be a simple attribute,

Age and class of the student can be a simple attribute; etc

25
New cards

Explain Composite Attribute?

• Composite Attributes are those attributes of an entity, which is a combination of more than one attributes

• In the Entity-Relationship diagram, this attribute is represented by an ellipse comprising of other ellipses.

Address of an Employee is a composite attribute

The name of an employee is an composite attribute

26
New cards

Explain Multi-valves attributes?

• Multi-valued Attributes are those attributes of an entity, which contain more than one value.

Example:

Mobile number of the Employee is a multi-valued attribute,

Email ID and address of the employee also be a multi-valued attribute, etc.

27
New cards

Explain Derived attribute?

Derived Attributes are those attributes of an entity, which are based on other attributes and whose values are derived from other stored attributes.

> Age (Derived from Date of birth) of a student of an employee,

> Total or Average Marks of a student are derived attributes, etc.

• In an Entity-Relationship diagram, this attribute is represented by the dashed oval or ellipse shape.

28
New cards

What are the key attributes?

In the Entity-Relationship (ER) model, there are several types of keys used to uniquely identify entities and relationships. Here are the key types commonly used in ER modeling:

Super key : is a set of one or more attributes(columns) that can be used uniquely to identify entity within an entity set . Which may contain extra attributes which are not strictly necessary

Candidate key: is a minimal super key , meaning it's a subset of attributes within a super key that still uniquely identifies each entity . And a realtor may hav multiple candidate keys

Primary key: is a specific candidate key chosen to be the main method of uniquely identifying entities within a relation

29
New cards

Pt2 of remaining key attributes!

• Alternate Key: An alternate key is a candidate key that is not chosen as the primary key. It can be used as an alternative method for uniquely identifying entities if needed.

• Composite Key: A composite key is a primary key that consists of multiple attributes (columns) combined to form a unique identifier. It's used when no single attribute can uniquely identify an entity.

• Foreign Key: While not a key used to identify entities, a foreign key is used to establish relationships between entities. It is an attribute in one entity that refers to the primary key of another entity, creating a link between them.

• Surrogate Key: A surrogate key is an artificial, system-generated identifier used as the primary key when there is no suitable natural key. These keys have no inherent meaning but are solely used for database management purposes

30
New cards

Define Cardinality Constraints

are rules or limitations that define the relationships between tables in a database schema and maintains data integrity and data consistency .

31
New cards

one-to-one relationship (1:1)

when each record in one table relates to exactly one record in another. Used for tightly coupled, singular connections

ex: customer and spouse association

32
New cards

one-to-many relationship (1:M)

when each record in one table can relate to multiple records in another. its common for hierarchies and collections.

Example: Customers and their multiple orders

33
New cards

Many to Many (N:N) Relationship

Records in one table that can relate to multiple records in another , vice versa .

34
New cards

What does data modeling process do ?

We need to define the entities and attributes and relationships and the relationships cardinality

35
New cards

what are the 4 types of Cardinalities?

1) Mandatory One

2) Mandatory Many

3) Optional one

4) Optional Many

36
New cards

what is relationship lower bounds?

when having minimum number of related instances in a relationship

37
New cards

Explain what is a Composite Relationship?

it occurs for relationships that has attributes and these additional attributes provide more context or information about the relationship between the entities and it always has a Many to Many cardinality

38
New cards

What is generalization relationships?

it uses the bottom-up process and identifies common features of entity types and creates a high level entity (super class) using common features

39
New cards

what is Specialization relationship?

its a top-down process and starts from a single entity, creating low level entities (subclasses) using some different features

40
New cards

Whats the difference between Generalization and specialization relationship?

the difference between them is that generalization uses a down to top process and it starts to identify common features in entity types whilst specialization uses top down process and starts to create low-level entities

41
New cards

Define Homonyms

different attributes have the same name

42
New cards

Define Synonym

same attribute has different names in different tables

43
New cards

what is Database Schema?

is the skeleton structure that represents the logical view of the entire database it defines how the data is organized and how the relations among them are associated and formulates all the constraints that are to be applied on the data.

44
New cards

What are Key Fields?

keys are special fields that serve two main purposes which are primary key that are unique identifiers of the relation and foreign key which are identifiers that enable a dependent relation to refer to its parent relation

45
New cards

ER model to relational model

is after designing the ER diagram of system we need to convert it to a relational model which can be directly implemented by any DBMS

46
New cards

Tell me some key principles steps involving the transformation process?

First each entity in the ER diagram corresponds to a table in the relational schema .

2nd each attributes of an entity becomes a column in the corresponding table .

3rd the primary key ensures each row in the table is unique .

4th the relationships btwn entities ate represented using a foreign keys in the table

5th if an attribute has a multivalued ot composite values , additonal tables may be needed to represent these attribute properly

47
New cards

weak entity

is an entity thats dependent that becomes a separate relation with foreign key taken from the superior entity

48
New cards

What are the different types of Mapping a Binary Relationships?

1st is One-to-one primary key on the mandatory side becomes a foreign key on the optional side.

2nd is One-to-many primary key on the one side becomes a foreign key on the many side.

3rd is Many-to-Many create a relation with the primary keys of two entities as its primary key

49
New cards

Mapping Unary Relationships

One-to-Many : Recursive foreign key in the same relation

Many-to-Many has

Two relations:

One for the entity type

One for an associative relation in which the primary key has two attributes, both taken from the primary key of the entity

50
New cards

Define data normalization

the process of efficiently organizing data in a database and process of decomposing relations with anomalies to produce smaller , well-structured relations

51
New cards

What is a well-structured relation?

A relation that contains minimal redundancy and allows users to insert, modify, and delete the rows in a table without errors or inconsistencies.

52
New cards

What is anomalies?

data anomalies (irregularities). They threaten data integrity.

53
New cards

Define functional Dependency

occurs when the value of one (set of) attribute(s) determines the value of a second (set of) attribute(s)

54
New cards

what are the different type of functional Dependency?

Full Functional Dependency: A depends entirely on B. Removing any part of B breaks the dependency.

Partial Functional Dependency: A depends on B, but not entirely. Some attributes in B can be removed while maintaining the dependency.

Transitive Dependency: A depends on B through an intermediary attribute C. C acts as a bridge between A and B in the dependency chain.

Multivalued Dependency: A depends on B, but B can have multiple values for the same A value. Typically encountered in specific scenarios involving multiple values

55
New cards

Explain what is the First Normal Form (1NF)?

A relation is in first normal form if it does not contain any composite or multi-valued attribute.

No multivalued attributes

Every attribute value is atomic

56
New cards

Explain what is the Seconnd Normal Form (2FN)?

A relation in second normal form must be in first normal form and it must not contain any partial dependency

57
New cards

Explain what is Third Normal Form (3NF)?

A relation in third normal form must be in second normal form and must not contain ay transitive dependency