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