Unit 3 : Data Model Flashcards
What is entity?
- Anything about which data are collected and stored
- Example : In a school database, students, teachers, and courses could all be considered entities.
What is attribute?
- A characteristic of an entity
( Column inside like Student table - name, studentID , address )
What is relationship?
- Association among entities
List out the relationship types ( 3 )
- One-to-many ( 1 : M ) relationship
- Many-to-many ( M : N or M : M ) relationship
- One-to-one ( 1: 1 ) relationship
What is constraint?
- A restriction placed on the data
- IS NULL, NOT NULL, UNIQUE, CHECK
List out examples for one-to-many relationship
- One student can enroll in many courses, but each course is taught by only one instructor
- Where one entity can be associated with many instances of another entity
List out the example for many-to-many relationship
- Students can enroll in many courses, and courses can have many students
- Where many instances of one entity can be associated with many instances of another entity
List out the examples for one-to-one relationship
- A department head leads one department and that department is led by only one department head
- Where one instance of an entity is associated with exactly one instance of another entity
What are the sources of business rules? ( 5 )
- Company managers
- Policy makers
- Department managers
- Written documentation
- Procedures
- Standards
- Operations Manuals
- Direct interviews with end users
Who invented the relational model?
- Codd ( IBM ) in 1970
List out 4 of the evolution of data models
- Hierarchical
- Network
- Relational
- Entity Relationship
What does relational model consists? ( 12 )
- Table
- Relational Diagram
- Keys ( Primary Key )
- Relationship ( one-to-many )
- Normalization ( Process of organizing data in a database to reduce redundancy and improve data integrity )
- Contraints ( NOT NULL , UNIQUE , CHECK )
- Indexes
- SQL ( Strutured Query Language)
- Data Integrity
- Views
- Stored Procedures and Triggers
- Transactions
* Use in MySQL
What does table consists?
- Consist a series of row and column intersections
What is data model?
- It is a relatively simple representations, usually graphical, of complex real-world data structures
- ERD is one of the data model
Why are data models important in database design ?
- It facilitate interaction among the designer, the applications programmer, and the end user
How data models help end users?
- It provides differents views and needs for data for end-users
How entities are used in database? ( 2 )
- Tables
- Relationship ( Customer table have a relationship between Order table )
What is instances?
- Refers to a specific, individual example or occurrence of an entity in a database
- Example : Customer consists Name, Email, ID, which instances is the value ( row ) inside the table, which means John Smith, john@gmail.com, 13
Why should we learn business rules in database?
- To know the design and operation of databases within an organization
What are business rules ? ( Characteristics )
- It was a brief, precise, and unambiguous descriptions of policies, procedures, or principles within a specific organization
What types of organizations do business rules apply? ( Characteristics )
- Apply to any organization that stores and uses data to generate information ( Characteristics )
What do business rules describe within an organization? ( Characteristics )
1.Describe the operations that help to create and enforce actions within the organization’’s environment
Is what form must business rules be rendered ? ( Characteristics )
- Must be rendered in writing
How often should business rules be updated? ( Characteristics )
- Must be kept up to date
Can business rules originate outside of the organization? ( Characteristics )
- Yes
What are the 2 key characteristics of business rules in terms of undertanding and dissemination?
- Must be easy to understand and widely disseminated
What aspect of data do business rules describe as viewed by the company? ( Characteristics )
- Business rules describe the characteristics of the data as viewed by the company.
How to translate Business Rules into Database Concepts? ( 3 )
- Nouns translate into entities
- Customer , Order table
- Verbs translate into relationships among entities
- Relationship between Customer and Order table
- Relationships are bi-directional
- We can find all orders for a customer and find the customer for a given order )
What concepts that database system integrates? ( 2 )
- The Relational Models
- The Entity Relationship Model
What is the key concepts in the relational models ( 5 )
- Tables : Represent entities.
- Columns : Represent attributes of entities.
- Primary Keys : Uniquely identify each row in a table.
- Foreign Keys: Establish relationships between tables.
- Normalization: Ensures data integrity and reduces redundancy.
What is the key concepts in the entity relationship models ( 4 )
- Entities : Objects or things about which data is collected (e.g., Customer, Order).
- Attributes : Characteristics of entities (e.g., CustomerName, OrderDate).
- Relationships : Associations between entities (e.g., “Customer places Order”).
- ER Diagrams : Graphical representations of entities, attributes, and relationships, used for designing the database schema.
List out the symbols used to represent one and many in the entity relationship model ( 2 )
- ||
- ||< ( Have a - inside < )
Which model is widely accepted and adapted graphical tool for data modeling?
- The entity relationship model
Who introduced the entity relationship model
- Chen
What is diamond shape in the entity relationship model?
- To connect related entities through a relationship line
What does relational table resembles?
- A file
Which model is purely logical structure? And why
- Relational Table
- How data are physically stored in the database is of no concern to the user or the designer
- This property became the source of a real database revolution