Learning Objectives
By the end of this section, you will be able to:
- Explain the challenges in developing a mobile first design with a database
- Discuss the considerations for cloud-based databases and their architecture
Mobile database development continues to be in high demand, as more businesses look for scalable and efficient ways to support their business. Mobile application development is closely tied to database design because apps rely on databases to store, manage, and retrieve data (Figure 3.3). Most commonly, lightweight embedded database systems such as SQLite are used to store data locally.
During development, the database structure is designed to align with the app’s features. For example, an e-commerce app might need tables for users, products, orders, and payments. Apps also connect to databases allowing for tasks like user login and real-time updates. A well-planned database ensures the app runs smoothly, stays fast, and supports all the features users depend on.
In mobile app development, using cloud databases lets developers focus on user experience and app features without worrying about data storage and management. Services from providers like AWS, Google Cloud Platform, and Microsoft Azure offer databases designed for mobile apps. These databases ensure data synchronization across various devices, including smartphones, tablets, laptops, desktops, and IoT devices. For example, in a mobile app, real-time updates ensure a user’s changes on a smartphone are immediately reflected on their tablet or desktop.
This integration also enables advanced features like offline data access, real-time updates, and easy app updates. For example, Firebase Realtime Database allows a mobile app to update users in real time, even when offline, by storing data locally and syncing it once the device reconnects.
Developing a Mobile-First Application with a Database
Mobile applications need to handle various forms of data input efficiently and accurately, ensuring that the collected information is stored securely and is easily retrievable. Some popular mobile apps include Google Drive and Google Docs for schoolwork and sharing files, Slack for group communication, and Spotify for streaming music.
Designing for Mobile Data Input
When designing a mobile application, one important consideration is how data are collected from users. As mobile devices have smaller screens and different input methods compared to desktops, optimizing forms and data entry interfaces for mobile use is necessary. Techniques such as responsive design, use of drop-down menus, autocomplete fields, and clear, concise instructions help ensure that users can enter data accurately. Validations should be implemented to check for correct data types, mandatory fields, and logical errors before the data are submitted, for example, ensuring an email field contains a valid email address format or a date field does not accept future dates when past dates are required. Many people use Instagram, Snapchat, and TikTok to stay connected with friends, and tools like Khan Academy and Quizlet are common for studying and learning.
Data Collection and Usage on Websites
Websites often collect user data through cookies, forms, and tracking technologies to personalize the user experience and for marketing purposes. These data are stored in databases and include information like user preferences, browsing history, and interaction patterns. By analyzing this data, websites can tailor content and advertisements to individual users, enhancing engagement and conversion rates. For instance, e-commerce sites use this data to recommend products based on previous searches and purchases. You’ve probably noticed how ads for products you recently liked or reviewed online show up in your search engine—this is a great example of how apps use data and databases to personalize the user experience and target customers.
Ensuring Data Cleanliness and Security
The term data cleanliness refers to the accuracy and consistency of data and the lack of duplicate, error, or missing information. Implementing validation checks at the point of data entry helps maintain data quality. Regular data audits and cleaning processes also remove duplicates, correct errors, and update outdated information.
Security is paramount, especially for applications handling sensitive data. Encryption should be used for data at rest and in transit. Secure authentication methods, such as multifactor authentication, help protect user accounts. Access controls ensure that only authorized users can access specific data. Regular security updates and patches are necessary to protect against vulnerabilities.
Careers in IS
Data Quality Analyst
A data quality analyst is a professional who is responsible for the data cleanliness and security within an organization. Following are some key responsibilities of this role:
- Data cleaning: Resolve issues such as incorrect formatting, duplicate entries, missing values, and other outliers.
- Data validation: Ensure accuracy and compliance through comparing data with predefined rules and standards.
- Data governance: Enforce quality policies to maintain the integrity of the data.
- Data standardization: Maintain consistent formatting throughout data sources.
- Data security: Implement security measures that protect data.
Privacy and Data Protection
Protecting user privacy involves adhering to data protection regulations such as the General Data Protection Regulation (GDPR), HIPAA, and the California Consumer Privacy Act (CCPA). Users should be informed about what data are being collected, how the data will be used, and who the data will be shared with. Providing options for users to control their data, such as opting out of data collection and deleting their data, is essential for building trust.
Design Principles for Mobile Applications and Database Management Systems
Successful apps are well designed and allow the user to easily navigate the interface. Several principles can ensure an effective mobile application design:
- Simplicity and clarity: Keep the user interface straightforward to reduce the risk of user input errors. This includes reducing clutter on screens and only displaying essential information to reduce cognitive load for users.
- Consistency and reliability: Maintain a consistent style (interaction behaviors, colors, fonts, layout patterns) across the application, and ensure it functions in accordance with its designed specifications, with no or minimal failures during the specified time of its use.
- Accessibility and usability: Ensure accessibility for those with disabilities, through features such as adjustable text sizes, appropriate color contrast, and functions like text-to-speech. Make sure users have adequate time to interact with the system so it is easily usable. This includes functions like response time, the ability to provide feedback, and verification of option selection or payment.
A mobile app DBMS is essential to ensure smooth app functionality. Some key principles for an efficient DBMS include the following:
- Modularity: Break the system into manageable parts, such as separate modules for user authentication, data collection, and data retrieval.
- Flexibility: Design the database to handle changes in data requirements or formats without needing extensive rework. This is especially important for large, unstructured data from apps such as real-time messaging or social media platforms.
- Scalability: Ensure the system can handle increasing amounts of data and users, which is especially important for growing mobile applications.
- Security: Implement robust security measures, such as encryption and access controls, to protect data during transmission and storage.
Cloud-Based Databases
Cloud-based databases offer several advantages, including scalability, flexibility, accessibility, and cost efficiency. They can easily scale up or down based on demand, support various data models, and provide pay-as-you-go pricing models that reduce up-front costs. Major cloud-based database services include AWS with Amazon RDS and Amazon DynamoDB, Microsoft Azure with Azure SQL Database, and Google Cloud with Cloud SQL. Cloud-based databases are widely adopted across industries due to their ability to handle large data volumes, provide robust disaster recovery options, and support real-time analytics. They are particularly useful for industries with fluctuating data needs, such as e-commerce during holiday seasons or health care during public health crises.
Global Connections
Netflix Database
Think about Netflix, a company that streams movies and TV shows to millions of people across the world. Behind the scenes, Netflix relies on a powerful database system to keep everything running smoothly. The company experienced rapid growth that made it difficult to keep up with customer demand. This growth led to a database corruption in 2008, which made the company realize that they had to make the switch to a cloud database.4
Netflix completed its cloud migration in 2016.5 By using cloud-based databases, Netflix became able to handle a huge number of users at the same time, making sure videos loaded quickly and without interruptions. It also allowed Netflix to personalize what recommendations customers saw, so every viewer received a unique experience.
Considerations for Cloud-Based Databases and Their Architecture
Cloud-based databases are hosted on third-party servers, providing scalable and flexible data storage solutions. This means businesses don’t have to maintain physical servers and infrastructure, freeing them to focus on development and other core activities. Examples include AWS with Amazon RDS and DynamoDB, GCP with Cloud SQL and Cloud Firestore, and Microsoft Azure with Azure SQL Database and Azure Cosmos DB.
Third-party providers manage these cloud-based databases. They handle the infrastructure, including database farms and storage. This ensures high availability, data redundancy, and automatic backups, which reduces the operational burden on businesses. Services like Amazon RDS, Google Cloud SQL, and Azure SQL Database offer managed database services, taking care of patching, backups, and scaling.
Cloud applications benefit significantly from the scalability and flexibility of cloud databases. These databases allow applications to handle increased loads without performance issues, which is especially important for mobile applications that experience varying levels of user activity.
- Bandwidth: Cloud databases need to handle high data transfer rates efficiently. Adequate bandwidth ensures that data can be transmitted quickly between the cloud database and the mobile application, providing a smooth user experience.
- Redundancies: Redundancy is built into cloud architectures to ensure data availability. Cloud providers use techniques such as data replication across multiple geographic locations to protect against data loss and ensure that services remain available even in the event of hardware failures.
Pros and Cons of Cloud-Based Databases
Most organizations choose cloud-based databases because they make storing and managing data easier and more flexible. Some of their benefits include being able to scale as needed and access data from anywhere, but there are also drawbacks, like security risks and potential cost issues. Organizations will need to weigh the pros and cons to determine if they’re the right fit for the organization’s needs. Some pros of cloud-based databases are as follows:
- Scalability: Cloud-based databases can grow or shrink with needs, which can easily accommodae fluctuating workloads.
- Cost-effectiveness: Customers only pay for what they use, so there’s no need for costly investments in hardware.
- Easy access: Customers can access their data from anywhere with an internet connection.
- Automatic updates: The cloud provider takes care of software updates and security patches, so organizations don’t have to worry about maintaining the system.
- Disaster recovery: Most cloud services have built-in backups and recovery options to protect data from loss or outages.
Some cons of cloud-based databases are as follows:
- Internet reliance: If the internet goes down or is slow, it can disrupt access to the database.
- Security risks: Storing data in the cloud can raise concerns about privacy.
- Costs: While they can be a cost-effective option for small workloads, unexpected usage can drive up costs quickly.
- Less control: Organizations may have limited control over the database compared to hosting on their own infrastructure.
- Vendor lock-in: Switching to a different cloud provider can be complicated and expensive.
Future Technology
Smarter Streaming with Artificial Intelligence
Netflix uses a mix of relational and NoSQL databases like Apache Cassandra, MySQL, and DynamoDB to manage all the data it needs for streaming. These databases work together to store and organize user information, the massive content library, and details like what shows people watch and how long they watch them.
But Netflix takes it a step further by using AI to personalize the experience. The AI systems analyze the data from these databases to figure out what users might want to watch next. For example, Cassandra handles huge amounts of real-time data from around the world, MySQL keeps track of account details, and DynamoDB supports the AI recommendations that pop up while browsing for something new.
By combining its databases with AI, Netflix makes sure users get spot-on recommendations, smooth video quality, and a seamless experience no matter where they are or what device they’re using.
Footnotes
- 4Yury Izrailevsky, Stevan Vlaovic, and Ruslan Meshenberg, “Completing the Netflix Cloud Migration,” Netflix, February 11, 2016, https://about.netflix.com/en/news/completing-the-netflix-cloud-migration
- 5Yury Izrailevsky, Stevan Vlaovic, and Ruslan Meshenberg, “Completing the Netflix Cloud Migration,” Netflix, February 11, 2016, https://about.netflix.com/en/news/completing-the-netflix-cloud-migration