Jump to content

oslon

Members
  • Posts

    44
  • Joined

  • Last visited

Everything posted by oslon

  1. Yeah that's my problem. I am not getting ideas to brute force it.(How to convert it to code)... I know how to solve, but converting it to code is something crazy tough for this problem.
  2. https://www.cs.drexel.edu/~johnsojr/2017-18/fall/CS270/Lectures/8/sat.pdf How'd you proceed? Language doesn't matter technique matters. You can as well write that into SQL.
  3. I am mildly familiar with most of the things. I didn't get how that'd help me in database administration (maybe helps in sql querying).
  4. Time | T9 Operation | T10 Operation -------------------------------------- 1 | Read x | 2 | Write x | 3 | | Read x 4 | | Write x 5 | | Read y 6 | | Write y 7 | Read y | Commit 8 | Write y | 9 | Commit | This is a topic from Database Systems by Thomas M. Connolly and Carolyn E. Begg. Then, he talks about locking: Here's the gist about it. - There are shared lock and exclusive lock. - Lock is granted as per lock compatibility matrix. - Lock can be upgraded and downgraded. (Remember author haven't started 2-PL yet) Then the author talks something which is my question.. Incorrect Locking Schedule A valid schedule that may be employed using the previous locking rules is: S={ write_lock(T9,x),read(T9,x),write(T9,x),unlock(T9,x), write_lock(T10,x),read(T10,x),write(T10,x),unlock(T10,x), write_lock(T10,y),read(T10,y),write(T10,y),unlock(T10,y), commit(T10), write_lock(T9,y),read(T9,y),write(T9,y),unlock(T9,y), commit(T9) } But I see tons of discrepancies in this locked schedule contradictory to what the author said earlier. 1) As per the book earlier, "A transaction continues to hold a lock until it explicitly releases it either during execution of when it terminates(aborts or commits)", Why is the lock being released before commit(T10) and commit(T9) in this case? Did author just meant that the lock was voluntarily removed by the transaction before committing?
  5. https://cs.pes.edu/wp-content/uploads/2019/08/DBMS_UE18CS180.pdf This is what I mean by fundamentals of dbms. Do they really help in SQL journey?
  6. Do you think learning the fundamentals make one a better sql person?
  7. So, let me ask you, how do you create entire database on your own? Unless you use chatgpt to do it. I mean meaningful data.
  8. Problem is I've no data to tinker with. No meaningful data i mean. One dataset that I have is jira(scrum). I use SQL on it and write my report, that's all. Is there anything else meaningful data that I can get where I can tinker stuffs? I am stuck in this phase where I am unable to find any data to tinker with. I am unable to find solid exercises to help me in my learnngs. Or maybe I am looking at the wrong things.
  9. I am not storing them, Jira is storing them in this format. Export to Jira->CSV->Import to MySql.
  10. col1 col2 28/Apr/24 11:50 AM 29/Apr/24 5:29 PM This is honestly an interesting sql project of mine(I can use node.js as well). This is how I'd solve this manually: 29/Apr/24 Will be converted to 29/Apr/24 And it'll be converted to 29/04/24 ( There'll be a lookup table for Apr->04 mapping) And the time will be converted 17:29 (no unit PM or AM) Then, I'll convert the col1 date to the similar format. 28/04/24 Then time to same format 24h format. And subtract it. But I can't make sql to do this as I've not much idea about SQL syntax. Can anyone help me? my alternative is using node.js
  11. A beginner product support engineer wants to enhance his SQL data analysis skills. All I can do is do some subqueries between n tables and WHERE and LIKE clause. I tried hackerrank and stratascratch but no avail. But the issue that I was facing is that I could only solve unguided problems using chatgpt. I need a set of problems in exactly ascending order of difficulty. I'm from Nepal and SQL developer roles are in high demand here.
  12. A product support engineer who's an aspiring sysadmin(linux) wants to have elaborative knowledge on "bash shell scripting" as well as in "deploying applications over the linux virtual machine(without using k8s, docker etc, just pure shell script or ansible)". I don't want to be a software developer but want to be a systems administrator. I am working as a product support engineer and want to enhance my skillset on scripting and deployment. They say "learn by doing", so I want to follow it. But the issue is that I am unable to find what to do. There's very minimal need of scripting in my day to day workflow. Even if there's need of scripting, I have to use chatgpt to write it because the issues that I require aren't from beginner to advanced level sorted out. Similarly goes for deployment. I can use chatgpt to write deployment ansible but I won't learn anything that way. Thus, I want a guided project based way to learn these two things. I am from Nepal and such jobs are in high demand as we're using old technologies in our country. Traditional tech is well paid. I haven't seen anyone using AWS in Nepal.
  13. Any books/courses you recommend? I've purchased 5 books on DBMS but they don't seem to teach SQL that much.
  14. t1.abcd=t2.abcd?
  15. CREATE TABLE tableName ( abcd VARCHAR(512), 1.2.3.4 VARCHAR(512), 120 VARCHAR(512), 2024-02-27 09:59:03 VARCHAR(512), VARCHAR(512), VARCHAR(512), VARCHAR(512), VARCHAR(512), VARCHAR(512), VARCHAR(512) ); INSERT INTO tableName (abcd, 1.2.3.4, 120, 2024-02-27 09:59:03, , , , , , ) VALUES ('abcd', '1.2.3.4', '120', '2024-02-27 09:59:00', '', '', '', '', '', ''); INSERT INTO tableName (abcd, 1.2.3.4, 120, 2024-02-27 09:59:03, , , , , , ) VALUES ('efgh', '9.10.11.12', '120', '2024-02-27 09:30:00', '', '', '', '', '', ''); INSERT INTO tableName (abcd, 1.2.3.4, 120, 2024-02-27 09:59:03, , , , , , ) VALUES ('efgh', '9.10.11.12', '120', '2024-02-26 09:00:00', '', '', '', '', '', ''); INSERT INTO tableName (abcd, 1.2.3.4, 120, 2024-02-27 09:59:03, , , , , , ) VALUES ('random', '1ANDOM', 'random', 'random', '', '', '', '', '', ''); INSERT INTO tableName (abcd, 1.2.3.4, 120, 2024-02-27 09:59:03, , , , , , ) VALUES ('random', 'random', 'random', 'random', '', '', '', '', '', ''); INSERT INTO tableName (abcd, 1.2.3.4, 120, 2024-02-27 09:59:03, , , , , , ) VALUES ('', '', '', '', '', '', '', '', '', ''); INSERT INTO tableName (abcd, 1.2.3.4, 120, 2024-02-27 09:59:03, , , , , , ) VALUES ('', '', '', '', '', '', '', '', '', ''); INSERT INTO tableName (abcd, 1.2.3.4, 120, 2024-02-27 09:59:03, , , , , , ) VALUES ('', '', '', '', '', '', '', '', '', ''); INSERT INTO tableName (abcd, 1.2.3.4, 120, 2024-02-27 09:59:03, , , , , , ) VALUES ('', '', '', '', '', '', '', '', '', ''); This is the table. What I want is this. Find only the rows whose A's are same AND B's are same, C=120 and D's difference is less than 3 seconds. How'd I do it? Rather than crude answers, I'd love some guidance (teach a man to fish rather than giving him a fish) I am trying to learn SQL advanced concepts by these practical scenarios in my job where I get less opportunity to use SQL as I am not a data analyst but a support engineer. Any guidance to practice SQL in scenarios like this is also appreciated.
  16. I wonder what might have happened? How do I troubleshoot it? I am a system administrator by profession so I will check logs of application server, but I think I need some tips about database to debug this issue.
  17. while(true) { if(id==1 && counter.length>7) { counter.value=1 } } Application_counter id| counter 1 | 123 Need to convert this to a procedure that runs forever in ms-sql server. How do I do it?
  18. TypeError: arrayOfObjects is not iterable at Object.<anonymous> (C:\Users\User\Desktop\100DAYOFCODE\1\1\script.js:3:19) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Module._load (node:internal/modules/cjs/loader:960:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 The code in question: const arrayOfObjects = require("./data"); for (const obj of arrayOfObjects) { console.log(`ID: ${obj.id}, Name: ${obj.name}`); } data is a file containing stuffs in this order const arrayOfObjects = [ { "id": 1, "name": "bla bla" }, { "id": 2, "name": "bla bla bla" } ]; Any ideas to resolve this issue?
  19. I know not enough information. The web server is of android and ios app. Some users aren't able to login due to this issue and they're getting "ssl error". The logs before the login isn't stored in the server. The web server on nginx is just there for proxy pass and there's nothing significant in nginx's error/access/ssl logs. Except "certain static content not found". If static content not being found was the issue everyone should be getting the same error. I'm wondering for ideas to debug this issue. The server is on glassfish domain.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.