What is SQLite? PDF
Document Details
Uploaded by BestPerformingFeynman4466
ACLC
Tags
Summary
This document contains a list of questions and answers about SQLite. It covers topics such as what SQLite is, who developed it, and when it was created. It also includes information on its key features and advantages.
Full Transcript
What is SQLite? A. A programming language B. A software library C. A standalone application D. An operating system ANSWER: B Who developed SQLite? A. Bjarne Stroustrup B. James Gosling C. D. Richard Hipp D. Guido van Rossum ANSWER: C When was SQLite created? A. August 2000 B. July 1999...
What is SQLite? A. A programming language B. A software library C. A standalone application D. An operating system ANSWER: B Who developed SQLite? A. Bjarne Stroustrup B. James Gosling C. D. Richard Hipp D. Guido van Rossum ANSWER: C When was SQLite created? A. August 2000 B. July 1999 C. January 1998 D. March 2001 ANSWER: A What is a key feature of SQLite that sets it apart from other databases? A. It requires complex configuration. B. It is not self-contained. C. It is serverless. D. It does not support transactions ANSWER: C What programming language is SQLite written in? A. Java B. Python C. C++ D. ANSI-C ANSWER: D Which of the following is NOT a supported SQLite data type? A. INTEGER B. DATETIME C. REAL D. TEXT ANSWER: B Which of the following is NOT an advantage of SQLite? A. Slow performance B. Portability C. Accessibility D. Reduced application cost ANSWER: A What does the term "serverless" mean in the context of SQLite? A. It requires a separate server system to operate. B. It does not require a dedicated server to run. C. It cannot be used in client-server applications. D. It relies on cloud computing services. ANSWER: B What is the primary function of the 'sqflite' package in Flutter? A. Designing user interfaces B. Handling network requests C. Managing application state D. Executing SQL queries ANSWER: D Where is a SQLite database saved by default on an Android device? A. In the application's assets folder B. On the external storage C. In the path obtained by getDatabasesPath() D. In the cloud ANSWER: C What happens to a SQLite database when the application using it terminates? A. It is automatically backed up to the cloud. B. It remains open until manually closed. C. It is deleted from the device. D. It is closed ANSWER: D What is the recommended practice for releasing resources associated with a SQLite database when they are no longer needed? A. Relying on the operating system to close the database automatically. B. Explicitly closing the database. C. Deleting the database file. D. There is no need to manage SQLite database resources explicitly. ANSWER: B How does SQLite handle unsupported data types like DateTime? A. It raises an error, preventing storage. B. It uses specific conversion functions. C. It stores them as strings or integers using specific formats. D. It ignores them during database operations. ANSWER: C If you wanted to store a boolean value in SQLite, what would be the most appropriate method? A. Store the value directly as TRUE or FALSE. B. Use the INTEGER type to represent true/false as 1/0. C. Create a custom data type for boolean values. D. SQLite doesn't inherently support boolean; it's better to avoid storing them. ANSWER: B What is the significance of SQLite being "self-contained"? A. It can only work with a limited amount of data. B. It is integrated directly into the application using it. C. It has no external dependencies, like separate server processes. D. It is highly secure and resistant to external attacks. ANSWER: C Which of these is a disadvantage of using SQLite? A. It's not suitable for applications with many users accessing data concurrently. B. It is slower than client-server database systems in all scenarios. C. It requires significant setup and configuration on the developer's part. D. It is not as widely supported across different programming languages. ANSWER: A Why is SQLite's lightweight nature beneficial, especially in mobile development? A. It simplifies the development process by reducing code complexity. B. It results in smaller application sizes and potentially faster performance. C. It ensures high levels of security for sensitive data. D. It allows for easy integration with cloud-based database services. ANSWER: B What makes SQLite a suitable choice for handling HTTP requests, despite being a local database? A. It has built-in mechanisms specifically for managing network traffic. B. It can be used on servers to process and store data from web requests. C. Its lightweight and efficient nature allows for quick data operations. D. It is not suitable for handling HTTP requests; this statement is incorrect. ANSWER: C How does SQLite achieve "zero-configuration"? A. Developers must manually configure every aspect of the database. B. It automatically adapts to the operating system and application settings. C. It comes with pre-set configurations that are suitable for most use cases. D. The concept of "zero-configuration" is irrelevant in the context of SQLite. ANSWER: B What type of database management system is SQLite? A. Hierarchical Database B. Network Database C. Relational Database D. Object-Oriented Database ANSWER: C Which term describes a notable characteristic of SQLite that ensures data changes are completed entirely or not at all? A. Atomic B. Durable C. Isolated D. Transactional ANSWER: A Which statement about accessing SQLite databases in Flutter applications is most accurate? A. Flutter has built-in functions to directly interact with SQLite. B. The sqflite package serves as a bridge for Flutter to communicate with SQLite. C. SQLite databases are inaccessible in Flutter; you must use cloud databases. D. The dart:sql library provides all the tools needed to work with SQLite. ANSWER: B What is Firebase? A. A mobile operating system. B. A real time application platform. C. A programming language. D. A cloud storage provider. ANSWER: B Which of the following statements is NOT true about Firebase? A. Firebase is platform-independent. B. Firebase requires developers to manage servers. C. Firebase allows for the development of collaborative applications. D. Firebase eliminates the need to write server-side code. ANSWER: B How do developers integrate Firebase into their applications? A. By installing a specific hardware component. B. By including a library in their applications. C. By writing custom server-side code to interact with Firebase. D. By using a command-line interface to interact with Firebase servers. ANSWER: B What happens when one client changes data in a Firebase database? A. The change is reflected only on that specific client device. B. Other clients observing the same data are updated within milliseconds. C. The data change is queued and updated periodically on other clients. D. A manual synchronization process is required to update other clients. ANSWER: B What type of data can be stored in Firebase at a high level? A. Only text-based data, such as chat messages. B. Exclusively structured data, like database tables. C. Any type of data, including game state, chat messages, images, and media files. D. Only data that is relevant to user analytics and behavior. ANSWER: C Which Firebase feature provides a cloud-hosted NoSQL database for storing and syncing application data in real-time? A. Authentication B. Realtime Database C. Cloud Messaging D. Hosting ANSWER: B You want to allow users to sign in to your app using their existing Google or Facebook accounts. Which Firebase feature would you use to accomplish this? A. Realtime Database B. Authentication C. Cloud Messaging D. Storage ANSWER: B Your app needs to send push notifications to users' devices to alert them about important events. What Firebase feature can you use for this purpose? A. Storage B. Hosting C. Realtime Database D. Cloud Messaging ANSWER: D You are developing a web application and need a way to host the app's static assets (HTML, CSS, JavaScript, images) for fast delivery to users. Which Firebase feature can help you achieve this? A. Realtime Database B. Authentication C. Storage D. Hosting ANSWER: D Your team wants to perform thorough testing of your app on a wide range of devices to identify potential issues before release. Which Firebase feature provides a platform for automated testing on various device configurations? A. Test Lab B. Crash Reporting C. Analytics D. Hosting ANSWER: A You need to store and manage user-uploaded files, such as images and videos, for your app. Which Firebase feature is suitable for this purpose? A. Cloud Messaging B. Hosting C. Storage D. Test Lab ANSWER: C Your app experiences a crash, and you want to gather information about the crash to debug and fix it. Which Firebase feature helps collect crash reports, including details about the device, OS version, and stack trace? A. Test Lab B. Analytics C. Crash Reporting D. Realtime Database ANSWER: C You want to track user behavior within your app, such as the screens they visit, the buttons they click, and the time they spend on each screen. Which Firebase feature would provide you with this type of data? A. Crash Reporting B. Test Lab C. Analytics D. Authentication ANSWER: C Firebase offers a free analytics solution. What are the limitations of this free solution in terms of event reporting? A. It allows reporting of only 100 event types. B. It restricts reporting to a maximum of 10 event attributes. C. It provides unlimited reporting for 500 event types, each with up to 25 attributes. D. It has no limitations on event reporting. ANSWER: C Your development team needs assistance with implementing Firebase in your application. Which resource mentioned can provide support? A. Stack Overflow forums B. Dedicated account manager C. firebase.google.com/support D. GitHub issue tracker ANSWER: C What type of applications is Firebase intended for? A. Simple hobby projects B. Business-critical applications C. Educational software only D. Games exclusively ANSWER: B How does Firebase ensure the security and integrity of stored data? A. Data is stored only on user devices, not in the cloud. B. Data is stored redundantly, and off-site backups are made nightly. C. Data encryption is not supported in Firebase. D. Data security is entirely the developer's responsibility. ANSWER: B Which of these is NOT listed as a supported authentication provider in Firebase? A. Email & Password B. Social providers C. Two-factor authentication D. Existing auth systems ANSWER: C What is a key advantage of using Firebase Hosting for delivering web content? A. It provides automatic integration with content delivery networks (CDNs). B. It guarantees a 100% uptime for all hosted websites. C. It offers free custom domains. D. It supports server-side scripting languages like PHP and Python. ANSWER: A What is a key characteristic of Firebase's data synchronization mechanism? A. It requires manual synchronization requests from clients. B. It updates data on clients only when they are connected to the internet. C. It ensures that all clients observing the same data are updated within milliseconds when one client changes the data. D. It employs a centralized polling system where clients periodically check for updates. ANSWER: C Which statement best describes Firebase's "Free to start, scale with ease" feature? A. Firebase is entirely free to use, with no paid plans or usage limits. B. Firebase offers a free tier with limited features and usage, allowing developers to get started without incurring costs. C. Firebase requires a paid subscription from the outset, but it offers flexible scaling options. D. Firebase's pricing is based on the number of developers working on a project. ANSWER: B What does "Firebase fully support access from your backend servers" imply? A. Developers cannot directly access Firebase data from client-side applications. B. Firebase can be integrated with server-side logic for tasks like data processing and validation. C. Firebase exclusively supports server-side development and does not provide client-side libraries. D. All Firebase operations must go through a backend server, limiting client-side capabilities. ANSWER: B What advantage does Firebase's real-time data synchronization offer developers building collaborative applications? A. Eliminates the need for traditional HTTP requests for data updates. B. Reduces the complexity of database design. C. Simplifies user authentication processes. D. Lowers the cost of data storage. ANSWER: A Which Firebase feature would be most beneficial for a mobile game developer who wants to store and sync game progress across multiple devices for a single user? A. Authentication B. Realtime Database C. Cloud Messaging D. Hosting ANSWER: B How does Firebase's "Test Lab" feature benefit developers, especially when compared to traditional app testing methods? A. It eliminates the need for human testers altogether. B. It allows developers to test their apps on a wider range of device and OS configurations without needing to physically own those devices. C. It guarantees that apps will be bug-free upon release. D. It automates the process of submitting apps to app stores. ANSWER: B What is Dart? A. A mobile application development framework. B. An open-source web programming language developed by Google. C. A type of widget in Flutter. D. A JavaScript framework. ANSWER: B When did Dart first appear? A. 2010 B. 2011 C. 2012 D. 2013 ANSWER: B What is the name of the online editor where you can execute Dart code interactively in any modern browser? A. DartPad B. DartEditor C. CodePen D. Visual Studio Code ANSWER: A Which of the following is NOT a feature of the Dart Editor? A. Available for Windows, Mac, and Linux. B. Compiles Dart code to JavaScript. C. Executes Dart code interactively in any modern browser. D. Features and tools that help edit Dart code. ANSWER: C What is Flutter? A. A programming language. B. An open-source mobile application development framework. C. A type of animation. D. A JavaScript library. ANSWER: B What programming language does Flutter use? A. JavaScript B. Python C. Dart D. C++ ANSWER: C Which of the following is NOT listed as an advantage of Flutter? A. Fast development cycle. B. Single codebase for multiple platforms. C. Interoperability with other programming languages. D. Customizable widgets. ANSWER: C What is a widget in Flutter? A. A building block for creating the visual elements of an app. B. A type of animation. C. A way to connect to a backend server. D. A programming paradigm. ANSWER: A What Flutter widget provides a rectangular visual element for displaying other widgets? A. Text B. Image C. Container D. List View ANSWER: C Which widget displays a string of text on the screen in Flutter? A. Container B. Text C. Image D. List View ANSWER: B Which of the following best describes the purpose of the Image widget in Flutter? A. Displays a scrollable list of widgets. B. Provides a top app bar with navigation buttons. C. Shows an image on the screen. D. Creates an animation. ANSWER: C What are the pros and cons of using Flutter's hot reload feature in a development workflow? A. Explain how hot reload can increase productivity. B. Discuss potential limitations of hot reload. C. Analyze the impact on debugging. D. Evaluate the effect on code stability. ANSWER: A What are the trade-offs between using native components versus Flutter widgets for platform-specific functionality? A. Evaluate the performance and user experience. B. Discuss the maintenance and development effort required. C. Analyze the flexibility of customization. D. Compare the development speed. ANSWER: A Examine the following Dart code snippet used to initialize a SQLite database. Which line of code could result in an error? void main() async { final database = openDatabase( 'my_dB.db', vesion: 1, onCreate: (db, version) return dB.execute ("CREATE TABLE my_table (id INTEGER PRIMARY KEY, value TEXT")); }, ); print(await database.query('my_table')); } A. openDatabase('my_dB.db', version: 1); B. dB.execute("CREATE TABLE my_table (id INTEGER PRIMARY KEY, value TEXT)"); C. await database.query('my_table'); D. print(await database.query('my_table')); ANSWER: A Analyze the purpose of the following Flutter ListView.builder widget. ListView.builder( itemCount: items.length, itemBuilder: (context, index) { return ListTile( title: Text('${items[index]}'), ); }, A. Create a scrollable list of widgets B. Specify the total number of items in the list C. Build the widget for each item in the list D. All of the above ANSWER: D Identify the main issue in this Firebase initialization code. void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); runApp(MyApp()); } A. Missing API key B. Missing project configuration C. Incorrect ensureInitialized call D. None of the above ANSWER: D How does Flutter's widget tree structure compare to traditional DOM trees in web development? A. Analyze the similarities and differences. B. Explain the impact on performance and rendering. C. Evaluate the ease of manipulation. D. Discuss the learning curve for developers. ANSWER: B Compare the use of state management solutions like Provider, BLoC, and Redux in Flutter. A. Evaluate the scenarios where each would be most effective. B. Discuss the complexity and learning curve of each solution. C. Analyze the performance implications. D. Compare their integration with other libraries. ANSWER: A Compare Flutter's performance on different operating systems (iOS, Android, WeB.. A. Evaluate any performance disparities. B. Analyze the factors that contribute to these differences. C. Discuss the optimization strategies. D. Compare user experiences. ANSWER: A Analyze this SQL query and determine its function. SELECT * FROM my_table WHERE value LIKE '%example%' A. Retrieve all rows where the column value contains 'example' B. Retrieve all rows where the column value starts with 'example' C. Retrieve all rows where the column value ends with 'example' D. Retrieve all rows where the column value is exactly 'example' ANSWER: A Examine the Dart code below and determine the purpose of the get() function. void fetchData() async { final firebaseInstance = FirebaseFirestore.instance; final data = await firebaseInstance.collection('users').get(); } A. Fetches data from a Firestore collection B. Returns a list of document snapshots C. Executes a query against the Firestore collection D. All of the above ANSWER: D Analyze the following code and identify the error in handling asynchronous data retrieval. Future fetchData() async { final db = await openDatabase('my_dB.db'); return dB.query('my_table'); } A. FutureBuilder should be used to build the UI B. Data fetching should be synchronous C. Data should be fetched inside initState D. Use a global variable to store the data ANSWER: A Determine the role of the build() method in a StatefulWidget. A. Builds the user interface B. Initializes state C. Manages widget lifecycle D. Handles user interactions ANSWER: A How do Flutter animations enhance the user experience in mobile applications? A. Analyze different animation techniques. B. Evaluate the performance implications of using animations. C. Discuss the impact on user engagement. D. Compare with animations in other frameworks. ANSWER: B Evaluate the effectiveness of Flutter's built-in testing tools for ensuring code quality. A. Analyze the types of tests supported. B. Discuss the advantages and limitations of these tools. C. Compare with third-party testing tools. D. Evaluate the ease of integration. ANSWER: B Examine this Dart function and identify the purpose of asynC. Future fetchData() async { final data = await fetchDataFromAPI(); print(data); } A. Indicates the function returns a Future B. Allows the use of await inside the function C. Enables asynchronous programming D. All of the above ANSWER: D Analyze this Firebase rule and determine its function. service clouD.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write: if request.auth != null; } } } A. Allows read/write if the user is authenticated B. Denies all read/write operations C. Allows read/write operations without authentication D. Limits read/write to specific users ANSWER: A Identify the main use of Dart's Future class in Flutter. A. Handle asynchronous operations B. Define widget layout C. Manage state D. Render UI elements ANSWER: A What are the security best practices for using Firebase with Flutter? A. Discuss methods for securing data. B. Analyze the potential risks and how to mitigate them. C. Evaluate the use of encryption. D. Compare Firebase security with other databases. ANSWER: B Analyze the purpose of using ChangeNotifier in Flutter. A. Manage and notify listeners about changes in state B. Handle user interactions C. Render UI elements D. Perform network requests ANSWER: A Critique the use of asynchronous programming in Dart compared to other languages like JavaScript and Python. A. Evaluate the ease of use and readability. B. Discuss the performance implications. C. Compare error handling mechanisms. D. Analyze the impact on code maintainability. ANSWER: A Examine the purpose of the pubspeC.yaml file in a Flutter project. A. Define project dependencies B. Configure build settings C. Specify asset locations D. All of the above ANSWER: D Determine the function of the StreamBuilder widget in Flutter. A. Build widgets based on the latest snapshot of a Stream B. Manage asynchronous operations C. Create animations D. Handle state changes ANSWER: A Identify the purpose of using Firestore.instance in Firebase. A. Access the Firestore database B. Initialize Firebase services C. Define Firestore rules D. Manage user authentication ANSWER: A Analyze this Dart function and identify the role of setState. void updateData() { setState(() { _data = newData; }); } A. Update the widget state and trigger a rebuild B. Fetch data from an API C. Render UI elements D. Perform network requests ANSWER: A Examine the purpose of using Firestore.rules in Firebase. A. Define security rules for the Firestore database B. Manage user authentication C. Configure Firestore settings D. Initialize Firebase services ANSWER: A Determine the purpose of the Widget class in Flutter. A. Define the blueprint for building UI elements B. Manage state C. Handle user interactions D. Perform network requests ANSWER: A Identify the role of the get method in Firestore. A. Fetch documents from a collection B. Add a new document to a collection C. Update an existing document D. Delete a document from a collection ANSWER: A Analyze the purpose of WidgetsBinding.ensureInitialized() in Flutter. A. Ensure the Flutter framework is properly initialized B. Manage widget state C. Define widget layout D. Handle user interactions ANSWER: A Examine the purpose of using await in Dart asynchronous programming. A. Wait for the completion of a Future B. Perform a synchronous operation C. Define a function D. Manage state changes ANSWER: A Evaluate the Firebase connection methods. Which is the most efficient and secure way to initialize Firebase in a production environment? void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); } A. Storing the API key directly in the code B. Using environment variables to store API keys C. Hardcoding the project configuration D. Passing the project configuration through a secure cloud function ANSWER: B Evaluate the effectiveness of using setState for updating UI in a Flutter application. Identify a potential drawback. A. Causes unnecessary rebuilds of the UI B. Efficient for small UI updates C. Preferred method for state management in all scenarios D. Automatically optimizes UI performance ANSWER: A Evaluate the code snippet for querying data from SQLite. Determine the best method for handling asynchronous data retrieval. Future fetchData() async { final db = await openDatabase('my_dB.db'); return dB.query('my_table'); } A. Using FutureBuilder to build the UI B. Fetching data synchronously C. Calling fetchData inside initState D. Using a global variable ANSWER: A Evaluate the use of Firebase Firestore rules. Which rule provides the best security for read and write operations? A. allow read, write: if true; B. allow read, write: if request.auth != null; C. allow read, write: if resource.datA.owner == request.auth.uid; D. allow read, write: if false; ANSWER: C Evaluate the following Dart code for querying data from both Firebase Firestore and SQLite. Determine which approach will optimize performance. Future fetchData() async { final firebaseInstance = FirebaseFirestore.instance; final firebaseData = await firebaseInstance.collection('users').get(); final sqliteDb = await openDatabase('my_dB.db'); final sqliteData = await sqliteDB.query('my_table'); } A. Fetching Firebase data first, then SQLite data B. Fetching SQLite data first, then Firebase data C. Running both fetch operations in parallel using Future.wait() D. Using separate functions to fetch data from Firebase and SQLite ANSWER: C Evaluate the effectiveness of using a StreamBuilder for real-time data updates in a Flutter application. A. Efficient for real-time updates B. Inefficient and causes UI lag C. Cannot be used for real-time updates D. Only suitable for static data ANSWER: A Evaluate the following Flutter state management approach for a large-scale application. Identify the most scalable solution. A. Using StatefulWidget for each widget B. Managing state with InheritedWidget C. Utilizing a state management library like Provider or Riverpod D. Passing state through constructors ANSWER: C Evaluate the code for creating a new Firestore document. Which method is the most efficient? final docRef = FirebaseFirestore.instance.collection('users').doc('new_user'); await docRef.set({ 'name': 'John Doe', 'email': '[email protected]' A. Using collection().doc().set() B. Directly using docRef.set() C. Using add() method D. None of the above ANSWER: A Evaluate the implications of using synchronous data fetching in Flutter. A. Causes the app to freeze B. Efficient for small datasets C. Preferred for all data fetching operations D. Automatically manages asynchronous tasks ANSWER: A Evaluate the security of storing sensitive data directly in the Flutter app's codebase. A. Secure and recommended B. Insecure and not recommended C. Efficient for quick access D. Allows easy sharing of credentials ANSWER: B Evaluate the effectiveness of using async and await in Dart. Identify a key advantage. A. Simplifies asynchronous programming B. Increases code complexity C. Reduces readability D. Limits code reusability ANSWER: A Evaluate the following Flutter code for performance optimization. Identify the potential issue. ListView.builder( itemCount: items.length, itemBuilder: (context, index) { return ListTile( title: Text('${items[index]}'), ); }, A. Inefficient for large datasets B. Causes memory leaks C. Optimal for all dataset sizes D. Automatically manages performance ANSWER: A Evaluate the performance implications of using the following Flutter ListView code for displaying a large dataset. Identify the best approach to improve performance. ListView( children: items.map((item) => ListTile( title: Text(item), )).toList(), ); A. Switching to ListView.builder to build items on demand B. Using Column instead of ListView C. Directly displaying all items without optimization D. Using GridView instead of ListView ANSWER: A