Database Flashcards
Managing data
•Data increases exponentially with time
•Multiple sources of data
•New sources of data
•Data become less current over time •Data rot
•Unstructured data
•Big data
Data: challenges
- Increase: volume
- Sources: internal sources/ resource database
- personal sources
- external sources (government database) - Data streams
- point of scale terminal data
- blogs, social media RFID
- strange media
- Unstructured data (textual data)
- Big data
The database approach
Database is an organized collection of related information especially for rapid search and retrieval
●is managed with database management information systems (DBMS).
Databases minimize the following problems
◦Data redundancy: The same data are stored in many places.
◦Data isolation: Applications cannot access data associated with other applications.
◦Data inconsistency: Various copies of the data do not agree.
Database management systems (DBMS) maximize the following
● Data security: Databases must have extremely high security measures in
place to deter mistakes and attacks since data is stored in one place.
● Data integrity: Data must meet certain constraints, such as no alphabetic characters in a Social Insurance Number field.
● Data independence: Applications and data are not linked to each other (kept
Building a database
Step 1: Create a data model: ER model
Step 2: Document the data model: ER diagram
Step 3: Implement the ER model in a DBMS
ER model
•Data model is a diagram that represents the entities in the database and their relationships
•Entity is a person, place, thing, or event about which an organization maintains information. A record describes an entity.
•Instance is one specific, unique representation of the entity.
•Attribute is a characteristic or quality of a particular entity
•Primary key is a field that uniquely identifies a record. Note that every record MUST have a primary key.
Relationships
One to one (1:1)
● One instance of an entity A is associated with at most one
instance of entity B, and vice versa
One to many (1:M)
●For one instance of entity A, there are zero, one, or many instances of entity B, but for one instance of entity B, there is only one instance of entity
Many to many (M:M)
For one instance of entity A is associated with at most one
Relationship
The most common relationship is binary relationships, which refer to the association between two entities
Cardinality and modality indicate business rules
What do cardinality and modality indicate and what are they
●Cardinality refers to the maximum number of times an instance in one entity can be associated with instances in the related entity.
●Modality refers to the minimum number of times an instance in one entity can be associated with instances in the related entity.
Cardinality symbols
- Crow’s foot notation represents entities as boxes
- Represents relationships as lines between the boxes
On the relationship line:
- Cardinality is close to the entity box
the dash represents “one”
the crow’s foot represents “many” or “infinite“
- Modality is away from the entity box the ring represents “zero“
the dash represents “one”
Database management systems
Software for creating and managing databases
◦The DBMS provides users and programmers with a systematic way to create, retrieve, update and manage data
●RDBMS
●A software system used to maintain relational databases is a
relational database management system (RDBMS)
●Microsoft Access for small business
●for large businesses, Oracle 12c, IBM DB2, SAP HANA, and Microsoft SQL Server