DBUD Flashcards
What is relational data
Relational databases organize data like tables in a spreadsheet, ensuring everything stays organized and structured. They’re great for things like keeping track of money, managing company information, or handling online shopping.
What is non-relational data
Non-relational databases are like big storage bins where you can throw in all sorts of things without worrying too much about organization. They’re perfect for handling lots of different kinds of information quickly, like social media posts, website clicks, or online gaming data.
Why should companies use databases instead of flat files?
While flat files like Excel can be useful for small-scale, simple tasks, databases provide the necessary infrastructure, security, scalability, and functionality required for robust data management in a business environment.
What is a Data Lake?
A data lake is a system of data that is stored in its natural/raw format. No information or format is changed while storing the data in the lake.
Good with big data, needing flexibility in data storage
What is data Warehouse
A data warehouse is designed to store structured data from multiple sources, typically used for reporting and data analysis. It organizes data into schemas and tables optimized for query performance and analytics.
Ideal when you need to match structured data from diffrent sources, like reports, historical data and others.
What is data mart?
A data mart is a subset of a data warehouse, focused on a specific business line, department, or user group. It contains a smaller, more specific set of data tailored for specific analytical needs.
Is used when specific departments or user groups need quick access to relevant datasets tailored to their needs.
What SQL codes are part of the Data Definition Language (DDL)
DDL is used to define and manage all database objects, such as tables, indexes, and views.
The common DDL commands include CREATE, ALTER, DROP, and TRUNCATE.
What codes are part of the Data manipulation language (DML)
DML is used for querying and modifying data within existing database objects.
Common DML commands include SELECT, INSERT, UPDATE, and DELETE.
What are data models and how are they different?
A data model is a representation of some data.It has a subject and attributes that describe the relationship of the data.
What is a Relational Model?
Data structured and represented as tables.
What is a Semi-structured Model?
Data structured as a tree hierarchy, such as XML (eXtensible Markup Language)
What are socio-economic factors?
It ensures that DATABASES we build are inclusive and equitable. Under here are all the diffrent kinds of Socio-economics:
- Multilingual Support
- Low Bandwidth Optimization:
- Screen Reader Compatibility:
- Affordability in Pricing Data:
- Accessible Education Resources:
- Disability-Friendly Interfaces:
- Elderly-Friendly Navigation:
- Income-Based Services and Features:
What Socioeconomic factors are rellivandt in our subject
-
Multilingual Support:
Even though we have a business rule that all our customers are danish with a danish phone number, it is still worth that we mention that our website should be including for non-danish/english speakers.- This is important because not all danish citizens speak nor read danish, but should still have access to the information within the database!
-
Affordability:
- pros: A big part of what we do, is providing power for a good price. We should have an option that highlights the low pricing and what you get for it.
- cons: we actually only provide one price for each house so maybe this is irrelevant
- Low Bandwidth options: We transport power to everyone in Denmark, even tho who lives in the middle of nowhere like in Skjern. Therefor the power_broker (Who we work for) needs to be able to turn off the live pricing update, so the website does not need as much data to load.
Screen reader compatibility:
- important hence not all customers is expected to have a good sight, so having the ability to get information read aloud, could help visually impaired individuals
Explain how your database could be part of a larger multi-tier client server system - Data-application.
- Presentation Tier (Often the Client)
This is what the customers receive. For example, if we create an app for the customers, this is what we present to them. They can interact with our data, manage bills, and see prices.
- Application tier (or Business logic)
Processes and manages business operations like power distribution, billing, and customer management.
- Data tier (our database)
Databases holding customer information, power supply contracts, billing records, and usage data.
We (Power_broker) have our own data on all our customers, while our Power_supplier has data on the gathered power, etc.
I admit I am not sure if they meet in the Data tier or the Application tier, but I have arguments for both.
What does ACID mean?
Atomicity, Consistency, Isolation, and Durability
Explain how your DB project practices the ACID (Atomicity, Consistency, Isolation, and Durability) test for databases!
- “A”tomicity: essential data integrity principle. Data must be atomic.
- “Atomicity” is a reliability rule where either any database transaction (e.g. registration, query, ATM withdrawal/deposit, erasing data etc.) must either be completed in full or not be executed at all.
- “C”onsistency: constraints that ensure that transactions are reliable and proper.
- Consistency sort of work as the rules we created for the database!!
- Databases must have specific constraints that ensure certain business and technical rules. A part of data validation.
- Account cannot have a negative balance.
- Phone number must follow a certain numerical format
- “I”solation is a database transaction rule based on FIFO (First in, First out).
- Every single database transaction, whether a query or adding or deleting an entry, must be done in independently. Two transactions can be run at the same time.
- “D”urability” is to ensure that once a transaction is run, the transaction remains in the database and is not lost or erased.
- Every transaction must be durable and stored in non-volatile memory.
How are databases, views, and applications related?
Databases store and organize data
views provide customized perspectives of the data
Applications interact with databases and views to fulfill specific business requirements and user needs.
Together, they form an interconnected ecosystem that supports data-driven operations and applications.
How do you structure a user story?
As a (…), I want (…), so that I can (…)
Why are user stories useful in DBUD
- User stories illustrate end-user needs, providing relatable examples that highlight the importance of a database.
- They enhance communication and collaboration between clients and the development team, fostering informed decision-making.
- User stories allow clients to visualize database functionality within their workflow, facilitating incremental development tailored to evolving requirements.
What questions do you typically ask during requirements engineering (during eliclication and refinement)
-
General understanding:
- What is the purpose of the system?
- Who are the primary stakeholders?
- Who will be affected by this system and who will be interested in the system and its development?
- What problems are you trying to solve with this system?
-
our report:
energy poverty
-
our report:
- What are the key business processes that the system needs to support?
-
Functional requirements:
- What specific functionalities do you expect the system to provide?
- What are the main tasks the users need to perform with the system?
- Are there existing system that this new system needs to integrate with?
-
non-functional requirements
- What are the performance requirements?
- What are the security requirements?
- Two-factor Authentication
- What are the usability requirements?
- What are the availability and reliability requirements?
-
Constraints and limitations:
- Are there any budget constraints?
- What is the project timeline?
- Are there any legal or regulatory requirements?
- What are the technical constraints?
-
User perspective:
- Who are the end-users of the system?
- What are the user experience goals?
- What are the common user scenarios or use cases?
- What are the pain points for users with the current system? (if any)
- Understand current challenges and areas for improvement
What would be a new user story for a data analytics dashboard for management?
As a data analytics, I want a database where I can store information about my employees names, their account number for their salary and employee ID, so that I can keep them paid and happy
What are your Project-ERD Business Rules?
- A customer can only have one contract with the broker.
- An energy company can have many customers, both private customers and business customers.
- An employee at an energy company can be a customer at the same company that they are employed at.
- Each energy company can have their own database showcasing the prices of energy, one database can contain data from many different energy companies.
- There needs to be a broker between the individual, private customer and a Power Supplier. A customer cannot buy energy directly from the energy supplier.
- An address can only belong to one customer and zip code.
- A supplier is only able to deliver one type of energy. The type of energy that the supplier can deliver is either green or fossil fuels
- Contract numbers can only consist of letters a-z and numbers 0-9
- All ID’s can only consist of numbers between 0-9, and cannot be more or less than 10 numbers
- All customers have residency in Denmark and therefore have a Danish phone number.
- The cost of delivering energy will not be considered since we have no information on how the energy is transported from the supplier to the broker and to the customers.
- Energy has been divided into green/fossil - putting aside the different types of green and fossil.
Which columns can be Null vs. Not Null? Why?
- NOT NULL means that the column needs to contain data and cannot be left empty e.g., primary keys, ID, or emails
- NULL means that the column is optional and it is permissible to have records were this column has not value
How did you decide on the unique attribute for each table?
How we choose which of the attributes that should be the primary key was how unique those single attributes could be - this was often the ID of the different stakeholders. Having the ID’s as the primary key ensured that we easier could retrieve the correct data